Re: Missing characters
Re: Missing characters
- Subject: Re: Missing characters
- From: Allan Odgaard <email@hidden>
- Date: Sun, 7 Jul 2002 11:41:13 +0200
On sxndag, juli 7, 2002, at 10:20 , Clark S. Cox III wrote:
Is there any way to know, given a specific unicode codepoint (4E35
for
example), whether or not it will display the missing character symbol
(i.e.
Whether or not any installed font knows how to draw it)?
You can use NSLayoutManager to convert the unichar to a glyph range, and
then you can ask the current font if the glyph(s) in question are
encoded.
Though I won't rule out that NSLayoutManager transforms the char to
NSNullGlyph (but then that would tell you that it doesn't exist).
Also, I'm told that Cocoa does aggressive font substitution in order to
display all glyphs, but at which point this is done is beyond my
knowledge... though I'd be curious to know, as I myself use
NSLayoutManager to get the glyphs from strings, which I later render
with CGDisplayGlyphs(). So probably my program would not benefit from
this font substitution :-(
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.