What is 'function 6 in FPGM' in FontForge?

user9812
user9812 Posts: 7
edited December 2022 in Font Technology
I'm trying to follow the process of hinting font in FontForge, described here: https://github.com/fontforge/fontforge/wiki/How-TT-Hinting-Works

Inside the 'very basic hinting' section is a list of errors that may occur, with a suggestion on how to fix each. I'm looking at point 4: 'Stems aren't aligned to pixel grid! (this problem is visible only in antialiased mode)'. Setting function 6 to always return 0 is suggsted. Problem is, I don't know what that is referring to or how to set it to always equal 0. There is literally no other reference to function 6 that I can find that provides more information.

Does anyone know what 'function 6 in FPGM' is and how to modify it?
Tagged:

Comments

  • I don't particularly want to read that doc to that detail (I'll leave that to the fontforge people lurking here) so I'll just guess.The truetype spec allows font developers to create user-defined re-usable subroutines, numbered 0-255 I think, and stored in the FPGM table. The instruction to create one is FDEF (short for "function definition").

    In hand-waving pseudo code, you do something like

    FDEF 6 {
    return 0;
    }