How to know if an NSFont can draw an NSString?
How to know if an NSFont can draw an NSString?
- Subject: How to know if an NSFont can draw an NSString?
- From: Sean McBride <email@hidden>
- Date: Fri, 09 Dec 2016 18:15:25 -0500
- Organization: Rogue Research Inc.
Hi all,
I use an open source OpenGL-based library to do some drawing, and sometimes I need to draw some text. This library takes UTF-8 as input and a path to a font file to use. I use [NSFont systemFontOfSize:0.0] and get its path using kCTFontURLAttribute.
This all works great for many characters, but notably fails for Japanese characters (and others). I'm trying to understand why. Could it be that the system font doesn't have every unicode character under the sun? If so, is there a way to choose an NSFont based on the contents of an NSString?
Thanks,
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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