[Scummvm-git-logs] scummvm master -> c6e9986e676efef5b5219ec1def75392c3faea92
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:
b8f1f64d00 GRAPHICS: Delete archive when it's not needed
c6e9986e67 VIDEO: Also try to load font from fonts.dat
Commit: b8f1f64d0018a178ec8709f31531280f7ffb0306
https://github.com/scummvm/scummvm/commit/b8f1f64d0018a178ec8709f31531280f7ffb0306
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2023-01-26T07:42:48+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: c6e9986e676efef5b5219ec1def75392c3faea92
https://github.com/scummvm/scummvm/commit/c6e9986e676efef5b5219ec1def75392c3faea92
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2023-01-26T07:42:48+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