Re: CGContextShowTextAtPoint doesn't show text
Re: CGContextShowTextAtPoint doesn't show text
- Subject: Re: CGContextShowTextAtPoint doesn't show text
- From: Graham Cox <email@hidden>
- Date: Tue, 09 Aug 2011 23:27:54 +1000
On 09/08/2011, at 10:43 PM, Gabriel Zachmann wrote:
> I have checked that 'str' does actually hold a valid string at the user's instance. (I logged it and had him send me the log file.)
> CGContextSelectFont( ctxt, "AndaleMono", 14, kCGEncodingMacRoman ); // "Andale Mono" doesn't work either
Perhaps he doesn't have "Andale Mono" on his machine? I'm not sure what CG does with text if the font isn't there, does it fall back to something else or just silently fail? Maybe the fallback font is too big for the space and it isn't rendered as a result?
I think the way your code assumes this font is going to be there is a bit flaky.
But anyway, CATextLayer takes all this pain away for you.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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