Hi, I have an application where I need to be able to find the closest equivalent font should a font be missing. e.g. someone creates a file and sends it to someone else, who doesn't have the font that was used to create the original file installed on their system.

I thought that maybe saving the NSFontDescriptor in the file should be able to allow me to find the best font using the matchingFontDescriptorsWithMandatoryKeys method passing nil as the mandatory keys, but I have no idea what it would do if the font was either there or missing: - if the font was there, would it return just one font descriptor, or potentially multiple? - if it was able to be exactly matched, is there some way of knowing this (e.g. is isEqual: implemented on NSFontDescriptor?) - if the font is not there, will it continue to fall back until it finds a suitable font? If so, will it return only one item in the array? What does it try to match in the algorithm? - if it does return multiple descriptors, are they ordered so that I know which one is considered the best match? - if I pass in nil as the mandatory keys, will it *always* return at least one descriptor?

Now sometimes my file is edited by someone using windoze, and the font name doesn't exactly match what you see on the Mac even though it is essentially the same font and usually the name of one is a substring of the other. Is there an elegant way to handle this?

Thanks

Gideon
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to