freetypy.TT_OS2.typo_ascender

TT_OS2.typo_ascender

The typographic ascender for this font. Remember that this is not the same as TT_HoriHeader.ascender, which Apple defines in a far different manner.

The suggested usage for typo_ascender is that it be used in conjunction with TT_Header.units_per_em to compute a typographically correct default line spacing. The goal is to free applications from Macintosh or Windows-specific metrics which are constrained by backward compatibility requirements. These new metrics, when combined with the character design widths, will allow applications to lay out documents in a typographically correct and portable fashion.

For CJK (Chinese, Japanese, and Korean) fonts that are intended to be used for vertical writing (in addition to horizontal writing), the required value for typo_ascender is that which describes the top of the of the ideographic em-box. For example, if the ideographic em-box of the font extends from coordinates 0,-120 to 1000,880 (that is, a 1000x1000 box set 120 design units below the Latin baseline), then the value of typo_ascender must be set to 880. Failing to adhere to these requirements will result in incorrect vertical layout.