Announcement

Collapse
No announcement yet.

FreeType 2.7 Bringing DirectWrite/ClearType-Like Rendering -- Much Better Looking Fonts On Linux

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #51
    Qt like Skia and others disable subpixel positioning when normal or full hinting is requested, because pixel-grid hinting doesn't combine with subpixel positioning. So we need to know if face loaded by FreeType is can support subpixel positioning. Note it has to be a runtime because a toolkit might be build against a different version of FreeType than it is run with.
    Ah! Okay. Then a test for hintfull won't do. Basically, you currently don't know unless you're using hintslight. See below.

    I thought hintfull enabled subpixel rendering when available and lcd-filtering. Without subpixel rendering they are identical though.
    Full usually means FT_LOAD_TARGET_NORMAL or FT_LOAD_TARGET_LCD if subpixel rendering is enabled and that means FT renders fonts with the native hinting engine.
    • For .otfs, it is Adobe's contributed CFF engine that exclusively snaps stems vertically, no horizontal hinting and therefore subpixel positioning compatible.
    • For .pfa/bs it is an old homegrown engine that snaps on both axes, not subpixel positioning compatible. Note that .pfbs are still shipping in Linux distros: the Nimbus family in Ghostscript packages. The long term goal is to wire .pfa/bs into the Adobe engine somehow.
    • For .ttfs, it means the homegrown interpreters (v35, v38, v40) and what you get depends almost entirely on the font. If using v40 and in compatibility mode, you always get subpixel positioning compatible output, all other modes of operation and interpreter versions are more or less unpredictable unless you know the typeface. I don't think there is currently a way to get at the compatibility flag thing from the outside or even detect if a font hints to full pixels horizontally. As I understand it, the interpreter itself signals to the typeface that subpixel positioning is desired but the typeface program has to honor the flag. v40 and compatibility mode enforce the flag by subversion.

    Hintslight usually translates to FT_LOAD_TARGET_LIGHT, which triggers the native CFF engine for .otfs (unless the user enforces the old FT CFF engine?) and the autohinter for everything else. It so far guarantees that you get subpixel positioning compatible output because there is never any horizontal hinting.

    I'll have to think about if a CAN_SUBPIXEL_POSITION flag test thing could be implemented.

    Note: Chrome and Chromium doesn't support hintmedium and will fall down to hintslight when it is configured as default.
    Good to know.
    Last edited by mudig; 19 July 2016, 05:24 PM.

    Comment


    • #52
      Originally posted by Evil Penguin View Post
      So... Fedora shouldn't have an issue implementing this?
      dnf install freetype-freeworld

      Comment


      • #53
        How would you enable v40 on Ubuntu 16.04 with this PPA: https://launchpad.net/~no1wantdthisn...ive/ubuntu/ppa ?

        Would installing the PPA be enough?

        Comment

        Working...
        X