freetypy.TT_OS2.win_ascent

TT_OS2.win_ascent

The ascender metric for Windows. This, too, is distinct from Apple’s TT_HoriHeader.ascender value and from the typo_ascender values. win_ascent is computed as the y_max for all characters in the Windows ANSI character set. win_ascent is used to compute the Windows font height and default line spacing. For platform 3 encoding 0 fonts, it is the same as TT_Header.y_max. Windows will clip the bitmap of any portion of a glyph that appears above this value. Some applications use this value to determine default line spacing. This is strongly discouraged. The typographic ascender, descender and line gap fields in conjunction with TT_Header.units_per_em should be used for this purpose. Developers should set this field keeping the above factors in mind.

If any clipping is unacceptable, then the value should be set to TT_Header.y_max.

However, if a developer desires to provide appropriate default line spacing using this field, for those applications that continue to use this field for doing so (against OpenType recommendations), then the value should be set appropriately. In such a case, it may result in some glyph bitmaps being clipped.