On 22-Apr-2006, at 1:15, Roman Thilenius wrote:
> is there a way how i can make sure that font IDs
> work on all (three) platforms?
> where do i find information about font IDs?
> until now i was only using 2 fonts because
> i did not know what font has what ID.
On Classic Mac OS, font IDs were assigned dynamically by the OS when
the font was installed. So, aside from standard fonts, the same font
would almost always have a different ID on a different machine. The
IDs used for standard fonts are documented in Inside Macintosh.
Available online at http://developer.apple.com.
IM recommended, since about 1985, not to store fonts by ID but rather
by name. Max' insistence on storing fonts by ID has essentially made
it impossible to use anything other than standard fonts in patches.
Don't blame me, it wasn't my idea.
I haven't read all the documentation for Carbon, but when using
QuickDraw the above will presumably apply equally. I really haven't
studied Quartz much yet at all (even if that's what we're all
supposed to be using now); it wouldn't surprise me if Quartz doesn't
support font IDs at all. The whole font ID concept dates from a time
when Apple believed "no one will ever need more than 256 fonts."
As for Windows... others here can give more detail than I can.
I think there as an object around that will convert a font name to
its font number (as defined on the machine). Maybe by Peter Swinnen?
It ought to turn up on maxobjects.com.
Even with names, the number of fonts you can safely use across all
three supported platforms is pretty limited.