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: Vince DeMarco <email@hidden>
- Date: Tue, 12 Aug 2003 14:09:27 -0700
On Tuesday, August 12, 2003, at 9:52 AM, email@hidden wrote:
Thanks -- but alas, NSFontTraitMask doesn't have the Serif/Sans Serif
attribute, so that's coming from somewhere else!
enum {
NSItalicFontMask = 0x00000001,
NSBoldFontMask = 0x00000002,
NSUnboldFontMask = 0x00000004,
NSNonStandardCharacterSetFontMask = 0x00000008,
NSNarrowFontMask = 0x00000010,
NSExpandedFontMask = 0x00000020,
NSCondensedFontMask = 0x00000040,
NSSmallCapsFontMask = 0x00000080,
NSPosterFontMask = 0x00000100,
NSCompressedFontMask = 0x00000200,
NSFixedPitchFontMask = 0x00000400,
NSUnitalicFontMask = 0x01000000
};
Any other ideas?
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.
sorry
vince
Dan
On Tuesday, August 12, 2003, at 09:32 AM, Vince DeMarco wrote:
Use NSFontManager.
Check out
- (NSFontTraitMask)traitsOfFont:(NSFont *)fontObj;
- (int)weightOfFont:(NSFont *)fontObj;
On Monday, August 11, 2003, at 10:48 PM, email@hidden wrote:
I'm trying to determine, given a particular font, if it is a serif
font or a sans-serif font (or neither, if that's the case), and
other traits of the font (like its weight, if it is extended or
condensed, etc.)
One clue that I have is from an old post by Mike Ferris:
The Cocoa text system's "font fixing" will look for a font that has
visual properties similar to the font assigned to a character if it
has
to find a different font. It takes into account such things as
weight,
italics, serif/sans-serif, etc... Obviously this is a slightly
fuzzy
process.
Does anybody know where the traits like this of a font is stored, so
that I can access this font fallback kind of behavior? I want to do
something similar, given a font (e.g. Times Roman, Helvetica
Condensed), find out if it is serif or sans serif, if it's a
condensed or extended, and so forth.
Anybody have any hints on how to accomplish this?
--
Dan Wood
Karelia Software, LLC
email@hidden
http://www.karelia.com/
Watson for Mac OS X: http://www.karelia.com/watson/
The information contained in this message or any of its attachments
may be privileged and confidential and intended for the exclusive
use of the addressee(s). Any disclosure, reproduction, distribution
or other dissemination or use of this communication is strictly
prohibited.
The Arrogance of Power: <http://www.fatdawg.com/senbyrd.html>
To announce that there must be no criticism of the president, or
that we are to stand by the president, right or wrong,is not only
unpatriotic and servile, but is morally treasonable to the American
public.
-- Theodore Roosevelt _______________________________________________
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.
--
Dan Wood
Karelia Software, LLC
email@hidden
http://www.karelia.com/
Watson for Mac OS X: http://www.karelia.com/watson/
The information contained in this message or any of its attachments
may be privileged and confidential and intended for the exclusive use
of the addressee(s). Any disclosure, reproduction, distribution or
other dissemination or use of this communication is strictly
prohibited.
The Arrogance of Power: <http://www.fatdawg.com/senbyrd.html>
To announce that there must be no criticism of the president, or that
we are to stand by the president, right or wrong,is not only
unpatriotic and servile, but is morally treasonable to the American
public.
-- Theodore Roosevelt
_______________________________________________
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.