FROM : Andy
DATE : Sun Jan 13 21:39:02 2002
Charles Jolley wrote:
>
> Hi,
>
> Does anyone know how to determine if a font is made to handle Asian (Japanese, Korean, etc) characters?
>
This will tell you the font encoding, putting the description in a label onscreen.
Look at the classes mentioned, plus NSFont and NSFontManager and you
will soon see how to classify fonts. The only tricky thing is you need
to use the Core Foundation APIs as well as AppKit:
//decoding string encodings requires use of Core Foundation CFString functions,
//the NSString stuff is deprecated
cfsEncoding =
CFStringGetNameOfEncoding(CFStringConvertNSStringEncodingToEncoding([m_currentFont mostCompatibleStringEncoding]));
[[fontEncoding cell] setTitle: [FontWindowMediator
CFStringToNSString: cfsEncoding]];
--
AndyT (lordpixel - the cat who walks through walls)
A little bigger on the inside
I think we finally found the killer app for Flash: animated stick men
DATE : Sun Jan 13 21:39:02 2002
Charles Jolley wrote:
>
> Hi,
>
> Does anyone know how to determine if a font is made to handle Asian (Japanese, Korean, etc) characters?
>
This will tell you the font encoding, putting the description in a label onscreen.
Look at the classes mentioned, plus NSFont and NSFontManager and you
will soon see how to classify fonts. The only tricky thing is you need
to use the Core Foundation APIs as well as AppKit:
//decoding string encodings requires use of Core Foundation CFString functions,
//the NSString stuff is deprecated
cfsEncoding =
CFStringGetNameOfEncoding(CFStringConvertNSStringEncodingToEncoding([m_currentFont mostCompatibleStringEncoding]));
[[fontEncoding cell] setTitle: [FontWindowMediator
CFStringToNSString: cfsEncoding]];
--
AndyT (lordpixel - the cat who walks through walls)
A little bigger on the inside
I think we finally found the killer app for Flash: animated stick men
| Related mails | Author | Date |
|---|---|---|
| Charles Jolley | Jan 13, 14:52 | |
| Andy | Jan 13, 21:39 | |
| Aki Inoue | Jan 14, 07:07 | |
| Charles Jolley | Jan 15, 12:17 | |
| Aki Inoue | Jan 15, 20:42 | |
| Andy | Jan 16, 02:50 | |
| Charles Jolley | Jan 19, 10:51 |






Cocoa mail archive

