Re: Problems setting NSTextStorage attributes with symbol fonts
Re: Problems setting NSTextStorage attributes with symbol fonts
- Subject: Re: Problems setting NSTextStorage attributes with symbol fonts
- From: Douglas Davidson <email@hidden>
- Date: Thu, 5 Sep 2002 11:03:45 -0700
On Thursday, September 5, 2002, at 12:31 AM, Brock Brandenberg wrote:
Has anyone had any experience applying attributes with symbol fonts to
a
NSTextStorage? I have a bug where attributes containing symbol fonts
do not
take when applied to an NSTextStorage instance, but every other normal
character font I have works fine.
I suspect that you are applying this font to characters that are not
actually representable in it. During attribute fixing, the text
storage is modified so that the font attribute for each character is a
font that can actually represent that Unicode character.
There are some special issues that come up when this is applied to
symbol fonts like Symbol, Zapf Dingbats, Wingdings, Webdings, and so
forth. The Symbol and Zapf Dingbats fonts are both representable in
standard Unicode; you can examine the Unicode tables to find the
specific code points involved. However, many people use glyph-based
encodings for these fonts. You can use CFString/NSString to convert
from these encodings to Unicode--the respective CFString encoding
numbers are kCFStringEncodingMacSymbol and
kCFStringEncodingMacDingbats. Some other fonts--including, I believe,
Wingdings and Webdings--are not representable in standard Unicode, and
end up being mapped into ranges like U+F000 to U+F0FF.
Douglas Davidson
_______________________________________________
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.