fontbakery
fontbakery copied to clipboard
com.google.fonts/check/missing_small_caps_glyphs ERROR Failed with AttributeError: mapping
I ran make test
on my font here and got this error:
>> Check: com.google.fonts/check/missing_small_caps_glyphs
Desc: Check small caps glyphs are available.
Files: FragmentMono-Italic.ttf
ERROR Failed with AttributeError: mapping
↳ File
"/Users/weihuang/type-build-projects/fragment-mono/venv/lib/python3.10
/site-packages/fontbakery/checkrunner.py", line 194, in _exec_check
for sub_result in result: # Might raise.
↳ File
"/Users/weihuang/type-build-projects/fragment-mono/venv/lib/python3.10
/site-packages/fontbakery/profiles/googlefonts.py", line 5728, in
com_google_fonts_check_missing_small_caps_glyphs
smcp_glyphs = set(subtable.mapping.values())
↳ File
"/Users/weihuang/type-build-projects/fragment-mono/venv/lib/python3.10
/site-packages/fontTools/ttLib/tables/otBase.py", line 817, in getattr
raise AttributeError(attr)
Result: ERROR
I'm not sure what it means. I have smallcaps glyphs in 'a.sc' format.
Just following up, it's unclear what the 'mapping' error means? Is there a certain format that smallcaps glyph names have to conform to?
Hello! I get the following error during my test:
Failed with TypeError: unhashable type: 'list'
↳ File
"/Users/UT-development/Documents/_Programming/testing_environments/FMa
ke37/lib/python3.8/site-packages/fontbakery/checkrunner.py", line 183,
in _exec_check
for sub_result in result: # Might raise.
↳ File
"/Users/UT-development/Documents/_Programming/testing_environments/FMa
ke37/lib/python3.8/site-packages/fontbakery/profiles/googlefonts.py",
line 6558, in com_google_fonts_check_missing_small_caps_glyphs
smcp_glyphs = set(subtable.mapping.values())
This is because in my c2sc
code I use a one-to-many type substitution for the titlecase chars Dž, Lj, and Nj like so:
lookup LAT_dflt_smcp_Mixed {
sub Dzcaron by d.sc zcaron.sc;
sub Lj by l.sc j.alt.sc;
sub Nj by n.sc j.alt.sc;
} LAT_dflt_smcp_Mixed;
The test is designed to check only one-to-one sub. rules, which I understand and i'm probably over-engineering. I fixed the error by reverting to one-to-one type subs. because the distributor we work with were keen on us fixing it.