Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: FreeType 2.4.12 Features New CFF Engine

  1. #1
    Join Date
    Jan 2007
    Posts
    14,548

    Default FreeType 2.4.12 Features New CFF Engine

    Phoronix: FreeType 2.4.12 Features New CFF Engine

    Last week Adobe open-sourced their CFF rasterizer engine -- in conjunction with Google -- for use by FreeType. Now FreeType 2.4.12 has been released to ship these CFF font improvements...

    http://www.phoronix.com/vr.php?view=MTM2OTY

  2. #2
    Join Date
    Aug 2012
    Location
    Pennsylvania, United States
    Posts
    1,873

    Default

    I'm not familiar with fonts and how fonts are handled guys, so this may be a stupid question...

    When it comes to high DPI and large magnification, fonts tend to look like crap and part of the font engine's job is to make them clearer and less of an issue.... wouldn't all fonts in vector formats fix this? I know when i pull up a vector image of a program's icon vs a non-vector, I can immediately tell the difference between the two because the vector still looks good even when enlarged.

    Is there a specific reason why we don't use vectors for fonts? Or are we already using vectors for fonts and its a different issue that comes up? Or something else?

  3. #3
    Join Date
    Sep 2011
    Posts
    40

    Default

    They're already using vectors (except for bitmap fonts that are very rare).
    And actually, I see the issue much more with small font sizes. When fonts are big, they usually look very good.

  4. #4
    Join Date
    Jan 2009
    Posts
    1,329

    Default

    Quote Originally Posted by Ericg View Post
    I'm not familiar with fonts and how fonts are handled guys, so this may be a stupid question...

    When it comes to high DPI and large magnification, fonts tend to look like crap and part of the font engine's job is to make them clearer and less of an issue.... wouldn't all fonts in vector formats fix this? I know when i pull up a vector image of a program's icon vs a non-vector, I can immediately tell the difference between the two because the vector still looks good even when enlarged.

    Is there a specific reason why we don't use vectors for fonts? Or are we already using vectors for fonts and its a different issue that comes up? Or something else?
    I'm not sure this will answer your question (and I'm not an expert here) but as retina displays become the norm, font handling should become easier since you shouldn't have to alias anymore. Thus one of the big differences between font types (how they handle grid alignment and how they alias, along with hinting) should just go away.
    Most fonts are "vector" (outline by way of cff or tff/otf), by the way, but they (well, not cff, apparently) can also include bitmaps for specific difficult character/resolution combinations.
    Turn off hinting and I would expect fonts to look better in a retina situation.

  5. #5
    Join Date
    Mar 2010
    Posts
    24

    Default

    The new CFF hinting engine is fantastic. To try it out from git, do:

    Code:
    --- a/src/cff/cffobjs.c
    +++ b/src/cff/cffobjs.c
    @@ -1056,8 +1056,8 @@
     
     
         /* set default property values */
    -    driver->hinting_engine    = FT_CFF_HINTING_FREETYPE;
    -    driver->no_stem_darkening = FALSE;
    +    driver->hinting_engine    = FT_CFF_HINTING_ADOBE;
    +    driver->no_stem_darkening = TRUE;
     
         return FT_Err_Ok;
       }
    The stem darkening thing is a matter of taste but makes CFF fonts appear more saturated, making them stick out when used together with Truetype fonts, which still make up the majority of (web)fonts out there. Mind you, the new engine will only work with (manually) hinted CFF fonts (usually contained in .otf files), it will do nothing for Truetype (.ttf) or old Postscript fonts (.pfa, .pfb) like the Helvetica and Times replacements from the Ghostscript package (Nimbus Sans L, etc.), even though they do contain hints! The solution to the latter problem is to convert the PS fonts to .otf with e.g. FontForge or with an online service, follow the instructions on http://voices.yahoo.com/use-fontforg...02.html?cat=15.

    Next, instruct fontconfig as follows in .config/fontconfig/fonts.conf:

    Code:
        <match target="font">
            <test name="fontformat">
                <string>CFF</string>
            </test>
            <edit mode="assign" name="autohint">
                <bool>false</bool>
            </edit>
            <edit mode="assign" name="hinting">
                <bool>true</bool>
            </edit>
            <edit mode="assign" name="hintstyle">
                <const>hintfull</const>
            </edit>
        </match>
    Use Adobe's Source Sans Pro and Source Code Pro to test this. Play with stem darkening if you like. Bask in the glory that are beautifully hinted fonts.

  6. #6
    Join Date
    Sep 2011
    Posts
    683

    Default

    Quote Originally Posted by Ericg View Post
    I'm not familiar with fonts and how fonts are handled guys, so this may be a stupid question...

    When it comes to high DPI and large magnification, fonts tend to look like crap and part of the font engine's job is to make them clearer and less of an issue.... wouldn't all fonts in vector formats fix this? I know when i pull up a vector image of a program's icon vs a non-vector, I can immediately tell the difference between the two because the vector still looks good even when enlarged.

    Is there a specific reason why we don't use vectors for fonts? Or are we already using vectors for fonts and its a different issue that comes up? Or something else?
    If font's appear blurry or pixelated that is probably because you are zooming/scaling the font AFTER it has been rendered to the out surface.

  7. #7
    Join Date
    Feb 2013
    Posts
    275

    Default

    Quote Originally Posted by Ericg View Post
    I'm not familiar with fonts and how fonts are handled guys, so this may be a stupid question...

    When it comes to high DPI and large magnification, fonts tend to look like crap and part of the font engine's job is to make them clearer and less of an issue.... wouldn't all fonts in vector formats fix this? I know when i pull up a vector image of a program's icon vs a non-vector, I can immediately tell the difference between the two because the vector still looks good even when enlarged.

    Is there a specific reason why we don't use vectors for fonts? Or are we already using vectors for fonts and its a different issue that comes up? Or something else?
    Fonts are not supposed to look identical at all sizes. A font that looks good at 8 points won't look as good at 12 points if it is simply scaled up, regardless of how perfect the scaling is. It's an aesthetic issue, not a technical one.

    My understanding is that's why we even have hinting in the first place.

    Edit: Changed my example point sizes. 12 to 48 was a ridiculous example.
    Last edited by Serge; 05-11-2013 at 12:09 AM.

  8. #8
    Join Date
    Oct 2009
    Posts
    845

    Default

    Quote Originally Posted by mudig View Post
    Play with stem darkening if you like. Bask in the glory that are beautifully hinted fonts.
    I'm going to build this version with the CFF-enabling patch later today, I was wondering what you meant by 'play with stem darkening if you like' ?

  9. #9
    Join Date
    Mar 2010
    Posts
    24

    Default

    Quote Originally Posted by XorEaxEax View Post
    I'm going to build this version with the CFF-enabling patch later today, I was wondering what you meant by 'play with stem darkening if you like' ?
    I mean, do "driver->no_stem_darkening = TRUE;" or "driver->no_stem_darkening = FALSE;" and see what you like better.

  10. #10
    Join Date
    Oct 2009
    Posts
    845

    Default

    Quote Originally Posted by mudig View Post
    I mean, do "driver->no_stem_darkening = TRUE;" or "driver->no_stem_darkening = FALSE;" and see what you like better.
    Ah, I see now, I just tried it using the straight up patch from the release notes (ie no stem darkening) and I think it renders dark enough as it is on the fonts I've tried (same adobe fonts as you + Linux Libertine), certainly (imo) a noticeable improvement on the previous CFF rasterizer, particularly when using 'hintfull'.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •