Important: The information in this document is obsolete and should not be used for new development.
GXConvertQDFont
You use theGXConvertQDfont
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
TheGXConvertQDfont
function picks thegxFont
that is the closest match for thetxFont
andtxFace
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 fromtxFace
that were not accounted for in thegxFont
and variation. This permits the caller to construct agxTextFace
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 callsGXConvertQDFont
, it will already have mappedtxFont==0
to the correct font by calling the Script Manager.