Font related question
Font related question
- Subject: Font related question
- From: Vinay Prabhu <email@hidden>
- Date: Tue, 1 Jul 2008 16:36:38 +0530
Hi Al,
I am stuck in a peculiar problem related to Fonts.
In my application, the requirement is such that, I need to provide 2
drop down menu's to select font.
One drop down menu will list all fonts available in the system.
Another drop down menu lists the Fonts traits like, Bold, Italic etc.
I can not use Font Panel for this requirement.
I am using the NSFont API, + (NSFont *)fontWithName:(NSString
*)fontName size:(CGFloat)fontSize to create the NSFont object.
The problem is, while trying to get the font with traits like Bold,
Italic etc, the naming scheme is not consistent.
like,
"Helvetica-Bold"
"TimesNewRomanPS-BoldMT"
"Arial-BoldMT"
"CourierNewPS-BoldMT"
"Georgia-Bold"
So, I am not able to get the font traits as required, with the
fontWithName: API, because of the inconsistency in the naming scheme.
Is there any other way to get the NSFont object, using the font name
and the trait name?
Any suggestions?
Thanks and Regards
Vinay
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden