Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QWebView can't render unicode font on windows xp
Qt 6.11 is out! See what's new in the release blog

QWebView can't render unicode font on windows xp

Scheduled Pinned Locked Moved General and Desktop
qwebviewfontfont family
1 Posts 1 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • GiorgiG Offline
    GiorgiG Offline
    Giorgi
    wrote on last edited by
    #1

    I have problem with QWebView. I wrote small app which renders web application. I have font(unicode) problem. On my windows 7 it renders correct font, but on windows xp(virtual machine) doesn't render font.

    this is my code:

    //QFontDatabase::addApplicationFont(":/fonts/files/acadnusx.ttf");
    
    QFontDatabase database;
    foreach (const QString &family, database.families()) {
        qDebug() << family;
    }
    
    QWebSettings *settings = ui->webView->settings();
    //settings->clearMemoryCaches();
    //settings->setFontFamily(QWebSettings::StandardFont, "acadnusx");
    //settings->setFontSize(QWebSettings::DefaultFontSize, 12);
    settings->setDefaultTextEncoding("utf-8");
    

    I listed QFontDatabase fonts and On Windows xp some fonts are missing. How my question is: how detect which fonts uses web view on my windows xp and than add that font to QFontDatabase to render this font in windows xp(or another platform)

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved