iPhone Font Outlines


#1

JUCE currently uses edge tables to generate a JUCE path from a glyph on the iPhone. This is likely due to the fact that NSBezierPath isn’t available on iOS.

While reading through the Core Text docs, I believe I’ve come across another way to get iPhone font outlines without resorting to edge tables:
Step 1: Use CTFontCreatePathForGlyph to get a CGPathRef from a CGGlyph
Step 2: Walk through the CGPathRef using CGPathApply to generate the JUCE path

http://developer.apple.com/library/ios/documentation/Carbon/Reference/CTFontRef/Reference/reference.html#//apple_ref/c/func/CTFontCreatePathForGlyph
http://developer.apple.com/library/ios/documentation/GraphicsImaging/Reference/CGPath/Reference/reference.html#//apple_ref/c/func/CGPathApply

This should work on iOS 3.2 and later as well as Mac OS X 10.5 and later.


#2

Cunning! I don’t have time to implement that at the moment, it’d be quite a complicated change… but thanks for the tip, I’ll make a note of it!