Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Environment and Utilities /
Chapter 1 - QuickDraw GX and the Macintosh Environment / QuickDraw GX and the Macintosh Environment Reference
QuickDraw-to-QuickDraw GX Translator Functions / Converting a GrafPort Font and Face Specification


GXConvertQDFont

You use the GXConvertQDfont function to translate the specification for a font and face in the GrafPort into a gxStyle.

long GXConvertQDfont(gxStyle theStyle, long txFont, long txFace);
theStyle
A gxStyle.
txFont
A long specifying a text font; same as in the GrafPort.
txFace
A long specifying a text style; same as in the GrafPort.
DESCRIPTION
The GXConvertQDfont function picks the gxFont that is the closest match for the txFont and txFace parameters. If it does not find an exact match, GXConvertQDfont might also set the style's font variation.

The GXConvertQDfont function also sets the style's encoding. It returns any style bits from txFace that were not accounted for in the gxFont and variation. This permits the caller to construct a gxTextFace based on the returned style bits. Potentially all of the style bits can be matched. Currently only bold, italic, condense, and extended bits are matched. However, in the future more might be matched. You should not make any assumptions about what will or will not be matched.

SPECIAL CONSIDERATIONS
If the translator calls GXConvertQDFont, it will already have mapped txFont==0 to the correct font by calling the Script Manager.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996