[HarfBuzz] Skipping Control for Attaching Marks using OpenType
Richard Wordingham
richard.wordingham at ntlworld.com
Sun Jun 9 04:36:40 PDT 2013
On Thu, 06 Jun 2013 15:50:38 -0400
Behdad Esfahbod <behdad at behdad.org> wrote:
> On 13-06-01 06:50 PM, Richard Wordingham wrote:
> > Are these standard restrictions, or are they just a feature of
> > HarfBuzz?
>
> No, they are what the spirit of the standard is, what Uniscribe
> implements, and what we do too.
Very well. I feared there would be fonts (you mentioned Tahoma) that
abused the "IgnoreBase" flag. I've recently noticed that DejaVuSans uses
an implausible IgnoreLigature in mark-to-mark positioning.
> If you have to try so hard, maybe there's reordering that we can do
> in the shaper to make it easier.
I'm trying to keep down the number of options the shaper needs to be
aware of.
--------------
I have fallen foul of another gotcha - the requirement that the
sequence indices for each context in a (chained) context lookup be in
strictly monotonic increasing order. Is there a list of restrictions not
mentioned in the Microsoft definitions of the lookups
(http://www.microsoft.com/typography/otspec/gsub.htm and linked pages),
or does one have to read through hb-ot-layout-g*.hh?
Is the definition of the sequence index in SubstLookupRecord in
http://www.microsoft.com/typography/otspec/gsub.htm#CS wrong? In one
of my experiments, I have a chained context substitution (with
empty lookahead and back track sequences) applying to the sequence
mai_kang_lai mai_ke low_kha
I apply a ligature at sequence index 0 replacing <mai_kang_lai,
mai_ke> by <mai_ke>, and I then attempt to apply a 'multiple
substitution' to low_kha. According to the Microsoft documentation, I
should use sequence index 1, because the input sequence will have been
transformed to <mai_ke, low_kha> by the time I come to apply it.
However, to make it work with HarfBuzz Version 0.9.14 or 0.9.18 (other
versions not tested), I have to use sequence index 2.
If the Microsoft specification is not wrong, I have a work around in
this case. Instead of the ligature at index 0, I do a single
substitution 'mai_kang_lai > condemned', and then apply the ligature
'condemned mai_ke' > mai_ke in the next lookup in the feature. I used
the same trick to get round the HarfBuzz requirement that sequence
indices be in ascending order.
Richard.
More information about the HarfBuzz
mailing list