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
Post a Comment