Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-70124

QtWebEngine doesn't respect fontconfig font fallbacks

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.10.1
    • WebEngine
    • None
    • Void Linux
      LANG=ja_JP.UTF-8
    • Linux/X11

    Description

      $ fc-match
      SourceHanSans.ttc: "Source Han Sans" "Regular"
      

      QtWebEngine isn't using the font returned by fc-match. Chromium 66 works fine.

      Test page:

      data:text/html,<meta charset="utf-8" />%E3%81%82%E3%81%AE%E5%B3%B6%E3%81%8C%E5%87%BA%E6%9D%A5%E3%81%9F%E5%BD%93%E6%99%82%E3%81%AF%E3%80%81

      Source code of the test application:

      #include <QApplication>
      #include <QWebEngineView>
      
      int
      main(int argc, char **argv)
      {
              QApplication app(argc, argv);
              QWebEngineView view;
              QUrl url(argv[1]);
              view.show();
              view.load(url);
              return app.exec();
      }
      

      Adding this to the ~/.config/fontconfig/fonts.conf file seems to fix the issue:

      <match>
        <edit name="lang" mode="prepend_first" binding="strong"><string>en</string></edit>
      </match>
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt_webengine_team Qt WebEngine Team
            flan flan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes