[mpeg-OTspec] Re: [OpenType] RE: Proposal: deprecate ReqFeatureIndex

Behdad Esfahbod behdad at behdad.org
Wed Aug 22 23:41:52 CEST 2012

On 08/22/2012 02:20 PM, John Hudson wrote:
> On 22/08/12 11:02 AM, Behdad Esfahbod wrote:
>> Wrong. ReqFeatureIndex does not have to point to an existing feature. In
>> fact, a font editor can give you an option to mark certain lookups as
>> mandatory, and the font builder can put all those mandatory lookups in the
>> required feature. You are confusing font format with what font editor UIs
>> provide. What's missing is UI and support in font builders for what you want.
> Ah. So I could create a feature tag, <fuba>, associate with it whatever
> lookups I wished to be required, and reference this in the
> ReqFeatureIndex?

Yes.  In fact, it doesn't even have to have a name.  Features are present in
the font and can be indexed using a feature index.  Then each LangSys
associates a few feature tags to feature indices.  And it can have a
ReqFeatureIndex.  That's why it's called ReqFeatureIndex, not ReqFeatureTag.

> What seems unclear in this model, though, is how a set of lookups mapped
> to ReqFeatureIndex in this way should be presumed to interact with other
> layout features. Can we rely on lookup ordering in this respect, or must
> we presume that for some scripts at least precedence will be given to
> certain registered features that will be processed in blocks?

When OpenType was originally designed, lookups were supposed to be applied in
lookup-index order.  That's pretty neat and flexible.

When Uniscribe implemented script-specific shapers however, they departed from
this model by applying features in sets.  To cut it short, this is the current
state of affairs:

  - For Arabic and Indic scripts, apply 'ccmp' and 'loca' in one pass, then do
script-specific parts of the spec, applying each feature-at-a-time (I'm
simplifying the process), then apply everything else (including user-enabled
features) all in one pass.

  - for scripts without script-specific processing, apply everything in one
pass (including 'ccmp' and 'loca').

Now, the only ambiguity with ReqFeatureIndex is whether to apply it in the
first pass (ie. with 'ccmp' and 'loca'), or last pass (everything else).
HarfBuzz currently does it in the first pass.

In fact, if we can come up with a way to work around the limitation introduced
by the Uniscribe model, that may be worth exploring.  Other than that, we can
just agree where to apply ReqFeatureIndex and go home.

Bottomline being, from the other-features-interaction point of view,
ReqFeatureIndex is no different than other features.


> JH

More information about the mpeg-otspec mailing list