stipub / stixfonts

OpenType Unicode fonts for Scientific, Technical, and Mathematical texts
SIL Open Font License 1.1
730 stars 41 forks source link

Fail and Warns reported for Static fonts #175

Closed vv-monsalve closed 3 years ago

vv-monsalve commented 3 years ago

These are the main Fails and Warns reported from checks performed on files pulled at commit 9192a17.

🔥 FAIL: PPEM must be an integer on hinted fonts. * [com.google.fonts/check/integer_ppem_if_hinted](https://font-bakery.readthedocs.io/en/latest/fontbakery/profiles/googlefonts.html#com.google.fonts/check/integer_ppem_if_hinted)
--- Rationale ---

Hinted fonts must have head table flag bit 3 set.

Per https://docs.microsoft.com/en-us/typography/opentype/spec/head, bit 3 of
Head::flags decides whether PPEM should be rounded. This bit should always be
set for hinted fonts.

Note:
Bit 3 = Force ppem to integer values for all internal scaler math;
        May use fractional ppem sizes if this bit is clear;

* 🔥 **FAIL** This is a hinted font, so it must have bit 3 set on the flags of the head table, so that PPEM values will be rounded into an integer value. This can be accomplished by using the 'gftools fix-hinting' command. # create virtualenvpython3 -m venv venv # activate virtualenvsource venv/bin/activate # install gftoolspip install git+https://www.github.com/googlefonts/tools [code: bad-flags]
vv-monsalve commented 3 years ago

As in every Warn the idea is to inspect what is reported against the listed glyphs and validate whether everything is working as expected for the font, or if there is an error indeed.

The following Warn is reported for all the static fonts.

âš  WARN: Check mark characters are in GDEF mark glyph class * [com.google.fonts/check/gdef_mark_chars](https://font-bakery.readthedocs.io/en/latest/fontbakery/profiles/gdef.html#com.google.fonts/check/gdef_mark_chars)
--- Rationale ---

Mark characters should be in the GDEF mark glyph class.

* âš  **WARN** The following mark characters could be in the GDEF mark glyph class: U+035C, U+0360, U+0361, U+0362, U+20D2, U+20DD, U+20DE, U+20DF, U+20E4, U+20E5, U+20E6, U+20E7, U+20EA and U+20EB [code: mark-chars]
vv-monsalve commented 3 years ago

The following Warn was reported for Medium and MediumItalic fonts

âš  WARN: Checking with ots-sanitize. * [com.google.fonts/check/ots](https://font-bakery.readthedocs.io/en/latest/fontbakery/profiles/universal.html#com.google.fonts/check/ots) * âš  **WARN** ots-sanitize passed this file, however warnings were printed: WARNING: hhea: bad caret offset: -50
khaledhosny commented 3 years ago

WARNING: hhea: bad caret offset: -50

This message is a bit obscure (it will be better in next OTS), but what is actually complaining about is that italic bit is not set in head.macStyle while hhea.caretOffset is not zero.

tiroj commented 3 years ago
  • âš  WARN The following mark characters could be in the GDEF mark glyph class: U+035C, U+0360, U+0361, U+0362, U+20D2, U+20DD, U+20DE, U+20DF, U+20E4, U+20E5, U+20E6, U+20E7, U+20EA and U+20EB [code: mark-chars]

Checked. By design: these characters do not behave as marks for OTL purposes, so are not classed as marks in GDEF.

tiroj commented 3 years ago

This message is a bit obscure (it will be better in next OTS), but what is actually complaining about is that italic bit is not set in head.macStyle while hhea.caretOffset is not zero.

I'm trying to figure out whether there is something I need/can do to address this. The VFJ source contains all the usual settings to indicate the fonts are italic. What part of the build process is responsible for setting the head.macStyle?

tiroj commented 3 years ago

FAIL: PPEM must be an integer on hinted fonts.

@khaledhosny Can we incorporate a fix for this into the build process?

khaledhosny commented 3 years ago

I'm trying to figure out whether there is something I need/can do to address this. The VFJ source contains all the usual settings to indicate the fonts are italic. What part of the build process is responsible for setting the head.macStyle?

ufo2ft sets this based on name ID 2, but the interpolated UFO instances generated by fontmake don’t have the name ID set which I fix when post-processing the final files, so I need to set the head.macStyle bit there too.