[Scummvm-git-logs] scummvm master -> 9489ada7b7904833160640cec9b803ba22400e3b

sev- noreply at scummvm.org
Tue Dec 26 20:29:30 UTC 2023


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b0a624df76 GRAPHICS: MACGUI: More debug output to MacFontManager
9489ada7b7 SCUMM: Remove obsolete comment


Commit: b0a624df76afefd0c97de3be5b5f814ac926d2b1
    https://github.com/scummvm/scummvm/commit/b0a624df76afefd0c97de3be5b5f814ac926d2b1
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-12-26T21:28:28+01:00

Commit Message:
GRAPHICS: MACGUI: More debug output to MacFontManager

Changed paths:
    graphics/macgui/macfontmanager.cpp


diff --git a/graphics/macgui/macfontmanager.cpp b/graphics/macgui/macfontmanager.cpp
index 4d981d1cc9f..880b1b6c7e2 100644
--- a/graphics/macgui/macfontmanager.cpp
+++ b/graphics/macgui/macfontmanager.cpp
@@ -613,6 +613,8 @@ int MacFontManager::registerFontName(Common::String name, int preferredId) {
 	if (_fontIds.contains(name))
 		return _fontIds[name];
 
+	debug(1, "MacFontManager::registerFontName('%s', %d)", toPrintable(name).c_str(), preferredId);
+
 	int id;
 	if (preferredId > -1 && !_fontInfo.contains(preferredId)) {
 		id = preferredId;
@@ -674,7 +676,7 @@ int MacFontManager::getFontIdByName(Common::String name) {
 
 Common::Language MacFontManager::getFontLanguage(uint16 id) {
 	if (!_fontInfo.contains(id)) {
-		warning("MacFontManager::getFontLanguage: No _fontInfo entry for font %d", id);
+		warning("MacFontManager::getFontLanguage: No _fontInfo entry for font ID %d", id);
 		return Common::UNK_LANG;
 	}
 	if (_fontInfo[id]->aliasForId > -1) {
@@ -685,7 +687,7 @@ Common::Language MacFontManager::getFontLanguage(uint16 id) {
 
 Common::CodePage MacFontManager::getFontEncoding(uint16 id) {
 	if (!_fontInfo.contains(id)) {
-		warning("MacFontManager::getFontEncoding: No _fontInfo entry for font %d", id);
+		warning("MacFontManager::getFontEncoding: No _fontInfo entry for font ID %d", id);
 		return Common::kCodePageInvalid;
 	}
 	if (_fontInfo[id]->aliasForId > -1) {
@@ -696,7 +698,7 @@ Common::CodePage MacFontManager::getFontEncoding(uint16 id) {
 
 int MacFontManager::getFontAliasForId(uint16 id) {
 	if (!_fontInfo.contains(id)) {
-		warning("MacFontManager::getFontAliasForId: No _fontInfo entry for font %d", id);
+		warning("MacFontManager::getFontAliasForId: No _fontInfo entry for font ID %d", id);
 		return -1;
 	}
 	return _fontInfo[id]->aliasForId;
@@ -704,7 +706,7 @@ int MacFontManager::getFontAliasForId(uint16 id) {
 
 Common::String MacFontManager::getFontName(uint16 id) {
 	if (!_fontInfo.contains(id)) {
-		warning("MacFontManager::getFontName: No _fontInfo entry for font %d", id);
+		warning("MacFontManager::getFontName: No _fontInfo entry for font ID %d", id);
 		return "";
 	}
 	if (_fontInfo[id]->aliasForId > -1) {
@@ -763,7 +765,7 @@ void MacFontManager::generateFontSubstitute(MacFont &macFont) {
 
 	if (sizes.empty()) {
 		if (macFont.getSlant() == kMacFontRegular) {
-			debug(1, "No viable substitute found (1) for font %s", getFontName(macFont).c_str());
+			debug(1, "No viable substitute found (1) for font %s", toPrintable(getFontName(macFont)).c_str());
 			return;
 		}
 
@@ -774,7 +776,7 @@ void MacFontManager::generateFontSubstitute(MacFont &macFont) {
 		}
 
 		if (sizes.empty()) {
-			debug(1, "No viable substitute found (2) for font %s", getFontName(macFont).c_str());
+			debug(1, "No viable substitute found (2) for font %s", toPrintable(getFontName(macFont)).c_str());
 			return;
 		}
 	}
@@ -807,7 +809,7 @@ void MacFontManager::generateFontSubstitute(MacFont &macFont) {
 
 #ifdef USE_FREETYPE2
 void MacFontManager::generateTTFFont(MacFont &toFont, Common::SeekableReadStream *stream) {
-	debug("Generating TTF font '%s'", getFontName(toFont).c_str());
+	debug("Generating TTF font '%s'", toPrintable(getFontName(toFont)).c_str());
 
 	// TODO: Handle getSlant() flags
 
@@ -815,7 +817,7 @@ void MacFontManager::generateTTFFont(MacFont &toFont, Common::SeekableReadStream
 	Font *font = Graphics::loadTTFFont(*stream, toFont.getSize(), Graphics::kTTFSizeModeCharacter, 0, Graphics::kTTFRenderModeMonochrome);
 
 	if (!font) {
-		warning("Failed to generate font '%s'", getFontName(toFont).c_str());
+		warning("Failed to generate font '%s'", toPrintable(getFontName(toFont)).c_str());
 	}
 
 	toFont.setGenerated(true);
@@ -824,18 +826,17 @@ void MacFontManager::generateTTFFont(MacFont &toFont, Common::SeekableReadStream
 	FontMan.assignFontToName(getFontName(toFont), font);
 	_fontRegistry.setVal(getFontName(toFont), new MacFont(toFont));
 
-	debug("Generated font '%s'", getFontName(toFont).c_str());
+	debug("Generated font '%s'", toPrintable(getFontName(toFont)).c_str());
 }
 #endif
 
 void MacFontManager::generateFONTFont(MacFont &toFont, MacFont &fromFont) {
 	if (fromFont.isTrueType()) {
-		warning("Cannot generate FONT font '%s' from TTF font '%s'", getFontName(toFont).c_str(), getFontName(fromFont).c_str());
+		warning("Cannot generate FONT font '%s' from TTF font '%s'", toPrintable(getFontName(toFont)).c_str(), toPrintable(getFontName(fromFont)).c_str());
 		return;
 	}
 
-	debugN("Found font substitute for font '%s' ", getFontName(toFont).c_str());
-	debug("as '%s'", getFontName(fromFont).c_str());
+	debug("Found font substitute for font '%s' as '%s'", toPrintable(getFontName(toFont)).c_str(), toPrintable(getFontName(fromFont)).c_str());
 
 	int slant = kMacFontRegular;
 	if (fromFont.getSlant() == kMacFontRegular)
@@ -845,7 +846,7 @@ void MacFontManager::generateFONTFont(MacFont &toFont, MacFont &fromFont) {
 	MacFONTFont *font = Graphics::MacFONTFont::scaleFont(fromFONTFont, toFont.getSize(), slant);
 
 	if (!font) {
-		warning("Failed to generate font '%s'", getFontName(toFont).c_str());
+		warning("Failed to generate font '%s'", toPrintable(getFontName(toFont)).c_str());
 	}
 
 	toFont.setGenerated(true);
@@ -854,7 +855,7 @@ void MacFontManager::generateFONTFont(MacFont &toFont, MacFont &fromFont) {
 	FontMan.assignFontToName(getFontName(toFont), font);
 	_fontRegistry.setVal(getFontName(toFont), new MacFont(toFont));
 
-	debug("Generated font '%s'", getFontName(toFont).c_str());
+	debug("Generated font '%s'", toPrintable(getFontName(toFont)).c_str());
 }
 
 void MacFont::setFallback(const Font *font, Common::String name) {


Commit: 9489ada7b7904833160640cec9b803ba22400e3b
    https://github.com/scummvm/scummvm/commit/9489ada7b7904833160640cec9b803ba22400e3b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-12-26T21:29:10+01:00

Commit Message:
SCUMM: Remove obsolete comment

Changed paths:
    engines/scumm/macgui/macgui_impl.cpp


diff --git a/engines/scumm/macgui/macgui_impl.cpp b/engines/scumm/macgui/macgui_impl.cpp
index e5d2ecf6c92..fc94f03e9e6 100644
--- a/engines/scumm/macgui/macgui_impl.cpp
+++ b/engines/scumm/macgui/macgui_impl.cpp
@@ -452,12 +452,6 @@ bool MacGuiImpl::getFontParams(FontId fontId, int &id, int &size, int &slant) co
 
 // ---------------------------------------------------------------------------
 // PICT loader
-//
-// ScummVM already has a PICT v2 loader, and we use that when necessary. But
-// for PICT v1 we have our own for now.
-//
-// TODO: Investigate if PICT v1 and v2 can be handled by the standard PICT
-//       loader.
 // ---------------------------------------------------------------------------
 
 Graphics::Surface *MacGuiImpl::loadPict(int id) {




More information about the Scummvm-git-logs mailing list