googlefonts / fontdiff

tool for finding visual differences between two font versions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hinting changes in CFF

jenskutilek opened this issue · comments

Is there anything special I need to do to detect hinting changes in OpenType-CFF fonts?

I have two versions of a font with differences that are due to a change in the BlueFuzz value, which are clearly visible in DirectWrite and Adobe InDesign rendering. Yet fontdiff sees the fonts as identical.

I expected the FreeType CFF rasterizer to show these differences, as InDesign does show them.

Does anyone know the answer to this question?

fontdiff seems to be loading fonts without hinting:

https://github.com/googlei18n/fontdiff/blob/2c226d5d2b5eccd070d6aa53e2c19152fbfa7929/src/fontdiff/font.cc#L109-L112

https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#FT_LOAD_NO_HINTING

I guess it could be possible to add an option to enable/disable the hinting by passing a different FT_LOAD_* flag.

Should we always use hinting, so that the tool stays simple to use?

maybe use the same default that freetypes uses. but it would indeed be very useful to be able to render with, e.g., forced-runtime-autohinting mode, no hinting, different rendering modes (LCD, greyscale), etc.

you could even read from an environment variable, if it's present.

I believe that FreeType permits renders with builtin autohinter only (forced) as well as with font specified hinting as default when specified. It would be helpful to us to be able to view the latter.

Werner has this mapped to the following options in his ftgrid tool (part of the FreeType2 demos source):

r4n2b-image

This source may point to an approach for implementation if it is something that you are interested in supporting here.