Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    QWebView can't render unicode font on windows xp

    General and Desktop
    qwebview font font family
    1
    1
    904
    Loading More Posts
    • 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.
    • Giorgi
      Giorgi last edited by

      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 Reply Quote 0
      • First post
        Last post