Skip to content

[aat] Add shaper-selection mechanism to prefer aat #1391

@behdad

Description

@behdad

Continuing discussion from #322

We want a programatic way to contro whether 'aat' shaping should be preferred over 'ot'. Basically, making the shaper Apple-style.

We want to use the existing shaper-selection mechanism. Ie. caller provides list of shaper strings to hb_shape_full(). Unlike current method, I don't want our shaper to fail if the requested method was not available. Ie. if user asks for "aat", we try aat and then ot and then whatever fallback. We would NOT fail if font doesn't have aat.

With that in mind. I like to propose the following changes:

  • Keep "ot" to mean what it does right now: prefer OpenType and then try AAT and then fallback,
  • Add "aat" to mean: prefer AAT, then try OpenType then fallback,
  • Add "fallback" that doesn't try OpenType or AAT. This will make the current separate "fallback" shaper obsolete. Although, there's a benefit to current fallback shaper in that it's 200 lines of code, it's much easier to verify as secure and safe. But don't think we need that property.
  • Add "auto" to mean whatever is default. Alternate namings could be "harfbuzz", or "default". I don't like "default" since it's too close to saying default shaper order (which is different concept).

Metadata

Metadata

Assignees

Labels

aatApple Advanced Typography

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions