Win Ascent / Win Descent

Another area in which I found that the fonts are set differently.
In some cases, the Win Ascent and Win Descent fields reproduce the same value as Ascent and Typo Descent. In other cases (it seems to me more numerous) they are set according to the maximum height of the absolute highest glyphs (eg, capital letters with various diacritics above etc.).
What is the best solution?

Comments

  • Paul Miller
    Paul Miller Posts: 273
    edited May 2019
    These two numbers represent different things but they may have the same numeric values.
    Typo Ascent and Descent are meant as a guide for designing glyphs, it is the nominal height to which the ascenders and descenders go.
    The Win Ascent and Win Descent fields are the limits of the rendering of the character in the Windows operating system.  Any parts of the character up to these limits are rendered. Rendering will stop beyond these limits, usually with a small margin for error but rendering is only gauranteed up to these limits.
    Win Ascent and Win Descent values are usualy set a bit larger than the Typo Ascent and Descent because they have to leave a gap for the diacritic marks which may occur above upper case characters.
  • Yes, I saw the can have or not the same values, as I said in my first post. But which are the advantages and disadvantages of the two strategies?
  • Thomas Phinney
    Thomas Phinney Posts: 2,883
    It’s complicated.

    If you make the usWinAscent & usWinDescent lower than the “correct” values, the affected glyphs will get clipped when rendered in some classic Windows apps.

    If you make the Typo values larger to match the Win values, it will affect some more savvy apps and cause them to position the text a bit worse. For example, the offset at the top of a text box might be too large.

    If you make the Win and Typo values different from each other, it can cause some differences between web browsers that are highly undesirable in a web font.

    (I am simplifying a little here, ignoring the Mac vertical metrics because you didn’t ask about them, and ignoring line spacing. But that is a start.)
  • I've not a Mac, so I can't test directly on it.
    «If you make the Win and Typo values different from each other, it can cause some differences between web browsers» : so, do you suggest it's more convenient to set them to the same size?
    Actually, I've the following settings: