[HarfBuzz] Support for Stylistic Sets

Eli Zaretskii eliz at gnu.org
Sat Sep 14 15:59:56 UTC 2019


> From: Nikolay Sivov <bunglehead at gmail.com>
> Date: Sat, 14 Sep 2019 17:00:53 +0300
> Cc: Harfbuzz <harfbuzz at lists.freedesktop.org>
> 
>  AFAIU, HarfBuzz does support Stylistic Sets, but it is not clear to me
>  what should an application do to request glyphs corresponding to a
>  certain stylistic set.
> 
>  Suppose an application wants to display a text string using a specific
>  stylistic set -- could someone please outline the sequence of API
>  calls to get that, or point me to some documentation which describes
>  that?
> 
> Hi, Eli.
> 
> I think it must be a matter of enabling features explicitly, in case you're asking about it would be features
> ss01-ss20, see hb_shape() arguments documentation.
> Basically, you set hb_feature_t fields to appropriate tag, value (1 for enabled), and start/end limits. That should
> do it.

I'm beginning to see the light, thanks.

So hb_feature_t's 'value' field should always be 1 for an enabled
features, and its 'tag' field should be something like

  HB_TAG('s', 's', '0', '1')

is that right?

The next question is how to know whether a given hb_font_t supports a
given feature?

Thanks.


More information about the HarfBuzz mailing list