Fonts in Popup

dadidoe

Computer Pro :)
Hi,

I'm trying to insert the names of all avaible fonts into a popup and do the same with text size. On the class reference I found availableFontFamilies but I do not know how to use it. Could someone give me an example?
 
http://developer.apple.com/DOCUMENT...occ/instm/NSFontManager/availableFontFamilies

NSFontManager has the method "availableFontFamilies" which returns a standard array of font family names. You would call it by instantiating an NSFontMananger object then calling the availableFontFamilies class method, which returns the names of the font families into an array (NSArray). You would then iterate through the array and do whatever you need to do while iterating through the array (print them out, etc.).
 
Back
Top