Am 15.03.2012 um 19:14 schrieb Paul Levine:
> Hi,
>
> Is it possible to get the Typeface selected from the FontPanel?
>
> The NSFontMBS.displayname will return something like "Arial Bold" which you
> can use to set the font in RS BUT the .bold property won't be true. It is
> difficult parse the displayname string because changing the language of the
> OS would return a localized string (example in French it is Arial Gras).
Next plugin will have NSFontDescriptorMBS class:
dim n as NSFontMBS = NSFontMBS.boldSystemFontOfSize(13)
dim f as NSFontDescriptorMBS = n.fontDescriptor
dim w as integer = f.symbolicTraits
dim d as Dictionary = f.fontAttributes
if BitwiseAnd(w, f.NSFontBoldTrait) <> 0 then
MsgBox "bold"
end if
So you can know whether it's bold and find font descriptor for same font with
not being bold.
Greetings
Christian
--
Real Studio Conferences, Training and Meetings in Orlando, London, Pforzheim
and Leipzig.
More details and registration here:
http://www.monkeybreadsoftware.de/realbasic/events/
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info