Options

Ghost hints size: 20, 21, -20, -21 or what?

Adobe Type 1 Specs, page 57:
These so-called “ghost” stems must be created with a stem height of 20 or 21—either is acceptable. They must describe a y coordinate range that is inside the y coordinate range of the character, not above a top nor below a bottom.
David Lemon: Basic Type 1 Hinting:
First, they have a negative value (thus represented in Fontographer as going from the top down instead of from the bottom up, or from right to left instead of left to right), and second, they use a value of exactly 20 units (at the tops or rights of features) or 21 units (at the bottoms or lefts). This is the main reason to pay attention to hint direction; with the wrong direction, stems that aren’t ghost hints will be treated as if they were (if they happen to have the expected weight), and intended ghost hints may be treated like regular stems.
As far as I can see, the Type 1 Specs say nothing about negative values. Also, they say nothing about where to use 20 and where to use 21. It just says that ‘either is acceptable’. Taking a sneak peek into MyriadPro-Regular.otf, I can confirm that in this font (at least in the capital I), ghost hints are set the way Lemon describes it:

Uppercase I extends from 0 to 674
Base 674 Size -20 (top ghost hint)
Base 21 Size -21 (bottom ghost hint)

Is this the way it must be done? Where is this documented (officially)?
Can ghost hints be positive as well?
And what about left and right ghost hints?

Comments

  • Options
    John HudsonJohn Hudson Posts: 2,977
    David Lemon's description is correct 'best practice' with regard to where to use -20 and where to use -21. I think the old Type 1 spec was imprecise or incomplete in this respect: it was technically correct that either value was acceptable, i.e. would be interpreted by the rasteriser as a ghost hint, but if you are consistent in using -20 for tops and -21 for bottoms then the rasteriser can do a better job with them.

    As to the ghost hints being negative values, I think originally, when the spec was published, this wasn't a requirement, and Adobe figured that a ghost hint and an actual y direction stem hint of 20 or 21 units were not significantly different. Later they decided to standardise ghost hints as negative values.

    Remember, the published Type 1 spec is now almost quarter of a century old, and represents the technology of fonts and rasterisers as it was in the late 1980s. As for 'official' documentation on how to hint PS fonts, David's lecture on the subject is about as official as it ever got. As I recall, it dates from 1996, and was first presented at the ATypI conference in The Hague that year. I remember a room full of independent font developers taking notes: even then the Type 1 spec was understood to be lacking.

    As for left/right ghost hints, so far as I know they don't exist, although I wouldn't be entirely surprised to discover that Adobe experimented with them and that some PS rasterisers might do something with them.
  • Options
    What John said. If David's comments are more specific than the spec, I would trust his comments.
Sign In or Register to comment.