VIDEO: Also try to load font from fonts.dat

This what is expected for now anyway
This commit is contained in:
Le Philousophe 2023-01-25 22:48:36 +01:00
parent 62ece2ca5f
commit 5ae74e04e5

View file

@ -249,10 +249,14 @@ void Subtitles::setFont(const char *fontname, int height) {
if (file.open(fontname)) { if (file.open(fontname)) {
_font = Graphics::loadTTFFont(file, _fontHeight, Graphics::kTTFSizeModeCharacter, 96); _font = Graphics::loadTTFFont(file, _fontHeight, Graphics::kTTFSizeModeCharacter, 96);
} }
if (!_font) {
_font = Graphics::loadTTFFontFromArchive(fontname, _fontHeight, Graphics::kTTFSizeModeCharacter, 96);
}
#endif #endif
if (!_font) { if (!_font) {
warning("Cannot load font %s directly", fontname); debug(1, "Cannot load font %s directly", fontname);
_font = FontMan.getFontByName(fontname); _font = FontMan.getFontByName(fontname);
} }