feature smcp {<br>script DFLT ;<br> language dflt ;<br> lookup smallcaps_decompose_accents_lc;<br> lookup smallcaps_0;<br>script latn ;<br> language dflt ;<br> lookup smallcaps_decompose_accents_lc;<br> lookup smallcaps_0;<br>script latn ;<br> language CAT ;<br> lookup smallcaps_decompose_accents_lc;<br> lookup smallcaps_0;<br> lookup smallcaps_CAT;<br>script latn ;<br> language NLD ;<br> lookup smallcaps_decompose_accents_lc;<br> lookup smallcaps_0;<br>script latn ;<br> language TRK ;<br> lookup smallcaps_decompose_accents_lc;<br> lookup smallcaps_0;<br> lookup smallcaps_TRK;<br>} smcp;In other words, specify (repeat) the general/common lookups for every language I want to also have language-specific lookups for. I've been doing it this way since forever, so today I got around to rigging up a Python script to speed things up and rule out omissions... I kind of made up my own syntax inspired by CSS preprocessors. Only to discover what I invented is already described in the standard!
languagesystem DFLT dflt ;<br>languagesystem latn dflt ;<br>languagesystem latn CAT ; <br>languagesystem latn NLD ; <br>languagesystem latn TRK ; <br><br>feature smcp {<br> lookup smallcaps_decompose_accents_lc;<br> lookup smallcaps_0;<br>script latn;<br> language dflt ; <br> language NLD ; <br> <b>language TRK exclude_dflt;</b><br> lookup smallcaps_TRK;<br> language CAT include_dflt;<br> lookup smallcaps_CAT;<br>} smcp;I expected (having just read the docs) that language TRK will employ only the smallcaps_TRK lookup (and ignore the top two lookups). But from what I could deduce, FontForge actually treats “exclude_dflt” as “don't register the following lookups with the dflt tag”. While the docs say it should be “don't register the default lookups (from the top of the feature) with this tag” (here: TRK). Btw, this makes it pointless to include a language tag without an “exclude_dflt” directive — otherwise FontForge will apply the following lookups to 'dflt' language as well.