Windows 3.1 Device Drivers (ddag31qh.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
TEXTXFORM
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
typedef struct tagTEXTXFORM {
    short  txfHeight;
    short  txfWidth;
    short  txfEscapement;
    short  txfOrientation;
    short  txfWeight;
    char   txfItalic;
    char   txfUnderline;
    char   txfStrikeOut;
    char   txfOutPrecision;
    char   txfClipPrecision;
    short  txfAccelerator;
    short  txfOverhang;
} TEXTXFORM;
 
The TEXTXFORM structure contains information describing the actual
appearance of text as displayed by the device. The StrBlt and ExtTextOut
functions check the the TEXTXFORM structure to determine what additional
actions are required to generate the desired text from the specified
physical font.
 
Member            Description
────────────────────────────────────────────────────────────────────────────
 
txfHeight         Specifies the height of characters (ascent + descent) in
                  device units.
 
txfWidth          Specifies the width in device units of the bounding box of
                  the letter "X."
 
txfEscapement     Specifies the angle in tenths of a degree counterclockwise
                  from the x-axis of the vector passing through the origin
                  of all the characters in the string.
 
txfOrientation    Specifies the angle in tenths of a degree counterclockwise
                  from the x-axis of the baseline of the character.
 
txfWeight         Specifies the weight of the font ranging from 1 to 1000,
                  with 400 being the value for the standard font.
 
txfItalic         Specifies whether the font is to be italic. If the low bit
                  is set, the font is to be italic. All the other bits must
                  be zero.
 
txfUnderline      Specifies whether the font is to be underlined. If the low
                  bit is set, the font is to be underlined. All the other
                  bits must be zero.
 
txfStrikeOut      Specifies whether to strike out the font. If the low bit
                  is set, the font is to be struck out. All the other bits
                  must be zero.
 
txfOutPrecision   Specifies the required output precision for text. This
                  member can have one of the following values.
 
                  Value                        Meaning
                  ──────────────────────────────────────────────────────────
                  OUT_DEFAULT_PRECIS (0x00)    Chooses a reasonable font.
 
                  OUT_STRING_PRECIS (0x01)     Chooses the font whose size
                                               (height and width) most
                                               closely matches the requested
                                               size. The driver may
                                               disregard the requested
                                               orientation and escapement,
                                               but other attributes must
                                               match.
 
                  OUT_CHARACTER_PRECIS (0x02)  Chooses the font whose size
                                               (height and width) most
                                               closely matches the requested
                                               size. The driver may
                                               disregard the requested
                                               orientation, but other
                                               attributes must match.
 
                  OUT_STROKE_PRECIS (0x03)     Chooses a font whose
                                               attributes exactly match the
                                               requested attributes.
 
txfClipPrecision  Specifies the required clipping precision for text. This
                  member can have one of the following values.
 
                  Value                         Meaning
                  ──────────────────────────────────────────────────────────
                  CLIP_DEFAULT_PRECIS (0x00)    Chooses a reasonable font.
 
                  CLIP_CHARACTER_PRECIS (0x01)  Chooses a font that allows
                                                clipping of individual
                                                characters. The driver must
                                                be able to clip a character
                                                if any portion of it lies
                                                outside the clipping
                                                rectangle.
 
                  CLIP_STROKE_PRECIS (0x02)     Chooses a font that allows
                                                clipping of portions of a
                                                character. The driver must
                                                be able to clip any portion
                                                of a character that lies
                                                outside the clipping
                                                rectangle.
 
txfAccelerator    Specifies the requested text modifications using the same
                  format as the the dpText member in the GDIINFO structure.
                  Each bit in this member is set if the corresponding
                  ability is required to modify the physical font into the
                  requested font.
 
txfOverhang       Specifies same information as the tmOverhang member in the
                  TEXTMETRIC structure. This member is set by the device for
                  device-realized fonts and is in device units. GDI uses
                  additional overhang if it makes the font bold.
 
Comments
 
Although most of the members in the TEXTXFORM structure correspond to the
members in the LFONT structure, these members may not always exactly match.
For example, if the logical font specified a 19-unit font at string
precision and the closest available was a 9-unit font on a device capable of
doubling, then the txfHeight member in the structure is 18.
 
A driver should check the dpText member in its GDIINFO structure to
determine whether the driver can carry out the requested text modifications.
In particular, the driver should check the bitwise difference between the
txfAccelerator member and the dpText member to determine what abilities it
should simulate. If the driver can not carry out the modifications, GDI is
responsible for simulating the required modifications.
 
See Also
 
EngineRealizeFont, ExtTextOut, StrBlt