开发者

Embedding Ligature Font in an iPhone App

开发者 https://www.devze.com 2023-02-22 17:26 出处:网络
I was wondering what happens if I try to use a font with lots of ligatures in my iPhone App? I can\'t try the font because I need to buy it first, but wouldn\'t want to waste the money if ligatures we

I was wondering what happens if I try to use a font with lots of ligatures in my iPhone App? I can't try the font because I need to buy it first, but wouldn't want to waste the money if ligatures were not possible开发者_StackOverflow in my iPhone app.

This is the font I'm talking about: Dear Joe 3

I tried to use Arabic in my iPhone app and that works perfectly. Arabic is a script full of ligatures, but then again, Apple may be just supporting this particular ligature font for Arabic and no others.

I'd be very grateful if you had any suggestions of how I could test this before I buy an expensive font which won't work...

Thanks!


It is supported for iOS > 3.2 by setting kCTLigatureAttributeName

http://developer.apple.com/library/ios/#DOCUMENTATION/Carbon/Reference/CoreText_StringAttributes_Ref/Reference/reference.html

but why not try other free ligature font first?

Updated again:


I've tested on both Simulator and iPhone 4 with a TRUE ligature featured font (yes I was faked by a ligature font without ligature feature before)

here's the result: Black is UILabel, stroke is CoreText

Embedding Ligature Font in an iPhone App

And how it should be rendering:

Embedding Ligature Font in an iPhone App

Take a look on the additional ligature "ll" and the standard ligature "ff"

While setting kCTLigatureAttributeName to 0 can remove all ligature
but setting it to 2 cannot support additional ligature like "ll" or "Th" for the font "Bello Pro"
(Default is 1, that's for ligature like "ff" or "fl")

So I guess there is either a bug in the CoreText engine for iOS or my font is not supported.

0

精彩评论

暂无评论...
验证码 换一张
取 消