[Scummvm-git-logs] scummvm branch-2-7 -> 5ae74e04e55631b066c614ca04d5632bacebc24b
lephilousophe
noreply at scummvm.org
Thu Jan 26 06:43:47 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:
62ece2ca5f GRAPHICS: Delete archive when it's not needed
5ae74e04e5 VIDEO: Also try to load font from fonts.dat
Commit: 62ece2ca5f7c85d3b6b16bad2d5783162879b5be
https://github.com/scummvm/scummvm/commit/62ece2ca5f7c85d3b6b16bad2d5783162879b5be
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2023-01-26T07:41:25+01:00
Commit Message:
GRAPHICS: Delete archive when it's not needed
Changed paths:
graphics/fonts/ttf.cpp
diff --git a/graphics/fonts/ttf.cpp b/graphics/fonts/ttf.cpp
index 115acd741b3..d54d8768f87 100644
--- a/graphics/fonts/ttf.cpp
+++ b/graphics/fonts/ttf.cpp
@@ -906,6 +906,7 @@ Font *loadTTFFontFromArchive(const Common::String &filename, int size, TTFSizeMo
Common::File f;
if (!f.open(filename, *archive)) {
+ delete archive;
return nullptr;
}
Commit: 5ae74e04e55631b066c614ca04d5632bacebc24b
https://github.com/scummvm/scummvm/commit/5ae74e04e55631b066c614ca04d5632bacebc24b
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2023-01-26T07:41:25+01:00
Commit Message:
VIDEO: Also try to load font from fonts.dat
This what is expected for now anyway
Changed paths:
video/subtitles.cpp
diff --git a/video/subtitles.cpp b/video/subtitles.cpp
index 05bc780d44e..91007387974 100644
--- a/video/subtitles.cpp
+++ b/video/subtitles.cpp
@@ -249,10 +249,14 @@ void Subtitles::setFont(const char *fontname, int height) {
if (file.open(fontname)) {
_font = Graphics::loadTTFFont(file, _fontHeight, Graphics::kTTFSizeModeCharacter, 96);
}
+
+ if (!_font) {
+ _font = Graphics::loadTTFFontFromArchive(fontname, _fontHeight, Graphics::kTTFSizeModeCharacter, 96);
+ }
#endif
if (!_font) {
- warning("Cannot load font %s directly", fontname);
+ debug(1, "Cannot load font %s directly", fontname);
_font = FontMan.getFontByName(fontname);
}
More information about the Scummvm-git-logs
mailing list