[HarfBuzz] harfbuzz: Branch 'master'

Jonathan Kew jfkthame at googlemail.com
Thu Aug 8 02:02:19 PDT 2013


On 8/8/13 03:08, Behdad Esfahbod wrote:
>   src/hb-coretext.cc |   65 ++++++++++++++++++++++++++++++++++++++++++++---------
>   1 file changed, 54 insertions(+), 11 deletions(-)
>
> New commits:
> commit a782a5e9a37c8733ac2830410a514d38635b543a
> Author: Behdad Esfahbod <behdad at behdad.org>
> Date:   Wed Aug 7 21:08:54 2013 -0400
>
>      [coretext] Start adding support for features
>
>      Unlike AAT, looks like with CoreText very few OT features can be mapped.
>      :(

To set features in general, I think you need to create a new CTFont with 
the desired features and then apply this to a range of the attributed 
string; you can't set them directly on the string (because they're 
font-dependent, I guess; the fact that a couple of things -can- be 
specified that way is probably a legacy of the old NeXT text system, 
pre-dating font features as we now know them).

See CTFontCreateCopyWithAttributes, and the kCTFontFeaturesAttribute
and kCTFontFeatureSettingsAttribute keys for 
CTFontDescriptorCreateWithAttributes. I'm still not sure how all OT 
features will be mapped, but this should let you reach a lot more 
features than the direct CFAttributedString approach.

JK




More information about the HarfBuzz mailing list