googlefonts / shaperglot

Test font files for language support
Apache License 2.0
29 stars 4 forks source link

Output contains unnecessary messages triggered by already-reported problems #63

Closed bobh0303 closed 2 months ago

bobh0303 commented 2 months ago

When font is missing a character needed for a particular language, one output message is sufficient. Subsequent tests that depend on that character needn't be run.

Example:

Font does not fully support language 'ur_Arab'
 * FAIL: Some base glyphs were missing: ٹ, چ, ڈ, ڑ, ھ, ہ
 * FAIL: Shaper produced a .notdef
 * FAIL: .fina version of ARABIC LETTER TTEH; both buffers returned .notdef=1+1033|space=0+0
 * FAIL: .medi version of ARABIC LETTER TTEH; both buffers returned space=1+0|.notdef=1+1033|space=0+0
 * FAIL: .init version of ARABIC LETTER TTEH; both buffers returned space=0+0|.notdef=0+1033
 * FAIL: .fina version of ARABIC LETTER TCHEH; both buffers returned .notdef=1+1033|space=0+0
 * FAIL: .medi version of ARABIC LETTER TCHEH; both buffers returned space=1+0|.notdef=1+1033|space=0+0
 * FAIL: .init version of ARABIC LETTER TCHEH; both buffers returned space=0+0|.notdef=0+1033
 * FAIL: .fina version of ARABIC LETTER DDAL; both buffers returned .notdef=1+1033|space=0+0
 * FAIL: .fina version of ARABIC LETTER RREH; both buffers returned .notdef=1+1033|space=0+0
 * FAIL: .fina version of ARABIC LETTER HEH GOAL; both buffers returned .notdef=1+1033|space=0+0
 * FAIL: .medi version of ARABIC LETTER HEH GOAL; both buffers returned space=1+0|.notdef=1+1033|space=0+0
 * FAIL: .init version of ARABIC LETTER HEH GOAL; both buffers returned space=0+0|.notdef=0+1033
 * FAIL: .fina version of ARABIC LETTER HEH DOACHASHMEE; both buffers returned .notdef=1+1033|space=0+0
 * FAIL: .medi version of ARABIC LETTER HEH DOACHASHMEE; both buffers returned space=1+0|.notdef=1+1033|space=0+0
 * FAIL: .init version of ARABIC LETTER HEH DOACHASHMEE; both buffers returned space=0+0|.notdef=0+1033

Only the first Fail is needed — all the rest are redundant.

Test info:

Command: shaperglot check Alkalami-Regular.ttf ur_Arab Font download: https://software.sil.org/alkalami/download/

System info:

Python 3.10.12 shaperglot: 0.5.0 Ubuntu: 22:04

Replaces fonttools/fontbakery#4654

bobh0303 commented 2 months ago

For fa_Arab I get other kinds of messages related to previously reported missing base chars:

Font does not fully support language 'fa_Arab'
 * FAIL: Some base glyphs were missing: چ
 * FAIL: Shaper produced a .notdef
 * FAIL: .fina version of ARABIC LETTER TCHEH; both buffers returned .notdef=1+1033|space=0+0
 * FAIL: Shaper didn't attach uni064B to None
 * FAIL: Shaper produced a .notdef
 * FAIL: Shaper didn't attach uni064D to None
 * FAIL: Shaper produced a .notdef
 * FAIL: Shaper didn't attach uni064C to None
 * FAIL: Shaper produced a .notdef
 * FAIL: Shaper didn't attach uni0651 to None
 * FAIL: Shaper produced a .notdef
 * FAIL: Shaper didn't attach uni0654 to None
 * FAIL: Shaper produced a .notdef
...
simoncozens commented 2 months ago

Thanks for re-filing this here; I'll work on it.