diff options
author | Jaromir Wysoglad | 2019-07-17 23:51:58 +0200 |
---|---|---|
committer | Filippos Karapetis | 2019-09-01 22:47:55 +0300 |
commit | ce64528129d4a1ba51e339bd8be3548c4d8cc3bf (patch) | |
tree | a16ca7f095685ea95ea4ffa5c845db0f45ce9e46 /gui/ThemeEngine.cpp | |
parent | 33f8aadfeb81ead60ce1264f0af681dcdbd4931f (diff) | |
download | scummvm-rg350-ce64528129d4a1ba51e339bd8be3548c4d8cc3bf.tar.gz scummvm-rg350-ce64528129d4a1ba51e339bd8be3548c4d8cc3bf.tar.bz2 scummvm-rg350-ce64528129d4a1ba51e339bd8be3548c4d8cc3bf.zip |
TTS: Make sure that TTS lang matches transMan lang
Diffstat (limited to 'gui/ThemeEngine.cpp')
-rw-r--r-- | gui/ThemeEngine.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 598d9c2ab8..dd074ccef3 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -530,7 +530,12 @@ bool ThemeEngine::addFont(TextData textId, const Common::String &file, const Com error("Couldn't load font '%s'/'%s'", file.c_str(), scalableFile.c_str()); #ifdef USE_TRANSLATION TransMan.setLanguage("C"); -#endif +#ifdef USE_TTS + Common::TextToSpeechManager *ttsMan; + if ((ttsMan = g_system->getTextToSpeechManager()) != nullptr) + ttsMan->setLanguage("en"); +#endif // USE_TTS +#endif // USE_TRANSLATION return false; // fall-back attempt failed } // Success in fall-back attempt to standard (non-localized) font. @@ -538,7 +543,12 @@ bool ThemeEngine::addFont(TextData textId, const Common::String &file, const Com // FIXME If we return false anyway why would we attempt the fall-back in the first place? #ifdef USE_TRANSLATION TransMan.setLanguage("C"); -#endif +#ifdef USE_TTS + Common::TextToSpeechManager *ttsMan; + if ((ttsMan = g_system->getTextToSpeechManager()) != nullptr) + ttsMan->setLanguage("en"); +#endif // USE_TTS +#endif // USE_TRANSLATION // Returning true here, would allow falling back to standard fonts for the missing ones, // but that leads to "garbage" glyphs being displayed on screen for non-Latin languages return false; |