ADC Home > Reference Library > Technical Q&As > Legacy Documents > Graphics & Imaging >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

QuickDrawGX Printer Drivers


Important for all Apple Printing and Graphics Developers:

The information in this Technical Q & A is still relevant up to and including Mac OS 7.6 with QuickDraw GX 1.1.5. Beginning with the release of Mac OS 8.0, however, Apple plans to deliver a system which incorporates QuickDraw GX graphics and typography only. QuickDraw GX printer drivers and GX printing extensions will not be supported in Mac OS 8.0 or in future Mac OS releases. Apple's goal is to simplify the user experience of printing by unifying the Macintosh graphic and printing architectures and standardizing on the classic Printing Manager.

For details on Apple's official announcement, refer to </dev/technotes/gxchange.html>

Q: I'm currently working on localizing our first QuickDrawGX driver release. We're using AppleGlot and most of the languages are fine. However, we're having a problem with the Japanese driver. Everything looks fine except for our Panel icon names. We have a driver-specific Options panel, and it contains a bunch of garbage characters. We're using a localized system to test and to view the driver's UI. Does the string being defined as a pstring[31] in the gxPrintPanelType have anything to do with our problem, such as possibly having two byte characters get messed up?

A: Both the font and the character data have to be set properly to display Japanese data. AppleGlot substitutes Japanese for English text, but it doesn't let you specify the fonts. Most resources only have text, with no associated font/script info, so the system has to guess what font to use. QuickDrawGX lets you specifically set the script code to match the text data.

Usually, the system uses the System or Application font, which in your case was Japanese, so this should have worked correctly. Since other icons in the list were displaying Japanese names, the code was obviously supporting Japanese text, but something was mistakenly telling it that your garbage text was Roman instead of Japanese. We looked at the data structure that included the text, and the following field was the ScriptID field, which was, in fact, set to smRoman. Changing this to smJapanese (1) and then rebuilding the resource file solves the problem.

In general, GX is good about associating a script ID with all-text data. This allows multiple scripts to be supported at once (which is good). It does mean, however, that you have to watch for this problem when localizing your product. There may also be other places in your product where this is an issue. To find these, search the resource files for 'smRoman' and scrutinize those areas where it's found. Be aware that smRoman may also be represented by the constant 0, if it was not defined properly.

[May 01 1995]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.