cocoa - How do I determine if a NSFont is installed on a Mac OSX machine in Objective-C? -


is there method check if nsfont string name installed system?

check if it's present in array:

nsarray *fonts = [[nsfontmanager sharedfontmanager] availablefontfamilies]; 

by calling

[fonts containsobject:@"times"]; 

containsobject uses isequal: method compare 2 objects. because know every object in fonts array nsstring, know you'll yes if array contains @"times", , no if doesn't.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -