Bold text disappears when changing translation and default font



  • I am trying to change the language translations dynamically, using something like:

    @
    if (lang == "en")
    {
    if (translator)
    app->removeTranslator(translator);
    }
    else
    {
    translator->load(lang, "/translations");
    app->installTranslator(translator);
    QCoreApplication::installTranslator(translator);
    }

    if (lang == "ja")
    {
    QApplication::setFont(QFont("japanese"));
    }
    else
    {
    QApplication::setFont(defaultFont);
    }
    @

    This works well enough except when changing the default font to Japanese all of the text with font.bold disappears until the QML is reloaded.

    Is there something additional that needs to happen to change the default font for bold or something?



  • This only seems to happen with the Japanese prerendered font bundled with Qt. Other TTF works okay.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.