Re: Query an NSFont: Serif or Sans Serif, is it extended or condensed, etc.
Re: Query an NSFont: Serif or Sans Serif, is it extended or condensed, etc.
- Subject: Re: Query an NSFont: Serif or Sans Serif, is it extended or condensed, etc.
- From: "Mark J. Lilback" <email@hidden>
- Date: Tue, 12 Aug 2003 18:20:16 -0400
At 2:09 pm -0700 8/12/2003, Vince DeMarco wrote:
Sorry i don't think that ATS even provides the Serif/San Serif
information (I could be wrong though)
I quick look though the ATS headers didn't reveal anything interesting either.
There is a way to get it, at least for TrueType fonts.
ATSFontGetTable should let you fetch a table, and the one you'd want
is 'OS/2'. That table contains multiple fields that can tell you if
the font is serif, sans-serif, ornamental, symbol, etc. You can check
for fixed width fonts in the 'post' table. You can read up on these
tables in the Files chapter of the TrueType Reference Manual
<
http://developer.apple.com/fonts/TTRefMan/>.
There's probably a way to figure out the same information for other
font formats, but I couldn't easily find it. For fixed width fonts,
I'm fine with that.
--
__________________________________________________________________________
"They that can give up essential liberty
Mark J. Lilback to obtain a little temporary safety
<email@hidden> deserve neither liberty or safety."
http://www.lilback.com/ -- Benjamin Franklin
_______________________________________________
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.