Dear Sirs, Now I'm afraid the replacement of obsolete QuickDraw FontManager by AppleTypeService with keeping API compatibility is POSSIBLE but will be complexed. Please allow me spend a few weeks more. I attached the memo of working direction.
Regards, mpsuzuki How to handle QuickDraw FontName without FontManager? ===================================================== outline To build FreeType2 without compiler's warning on Tiger, we have to replace almost FM functions by ATS functions. To handle QuickDraw FM's font name without FM functions, devious technique may be required. 1. How to specify a font in QuickDraw FontManager system -------------------------------------------------------- In FM, a font is specified by "family" typed as FMFamily (e.g. Courier) and its "instance" typed as FMFont (e.g. "Courier", "Courier Bold", "Courier Italic": usually suffixes like "Bold" "Italic" etc are called as "style"). The FMFont instance itself has no storage for its own name, the name of instance is specified by joined string of family-name and style-suffix. This is QuickDraw FontName. The font name passed to FT_GetFile_From_Mac_Name() is QuickDraw FontName. So, to keep API compatibility, we have to handle QuickDraw FontName. # [NOTE] # The suffixes for style are not reserved word. # Fonts designed for Windows are not in suitcase format, # and the family is named directly, as "Courier New Bold". 2. How to specify a font in Apple Type Service system ----------------------------------------------------- In ATS, a font is specified by "font" typed as ATSFontRef. Also there is "family" typed as ATSFontFamilyRef, but there's no hierarchical relationship between "font" and "family". ATS has no support to find a font as a member of given "family". # [NOTE] # There are conversion functions for migration purpose. # FMFontFamily <-> ATSFontFamilyRef, FMFont <-> ATSFontRef. 3. How to handle QuickDraw FontName in ATS system? ---------------------------------------------------- 3-1. Problem: discontinuity between ATS font and family ------------------------------------------------------- ATS "family" can be searched by QuickDraw FamilyName, but ATS "font" cannot be searched by QuickDraw FontName. On the other hand, ATS "font" can be used to find a font file, but ATS "family" cannot be. Making the situation worse, the naming conventions of ATS "font" and ATS "family" are incompatible. Although I've not find exact regularity, it seems that ATS "font" pefers to ASCII/Roman names but ATS "family" prefers to nationalized names. QuickDraw FamilyName is usually nationalized. For example, for a Korean font file /Library/Fonts/#Gungseouche.dfont, ATSFontGetName() returns "#GungSeo Regular", ATSFontFamilyGetName() returns a Korean script. Therefore, it's difficult to find a ATS "font" from given ATS "family" by scanning font names. 3-2. Suggestion: utilization of ATSUI system -------------------------------------------- Apple Type Services for Unicode Imaging (ATSUI) is text layout system on the top of ATS. Although it's system at higher layer, it has its own (in the other word, incompatible with ATS) font management system, and ATSUI font-id is compatible with QuickDraw FontManager. In the font name extraction of ATSUI system, we can specify the encoding of font name. Therefore, ATSUI can be used as a translator of font-name. [continues to experimental result which is now prepared...] _______________________________________________ Freetype-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/freetype-devel
