[designspace] Proposal to add `<fea>`
See original GitHub issueコピペ of https://github.com/unified-font-object/ufo-spec/issues/194: (via https://twitter.com/fr_brennan/status/1452644352417800197)
I was talking to a bunch of designers and very surprised they don’t even know what the binary format allows because Designspace spec has so thoroughly boxed them in.
Designspace allows only a fraction of what is possible in binary format, that is to say, while binary format allows either GPOS or GSUB to contain basically any number of FeatureVariations lookups, Designspace constrains itself to only GSUB LookupType 1, Single Substitution. Despite there being obvious use for all the other types, especially GPOS.
I propose to deprecate <rule>
tag, replace with <fea>
tag. <fea>
tag will hold a subset of Adobe FEA code. It will not allow you to insert anything at the toplevel except lookup
. Alternatively, if people prefer, <fea>
tag can be provided in multiple and there will be an implied wrapping lookup … { … }
.
The new proposal is to have <fea>
be a child of <rule>
.
Problem solved, no need for @simoncozens idea of complex “variable FEA syntax” (cf. https://github.com/adobe-type-tools/afdko/pull/1350, https://github.com/fonttools/fonttools/pull/2432), no need to change FEA standard at all.
Besides, changing FEA standard is confusing because what, you’re adding FeatureVariations to instance UFO FEA’s? What if they differ in any way?
OK, I guess Simon would say “well I want a new font format which will allow a toplevel FEA”, which, fine. Or someone else might say “I want a multiple master UFO with a toplevel FEA”. Again, fine. (I disagree to both, I like UFO, but no need to slow down progress over something like that.)
Alternatively, <rule>
can be kept, and <sub>
deprecated instead, with <fea>
living inside <rule>
instead of becoming the new toplevel. I don’t like this since it makes less sense, I would rather <fea>
hold the <conditionset>
and have a filename
attribute, but whatever, it’s OK.
Detailed proposal
Add new section § 5.1.4 fea element as follows:
- Defines a group of OpenType features in a subset of Adobe OpenType™ Feature File (FEA) format.
- A
fea
element must have afilename
attribute pointing to an Adobe FEA.fea
without filename, or pointing to a non-existent filename, should be ignored when compiling a font; strict parsers can consider this an error. - The subset of FEA format supported is only anything that would be allowed below a
lookup {}
block, including thelookup
block. - Should
<fea>
appear before, after, or between<sub>
elements, the features within are to be applied in their XML order.
<rules>
<rule>
<conditionset>
<condition minimum="250" maximum="750" name="weight" />
<condition minimum="50" maximum="100" name="width" />
</conditionset>
<conditionset>
<condition ... />
<condition ... />
</conditionset>
<fea filename="all_masters.fea" />
</rule>
</rules>
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (8 by maintainers)
Top GitHub Comments
Interesting - why?
(For the record, including .fea in designspace is a hard no from me, in case I’d have a vote in this.)