-
Notifications
You must be signed in to change notification settings - Fork 16
opentype__monospace
- Applies to: TTF
- Fontspector can hotfix?: no
- Fontspector can fix sources?: no
There are various metadata in the OpenType spec to specify if a font is monospaced or not. If the font is not truly monospaced, then no monospaced metadata should be set (as sometimes they mistakenly are...)
Requirements for monospace fonts:
-
post.isFixedPitch - "Set to 0 if the font is proportionally spaced, non-zero if the font is not proportionally spaced (monospaced)" (https://www.microsoft.com/typography/otspec/post.htm)
-
hhea.advanceWidthMax must be correct, meaning no glyph's width value is greater. (https://www.microsoft.com/typography/otspec/hhea.htm)
-
OS/2.panose.bProportion must be set to 9 (monospace) on latin text fonts.
-
OS/2.panose.bSpacing must be set to 3 (monospace) on latin hand written or latin symbol fonts.
-
Spec says: "The PANOSE definition contains ten digits each of which currently describes up to sixteen variations. Windows uses bFamilyType, bSerifStyle and bProportion in the font mapper to determine family type. It also uses bProportion to determine if the font is monospaced." (https://www.microsoft.com/typography/otspec/os2.htm#pan https://monotypecom-test.monotype.de/services/pan2)
-
OS/2.xAvgCharWidth must be set accurately. "OS/2.xAvgCharWidth is used when rendering monospaced fonts, at least by Windows GDI" (http://typedrawers.com/discussion/comment/15397/#Comment_15397)
Also we should report an error for glyphs not of average width.
Please also note:
Thomas Phinney told us that a few years ago (as of December 2019), if you gave a font a monospace flag in Panose, Microsoft Word would ignore the actual advance widths and treat it as monospaced.
Source: https://typedrawers.com/discussion/comment/45140/#Comment_45140
-
opentype (in section 'Opentype Specification Checks')
-
universal (in section 'Opentype Specification Checks')
-
googlefonts (in section 'Opentype Specification Checks')