Set the calt feature value to 0 and pass it explicitly to the shaper

In python…

def ot_feature(name, value):
    bytename = list(map(ord, name))
    b, O = hb.feature_from_string(bytename)
    if b:
        O.value = value
        return O
    else:
        raise ValueError('invalid opentype feature name ' +
repr(str(bytename)))

...

no_calt = ot_feature('calt', 0)

...

hb.shape(font, hb_buffer, [no_calt])

On Fri, Aug 5, 2016 at 12:02 PM, Liam <l...@fallenacorn.com> wrote:

> Hello again,
>
>     I am having an issue with a certain font and how to handle it with the
> shaper. Sadly I can not post this font but hopefully I can explain this
> well enough to get a correct answer.
>
> This font has turned on by default the CALT table, and it also behaves
> differently compared to most open type fonts that I am testing with.
>
> I tested this font using adobe illustrator and by default it does grab the
> 'f' glyph from the calt table, but I can turn it off. Is there a way to
> have the hb_shaper to not use alternate glyph substitutions?
>
> My other option at the moment is to check for a null value for the
> features list and just use FreeType for the lookup.
>
> Thanks
>
>
> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/harfbuzz
>
_______________________________________________
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/harfbuzz

Reply via email to