googlefonts / fontmake

Compile fonts from sources (UFO, Glyphs) to binary (OpenType, TrueType).
Apache License 2.0
789 stars 94 forks source link

Anchors issue - related to 'Shapes languages in all GF glyphsets' fb check #1137

Open emmamarichal opened 3 days ago

emmamarichal commented 3 days ago

Hello!

cc @simoncozens @vv-monsalve I post the issue here, since I have the same result with gftools builder, but a different one by exporting from Glyphs.

This concern the fail: 🔥 FAIL Shapes languages in all GF glyphsets.

When I export the font from Glyphs, this is the list I got:

🔥 FAIL Shapes languages in all GF glyphsets.
* 🔥 **FAIL**

GF_Phonetics_SinoExt glyphset:

FAIL messages Languages
The locl feature did not affect Eng bm_Latn (Bambara), dyu_Latn (Dyula), ig_Latn (Igbo), lg_Latn (Ganda), mua_Latn (Mundang), bqv_Latn (Koro Wachi), lia_Latn (Limba, West-Central), gng_Latn (Ngangam), kyf_Latn (Kouya), bsc_Latn (Bassari) and 241 more.
Shaper didn't attach uni0328.case to uni018F gkp_Latn (Kpelle, Guinea), gkp_Latn (Kpelle, Guinea), gkp_Latn (Kpelle, Guinea), gkp_Latn (Kpelle, Guinea), gkp_Latn (Kpelle, Guinea) and gkp_Latn (Kpelle, Guinea)
Shaper didn't attach uni0328 to uni025B gkp_Latn (Kpelle, Guinea), gkp_Latn (Kpelle, Guinea) and gkp_Latn (Kpelle, Guinea)
Shaper didn't attach uni0328.case to uni0190 gkp_Latn (Kpelle, Guinea), gkp_Latn (Kpelle, Guinea), gkp_Latn (Kpelle, Guinea), gkp_Latn (Kpelle, Guinea), gkp_Latn (Kpelle, Guinea) and gkp_Latn (Kpelle, Guinea)
Shaper didn't attach uni0328 to uni0254 gkp_Latn (Kpelle, Guinea), gkp_Latn (Kpelle, Guinea) and gkp_Latn (Kpelle, Guinea)
Shaper didn't attach uni0328.case to uni0186 gkp_Latn (Kpelle, Guinea), gkp_Latn (Kpelle, Guinea), gkp_Latn (Kpelle, Guinea), gkp_Latn (Kpelle, Guinea), gkp_Latn (Kpelle, Guinea) and gkp_Latn (Kpelle, Guinea)
Shaper didn't attach uni0328.smcp to uni0259.smcp gkp_Latn (Kpelle, Guinea), gkp_Latn (Kpelle, Guinea) and gkp_Latn (Kpelle, Guinea)
Shaper didn't attach uni0328.smcp to uni025B.smcp gkp_Latn (Kpelle, Guinea), gkp_Latn (Kpelle, Guinea) and gkp_Latn (Kpelle, Guinea)
Shaper didn't attach uni0328.smcp to uni0254.smcp gkp_Latn (Kpelle, Guinea), gkp_Latn (Kpelle, Guinea) and gkp_Latn (Kpelle, Guinea)
Shaper didn't attach acutecomb.smcp to uni028A.smcp tcd_Latn (Tafi) and blo_Latn (Anii)
Shaper didn't attach tildecomb.smcp to uni028A.smcp tcd_Latn (Tafi), tcd_Latn (Tafi), tcd_Latn (Tafi) and biv_Latn (Birifor, Southern)
Shaper didn't attach uni0304.smcp to uni028A.smcp tcd_Latn (Tafi)
Shaper didn't attach uni030C.smcp to uni028A.smcp tcd_Latn (Tafi)
Requires Small-cap: ǰ; both buffers returned uni01F0=0+432 taq_Latn (Tamasheq, Latin) and ttq_Latn (Tawallammat Tamajaq)
Requires Small-cap: ẖ; both buffers returned uni1E96.varAlt01=0+758 udu_Latn (Uduk)
Shaper didn't attach gravecomb.smcp to uni028A.smcp blo_Latn (Anii)
Shaper didn't attach uni0302.smcp to uni028A.smcp blo_Latn (Anii)
The locl feature did not affect uni028B tod_Latn (Toma)
Requires Small-cap: ɪ; both buffers returned uni026A=0+442 kzc_Latn (Bondoukou Kulango)
Requires Small-cap: ʘ; both buffers returned uni0298=0+776 ngh_Latn (Nǁng)
Requires Small-cap: ꟈ; both buffers returned uniA7C8=0+692 mor_Latn (Moro)
Some mark glyphs were missing: ◌̛ vi_Latn (Vietnamese)
[code: failed-language-shaping] * ⚠️ **WARN**

GF_Phonetics_SinoExt glyphset:

WARN messages Languages
No exemplar glyphs were defined for language Mina hna_Latn (Mina)
No exemplar glyphs were defined for language Amo amo_Latn (Amo)
No variant glyphs were found for uni01A9 gaa_Latn (Ga)
No variant glyphs were found for uni01B7 gaa_Latn (Ga)
No exemplar glyphs were defined for language Eastern Gurung, Latin ggn_Latn (Eastern Gurung, Latin)
No exemplar glyphs were defined for language Mbunga mgy_Latn (Mbunga)
No variant glyphs were found for uni0181 dnj_Latn (Dan)
No variant glyphs were found for uni01B2 tod_Latn (Toma)
No exemplar glyphs were defined for language Koro kfo_Latn (Koro)
No exemplar glyphs were defined for language Seki syi_Latn (Seki)
No exemplar glyphs were defined for language Atsam cch_Latn (Atsam)
[code: warning-language-shaping]

But, when exporting with fontmake or gftools builder, I got a very long list I can't even copy/paste here. -> report.md.zip

The file has some complex anchors like this, but even if I simplify them, it doesn't solve the fail.

Image

Here you can find:

simoncozens commented 3 days ago

This looks like a bug in the font sources.

When we compile a font we have some features - kern, dist, mark, mkmk, abvm, blwm - which are not normally written explicitly as feature code. Normally, we generate these features from the kerning tables and anchors in the font sources. So the question is, what happens if you want the attachment rules from the anchors and you want to write your own attachment rules?

The way ufo2ft/fontmake works is that if you provide your own "manual" feature code for any of these features, this is used instead of the automatically generated code. If you want to use both the data from the anchors in the glyphs and also manual feature code, you need to ask for it. So in your kern, mark and mkmk features, write this:

# Automatic Code Start

e.g. in mark:

# Automatic Code Start

pos @afrcNumerators' lookup MARK_LKP_1 @afrcBars @afrcDenominators @afrcDenominators @afrcDenominators @afrcDenominators @afrcDenominators @afrcDenominators @afrcDenominators @afrcDenominators @afrcDenominators @afrcDenominators;

This will tell fontmake where to place the automatically generated rules. (Because you might want the automatic rules before or after your manual rules.)

emmamarichal commented 3 days ago

@simoncozens Ok I see, thank you! I'll try this 👌