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

cross-platform support for FontConfig

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P4: Low
    • None
    • None
    • GUI: Font handling
    • None
    • macOS, Windows

    Description

      The QPA plugins for both Mac and MS Windows provide the option to use the FreeType font engine, but neither platform currently allows to combine this with the FontConfig system for customised (= optimised) font rendering.

      To cite a post on the Development ML - not mine but my point exactly:

       

      It's painful to have to make pixel adjustments on each platform because they don't render fonts exactly the same everywhere. Besides, fontconfig with infinality patches honestly gives a beautiful rendering, crispier and yet fuller than everything you can see on othe OSes in my taste.

       

      Once one has patched the QtBase build system (and a source file or two) to allow the use of FontConfig on Mac it is rather trivial to use `QFontconfigDatabase` instead of `QCoreTextDatabase` in the Cocoa QPA. It would have been preferable if FontConfig could be used as an option to the FreeType font engine but this works too, well enough as a PoC.

       

      A side-by-side comparison, left CoreText, right FontConfig+FreeType with the Infinality-Ultimate patches (and a font smoothing gamma of 0.9)

       

      another comparison, both using FontConfig+FreeType with the Infinality-Ultimate patches (and the QtCurve widget style). Left X11/XCB, right Cocoa:

       

       

      Attachments

        1. coretext-vs-fontconfigFT.png
          coretext-vs-fontconfigFT.png
          211 kB
        2. CT-FT-FC-XCB.png
          CT-FT-FC-XCB.png
          202 kB
        3. CT-FT-FC-XCB-2.png
          CT-FT-FC-XCB-2.png
          210 kB
        4. xcb-vs-cocoa.png
          xcb-vs-cocoa.png
          192 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            rjvbertin René Bertin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes