Re: Ligatures with appendBezierPathWithGlyph
Re: Ligatures with appendBezierPathWithGlyph
- Subject: Re: Ligatures with appendBezierPathWithGlyph
- From: Douglas Davidson <email@hidden>
- Date: Mon, 18 Jun 2007 15:47:16 -0700
On Jun 18, 2007, at 3:38 PM, Stefan Werner wrote:
I don't know why you're not seeing ligatures at all in certain
cases. Their presence or absence depends on the font, ligature
attribute, etc., so it's difficult to say without seeing a
detailed example.
FWIW, I uploaded a sample project that demonstrates it:
http://web.mac.com/keindesign/no ligatures.zip
The reason you aren't seeing ligatures here is because you haven't
had the layout manager do any layout. You're getting the results of
glyph generation, which produces a preliminary set of glyphs, but
doesn't do any of the glyph substitution that would be done at layout
time, including ligatures.
In order to force layout to be done, you would need to ask a question
that requires layout. Take a look at /Developer/Examples/AppKit/
CircleView; there's a comment near the beginning of the drawRect:
method that explains how glyphRangeForTextContainer: is being used to
force layout.
However, you aren't going to get any layout done unless you supply a
text container. The CircleView example shows that as well.
All in all, I would recommend using something like what the
SpeedometerView example does.
Douglas Davidson
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden