[Scummvm-git-logs] scummvm master -> e96e39905e307b0e77a3d8ea86d2e4b89d01800c

bluegr noreply at scummvm.org
Sun Jan 26 13:44:17 UTC 2025


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

Summary:
2adcbc1984 ZVISION: Remove support for FreeFont replacements
7bc77a7617 WINTERMUTE: Use LiberationSans instead of FreeSans as a fallback
80804c06c4 GRAPHICS: MACGUI: Use LiberationSans instead of FreeSans as a fallback
c0f3bf67e6 PETKA: Use LiberationSans instead of FreeSans
bbacea5bfc PETKA: Adjust font size for save/load dialogs
e96e39905e PETKA: Adjust font size for texts and descriptions


Commit: 2adcbc19840012b4d13919d8450eef3c2940b878
    https://github.com/scummvm/scummvm/commit/2adcbc19840012b4d13919d8450eef3c2940b878
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2025-01-26T15:44:10+02:00

Commit Message:
ZVISION: Remove support for FreeFont replacements

Changed paths:
    engines/zvision/text/truetype_font.cpp
    engines/zvision/text/truetype_font.h
    engines/zvision/zvision.cpp


diff --git a/engines/zvision/text/truetype_font.cpp b/engines/zvision/text/truetype_font.cpp
index a8ef7433059..11dd7e9b02b 100644
--- a/engines/zvision/text/truetype_font.cpp
+++ b/engines/zvision/text/truetype_font.cpp
@@ -38,15 +38,15 @@
 namespace ZVision {
 
 const FontStyle systemFonts[] = {
-	{ "*times new roman*",	  "times",   "FreeSerif", "Italic", "LiberationSerif"  },
-	{ "*times*",		  "times",   "FreeSerif", "Italic", "LiberationSerif"  },
-	{ "*century schoolbook*", "censcbk", "FreeSerif", "Italic", "LiberationSerif"  },
-	{ "*garamond*", 	  "gara",    "FreeSerif", "Italic", "LiberationSerif"  },
-	{ "*courier new*",	  "cour",    "FreeMono",  "Oblique", "LiberationMono" },
-	{ "*courier*",		  "cour",    "FreeMono",  "Oblique", "LiberationMono" },
-	{ "*ZorkDeath*",	  "cour",    "FreeMono",  "Oblique", "LiberationMono" },
-	{ "*arial*",		  "arial",   "FreeSans",  "Oblique", "LiberationSans" },
-	{ "*ZorkNormal*",	  "arial",   "FreeSans",  "Oblique", "LiberationSans" }
+	{ "*times new roman*",	  "times",   "LiberationSerif"  },
+	{ "*times*",		  "times",   "LiberationSerif"  },
+	{ "*century schoolbook*", "censcbk", "LiberationSerif"  },
+	{ "*garamond*", 	  "gara",    "LiberationSerif"  },
+	{ "*courier new*",	  "cour",    "LiberationMono" },
+	{ "*courier*",		  "cour",    "LiberationMono" },
+	{ "*ZorkDeath*",	  "cour",    "LiberationMono" },
+	{ "*arial*",		  "arial",   "LiberationSans" },
+	{ "*ZorkNormal*",	  "arial",   "LiberationSans" }
 };
 
 const FontStyle getSystemFont(int fontIndex) {
@@ -74,35 +74,28 @@ bool StyledTTFont::loadFont(const Common::String &fontName, int32 point, uint st
 	_style = style;
 
 	Common::String newFontName;
-	Common::String freeFontName;
 	Common::String liberationFontName;
 
 	for (int i = 0; i < FONT_COUNT; i++) {
 		FontStyle curFont = getSystemFont(i);
 		if (fontName.matchString(curFont.zorkFont, true)) {
 			newFontName = curFont.fontBase;
-			freeFontName = curFont.freeFontBase;
 			liberationFontName = curFont.liberationFontBase;
 
 			if ((_style & TTF_STYLE_BOLD) && (_style & TTF_STYLE_ITALIC)) {
 				newFontName += "bi";
-				freeFontName += "Bold";
-				freeFontName += curFont.freeFontItalicName;
 				liberationFontName += "-BoldItalic";
 			} else if (_style & TTF_STYLE_BOLD) {
 				newFontName += "bd";
-				freeFontName += "Bold";
 				liberationFontName += "-Bold";
 			} else if (_style & TTF_STYLE_ITALIC) {
 				newFontName += "i";
-				freeFontName += curFont.freeFontItalicName;
 				liberationFontName += "-Italic";
 			} else {
 				liberationFontName += "-Regular";
 			}
 
 			newFontName += ".ttf";
-			freeFontName += ".ttf";
 			liberationFontName += ".ttf";
 			break;
 		}
@@ -111,7 +104,6 @@ bool StyledTTFont::loadFont(const Common::String &fontName, int32 point, uint st
 	if (newFontName.empty()) {
 		debug("Could not identify font: %s. Reverting to Arial", fontName.c_str());
 		newFontName = "arial.ttf";
-		freeFontName = "FreeSans.ttf";
 		liberationFontName = "LiberationSans-Regular.ttf";
 	}
 
@@ -120,8 +112,7 @@ bool StyledTTFont::loadFont(const Common::String &fontName, int32 point, uint st
 	Common::File *file = new Common::File();
 	Graphics::Font *newFont;
 	if (!file->open(Common::Path(newFontName)) && !_engine->getSearchManager()->openFile(*file, Common::Path(newFontName)) &&
-		!file->open(Common::Path(liberationFontName)) && !_engine->getSearchManager()->openFile(*file, Common::Path(liberationFontName)) &&
-		!file->open(Common::Path(freeFontName)) && !_engine->getSearchManager()->openFile(*file, Common::Path(freeFontName))) {
+		!file->open(Common::Path(liberationFontName)) && !_engine->getSearchManager()->openFile(*file, Common::Path(liberationFontName))) {
 		newFont = Graphics::loadTTFFontFromArchive(liberationFontName, point, Graphics::kTTFSizeModeCell, 0, 0, (sharp ? Graphics::kTTFRenderModeMonochrome : Graphics::kTTFRenderModeNormal));
 		delete file;
 	} else {
diff --git a/engines/zvision/text/truetype_font.h b/engines/zvision/text/truetype_font.h
index b2f426b6e03..28b5b391403 100644
--- a/engines/zvision/text/truetype_font.h
+++ b/engines/zvision/text/truetype_font.h
@@ -36,8 +36,6 @@ namespace ZVision {
 struct FontStyle {
 	const char *zorkFont;
 	const char *fontBase;
-	const char *freeFontBase;
-	const char *freeFontItalicName;
 	const char *liberationFontBase;
 };
 
diff --git a/engines/zvision/zvision.cpp b/engines/zvision/zvision.cpp
index e7a8004d7cd..0dce53ff5ba 100644
--- a/engines/zvision/zvision.cpp
+++ b/engines/zvision/zvision.cpp
@@ -263,10 +263,8 @@ Common::Error ZVision::run() {
 	// Before starting, make absolutely sure that the user has copied the needed fonts
 	for (int i = 0; i < FONT_COUNT; i++) {
 		FontStyle curFont = getSystemFont(i);
-		Common::String freeFontBoldItalic = Common::String("Bold") + curFont.freeFontItalicName;
 
 		const char *fontSuffixes[4] = { "", "bd", "i", "bi" };
-		const char *freeFontSuffixes[4] = { "", "Bold", curFont.freeFontItalicName, freeFontBoldItalic.c_str() };
 		const char *liberationFontSuffixes[4] = { "-Regular", "-Bold", "-Italic", "-BoldItalic" };
 
 		for (int j = 0; j < 4; j++) {
@@ -283,17 +281,12 @@ Common::Error ZVision::run() {
 			if (fontName == "garai.ttf")
 				fontName = "garait.ttf";
 
-			Common::String freeFontName = curFont.freeFontBase;
-			freeFontName += freeFontSuffixes[j];
-			freeFontName += ".ttf";
-
 			Common::String liberationFontName = curFont.liberationFontBase;
 			liberationFontName += liberationFontSuffixes[j];
 			liberationFontName += ".ttf";
 
 			if (!Common::File::exists(Common::Path(fontName)) && !_searchManager->hasFile(Common::Path(fontName)) &&
 				!Common::File::exists(Common::Path(liberationFontName)) && !_searchManager->hasFile(Common::Path(liberationFontName)) &&
-				!Common::File::exists(Common::Path(freeFontName)) && !_searchManager->hasFile(Common::Path(freeFontName)) &&
 				!Common::File::exists("fonts.dat") && !_searchManager->hasFile("fonts.dat")) {
 				foundAllFonts = false;
 				break;
@@ -311,10 +304,9 @@ Common::Error ZVision::run() {
 				"On Windows, you'll need the following font files from the Windows "
 				"font directory: Times New Roman, Century Schoolbook, Garamond, "
 				"Courier New and Arial. Alternatively, you can download the "
-				"Liberation Fonts or the GNU FreeFont package. You'll need all the "
-				"fonts from the font package you choose, i.e., LiberationMono, "
-				"LiberationSans and LiberationSerif, or FreeMono, FreeSans and "
-				"FreeSerif respectively."
+				"Liberation Fonts package. You'll need all the fonts from the "
+				"font package you choose, i.e., LiberationMono, LiberationSans "
+				"and LiberationSerif."
 		));
 		dialog.runModal();
 		quitGame();


Commit: 7bc77a7617825268a68857a511098b19ceafbaef
    https://github.com/scummvm/scummvm/commit/7bc77a7617825268a68857a511098b19ceafbaef
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2025-01-26T15:44:10+02:00

Commit Message:
WINTERMUTE: Use LiberationSans instead of FreeSans as a fallback

Changed paths:
    engines/wintermute/base/font/base_font_truetype.cpp


diff --git a/engines/wintermute/base/font/base_font_truetype.cpp b/engines/wintermute/base/font/base_font_truetype.cpp
index f6e6cfb2292..26b6e291d4b 100644
--- a/engines/wintermute/base/font/base_font_truetype.cpp
+++ b/engines/wintermute/base/font/base_font_truetype.cpp
@@ -578,17 +578,17 @@ bool BaseFontTT::initFont() {
 	// Handle Bold atleast for the fallback-case.
 	// TODO: Handle italic. (Needs a test-case)
 	if (_isBold) {
-		fallbackFilename = "FreeSansBold.ttf";
+		fallbackFilename = "LiberationSans-Bold.ttf";
 	} else {
-		fallbackFilename = "FreeSans.ttf";
+		fallbackFilename = "LiberationSans-Regular.ttf";
 	}
 
 	Common::SeekableReadStream *file = BaseFileManager::getEngineInstance()->openFile(_fontFile, true, false);
 	if (!file) {
 		if (Common::String(_fontFile) != "arial.ttf") {
-			warning("%s has no replacement font yet, using FreeSans for now (if available)", _fontFile);
+			warning("%s has no replacement font yet, using %s for now (if available)", _fontFile, fallbackFilename);
 		}
-		// Fallback1: Try to find FreeSans.ttf
+		// Fallback1: Try to find the LiberationSans font
 		file = SearchMan.createReadStreamForMember(fallbackFilename);
 	}
 
@@ -602,19 +602,11 @@ bool BaseFontTT::initFont() {
 		_deletableFont = Graphics::loadTTFFontFromArchive(fallbackFilename, _fontHeight, Graphics::kTTFSizeModeCharacter, 96); // Use the same dpi as WME (96 vs 72).
 		_font = _deletableFont;
 	}
-
-	// Fallback3: Try to ask FontMan for the FreeSans.ttf ScummModern.zip uses:
-	if (!_font) {
-		// Really not desirable, as we will get a font with dpi-72 then
-		Common::String fontName = Common::String::format("%s-%s@%d", fallbackFilename, "ASCII", _fontHeight);
-		warning("Looking for %s", fontName.c_str());
-		_font = FontMan.getFontByName(fontName);
-	}
 #else
 	warning("BaseFontTT::InitFont - FreeType2-support not compiled in, TTF-fonts will not be loaded");
 #endif // USE_FREETYPE2
 
-	// Fallback4: Just use the Big GUI-font. (REALLY undesirable)
+	// Fallback3: Just use the Big GUI-font. (REALLY undesirable)
 	if (!_font) {
 		_font = _fallbackFont = FontMan.getFontByUsage(Graphics::FontManager::kBigGUIFont);
 		warning("BaseFontTT::InitFont - Couldn't load font: %s", _fontFile);


Commit: 80804c06c4302081bc904897122345f8d67887f9
    https://github.com/scummvm/scummvm/commit/80804c06c4302081bc904897122345f8d67887f9
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2025-01-26T15:44:10+02:00

Commit Message:
GRAPHICS: MACGUI: Use LiberationSans instead of FreeSans as a fallback

Changed paths:
    graphics/macgui/macfontmanager.cpp


diff --git a/graphics/macgui/macfontmanager.cpp b/graphics/macgui/macfontmanager.cpp
index 943157b8465..baadbd3fa2f 100644
--- a/graphics/macgui/macfontmanager.cpp
+++ b/graphics/macgui/macfontmanager.cpp
@@ -540,7 +540,7 @@ const Font *MacFontManager::getFont(MacFont *macFont) {
 					font = Graphics::loadTTFFontFromArchive(_fontInfo[familyId]->name, macFont->getSize(), Graphics::kTTFSizeModeCharacter, 0, 0, Graphics::kTTFRenderModeMonochrome);
 					_uniFonts[macFont->getSize()] = font;
 				} else {
-					font = Graphics::loadTTFFontFromArchive("FreeSans.ttf", macFont->getSize(), Graphics::kTTFSizeModeCharacter, 0, 0, Graphics::kTTFRenderModeMonochrome);
+					font = Graphics::loadTTFFontFromArchive("LiberationSans-Regular.ttf", macFont->getSize(), Graphics::kTTFSizeModeCharacter, 0, 0, Graphics::kTTFRenderModeMonochrome);
 					_uniFonts[macFont->getSize()] = font;
 				}
 			}


Commit: c0f3bf67e650a52a828b617d04ec64816d4d5bcf
    https://github.com/scummvm/scummvm/commit/c0f3bf67e650a52a828b617d04ec64816d4d5bcf
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2025-01-26T15:44:10+02:00

Commit Message:
PETKA: Use LiberationSans instead of FreeSans

Changed paths:
    engines/petka/interfaces/save_load.cpp
    engines/petka/petka.cpp


diff --git a/engines/petka/interfaces/save_load.cpp b/engines/petka/interfaces/save_load.cpp
index 53e5f07457c..8e9ef96d2bc 100644
--- a/engines/petka/interfaces/save_load.cpp
+++ b/engines/petka/interfaces/save_load.cpp
@@ -69,7 +69,8 @@ void InterfaceSaveLoad::start(int id) {
 	Graphics::ManagedSurface surf(bmp->w, bmp->h, bmp->format);
 	surf.blitFrom(*bmp);
 
-	Common::ScopedPtr<Graphics::Font> font(Graphics::loadTTFFontFromArchive("FreeSans.ttf", 20));
+	// TODO: Which font did the original game use?
+	Common::ScopedPtr<Graphics::Font> font(Graphics::loadTTFFontFromArchive("LiberationSans-Regular.ttf", 20));
 
 	MetaEngine *metaEngine = g_engine->getMetaEngine();
 	for (int i = 0, j = _page * 6; i < 6; ++i, ++j) {
diff --git a/engines/petka/petka.cpp b/engines/petka/petka.cpp
index 14a901aa215..16061db9e35 100644
--- a/engines/petka/petka.cpp
+++ b/engines/petka/petka.cpp
@@ -98,8 +98,9 @@ Common::Error PetkaEngine::run() {
 	_vsys.reset(new VideoSystem(*this));
 	_resMgr.reset(new QManager(*this));
 
-	_textFont.reset(Graphics::loadTTFFontFromArchive("FreeSansBold.ttf", 20, Graphics::kTTFSizeModeCell));
-	_descriptionFont.reset(Graphics::loadTTFFontFromArchive("FreeSansBold.ttf", 16, Graphics::kTTFSizeModeCell));
+	// TODO: Which fonts did the original game use?
+	_textFont.reset(Graphics::loadTTFFontFromArchive("LiberationSans-Bold.ttf", 20, Graphics::kTTFSizeModeCell));
+	_descriptionFont.reset(Graphics::loadTTFFontFromArchive("LiberationSans-Bold.ttf", 16, Graphics::kTTFSizeModeCell));
 
 	loadPart(isDemo() ? 1 : 0);
 


Commit: bbacea5bfc5b348483fb6a797cce96f8a8c23b31
    https://github.com/scummvm/scummvm/commit/bbacea5bfc5b348483fb6a797cce96f8a8c23b31
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2025-01-26T15:44:10+02:00

Commit Message:
PETKA: Adjust font size for save/load dialogs

Changed paths:
    engines/petka/interfaces/save_load.cpp


diff --git a/engines/petka/interfaces/save_load.cpp b/engines/petka/interfaces/save_load.cpp
index 8e9ef96d2bc..e72475e7b0f 100644
--- a/engines/petka/interfaces/save_load.cpp
+++ b/engines/petka/interfaces/save_load.cpp
@@ -70,7 +70,7 @@ void InterfaceSaveLoad::start(int id) {
 	surf.blitFrom(*bmp);
 
 	// TODO: Which font did the original game use?
-	Common::ScopedPtr<Graphics::Font> font(Graphics::loadTTFFontFromArchive("LiberationSans-Regular.ttf", 20));
+	Common::ScopedPtr<Graphics::Font> font(Graphics::loadTTFFontFromArchive("LiberationSans-Regular.ttf", 18));
 
 	MetaEngine *metaEngine = g_engine->getMetaEngine();
 	for (int i = 0, j = _page * 6; i < 6; ++i, ++j) {


Commit: e96e39905e307b0e77a3d8ea86d2e4b89d01800c
    https://github.com/scummvm/scummvm/commit/e96e39905e307b0e77a3d8ea86d2e4b89d01800c
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2025-01-26T15:44:10+02:00

Commit Message:
PETKA: Adjust font size for texts and descriptions

Changed paths:
    engines/petka/petka.cpp


diff --git a/engines/petka/petka.cpp b/engines/petka/petka.cpp
index 16061db9e35..ea99e9e2dd5 100644
--- a/engines/petka/petka.cpp
+++ b/engines/petka/petka.cpp
@@ -99,8 +99,8 @@ Common::Error PetkaEngine::run() {
 	_resMgr.reset(new QManager(*this));
 
 	// TODO: Which fonts did the original game use?
-	_textFont.reset(Graphics::loadTTFFontFromArchive("LiberationSans-Bold.ttf", 20, Graphics::kTTFSizeModeCell));
-	_descriptionFont.reset(Graphics::loadTTFFontFromArchive("LiberationSans-Bold.ttf", 16, Graphics::kTTFSizeModeCell));
+	_textFont.reset(Graphics::loadTTFFontFromArchive("LiberationSans-Bold.ttf", 18, Graphics::kTTFSizeModeCell));
+	_descriptionFont.reset(Graphics::loadTTFFontFromArchive("LiberationSans-Bold.ttf", 14, Graphics::kTTFSizeModeCell));
 
 	loadPart(isDemo() ? 1 : 0);
 




More information about the Scummvm-git-logs mailing list