Jump to content

FATTRS

From EDM2
(Redirected from PFATTRS)

Font-attributes structure.

Type

USHORT  usRecordLength
USHORT  fsSelection
LONG    lMatch
CHAR    szFacename[ FACESIZE ]
USHORT  idRegistry
USHORT  usCodePage
LONG    lMaxBaselineExt
LONG    lAveCharWidth
USHORT  fsType
USHORT  fsFontUse

C Declaration Method

typedef struct

Fields

usRecordLength
Length of record.
fsSelection
Selection indicators.
Flags causing the following features to be simulated by the system.
Note: If an italic flag is applied to a font that is itself defined as italic, the font is slanted further by italic simulation.
Underscore or strikeout lines are drawn using the appropriate attributes (for example, color) from the character bundle (see the CHARBUNDLE datatype), not the line bundle (see LINEBUNDLE). The width of the line, and the vertical position of the line in font space, are determined by the font. Horizontally, the line starts from a point in font space directly above or below the start point of each character, and extends to a point directly above or below the escapement point for that character.
For this purpose, the start and escapement points are those applicable to left-to-right or right-to-left character directions (see GpiSetCharDirection in Graphics Programming Interface), even if the string is currently being drawn in a top-to-bottom or bottom-to-top direction.
For left-to-right or right-to-left directions, any white space generated by the character extra and character break extra attributes (see GpiSetCharExtra and GpiSetCharBreakExtra in Graphics Programming Interface Programming Reference), as well as increments provided by the vector of increments on GpiCharStringPos and GpiCharStringPosAt, are also underlined/overstruck, so that in these cases the line is continuous for the string.
FATTR_SEL_ITALIC - Generate italic font.
FATTR_SEL_UNDERSCORE - Generate underscored font.
FATTR_SEL_BOLD - Generate bold font. (Note that the resulting characters are wider than those in the original font.)
FATTR_SEL_STRIKEOUT - Generate font with overstruck characters.
FATTR_SEL_OUTLINE - Use an outline font with hollow characters. If this flag is not set, outline font characters are filled. Setting this flag normally gives better performance, and for sufficiently small characters (depending on device resolution) there may be little visual difference.
lMatch
Matched-font identity.
szFacename[ FACESIZE ]
Typeface name.
The typeface name of the font, for example, Tms Rmn.
idRegistry
Registry identifier.
Font registry identifier (zero if unknown).
usCodePage
Code page.
If zero, the current Gpi code page (see GpiSetCp in Graphics Programming Interface) is used. A subsequent GpiSetCp function changes the code page used for this logical font.
lMaxBaselineExt
Maximum baseline extension.
For raster fonts, this should be the height of the required font, in world coordinates. For outline fonts, this should be zero.
lAveCharWidth
Average character width.
For raster fonts, this should be the width of the required font, in world coordinates. For outline fonts, this should be zero.
fsType
Type indicators.
FATTR_TYPE_KERNING - Enable kerning (PostScript only).
FATTR_TYPE_MBCS - Font for mixed single- and double-byte code pages.
FATTR_TYPE_DBCS - Font for double-byte code pages.
FATTR_TYPE_ANTIALIASED - Antialiased font required. Only valid if supported by the device driver.
fsFontUse
Font-use indicators.
These flags indicate how the font is to be used. They affect presentation speed and font quality.
FATTR_FONTUSE_NOMIX - Text is not mixed with graphics and can be written without regard to any interaction with graphics objects.
FATTR_FONTUSE_OUTLINE - Select an outline (vector) font. The font characters can be used as part of a path definition. If this flag is not set, an outline font might or might not be selected. If an outline font is selected, however, character widths are rounded to an integral number of pels.
FATTR_FONTUSE_TRANSFORMABLE - Characters can be transformed (for example, scaled, rotated, or sheared).

Sample Source

typedef struct _FATTRS {
  USHORT     usRecordLength;        /*  Length of record. */
  USHORT     fsSelection;           /*  Selection indicators. */
  LONG       lMatch;                /*  Matched-font identity. */
  CHAR       szFacename[FACESIZE];  /*  Typeface name. */
  USHORT     idRegistry;            /*  Registry identifier. */
  USHORT     usCodePage;            /*  Code page. */
  LONG       lMaxBaselineExt;       /*  Maximum baseline extension. */
  LONG       lAveCharWidth;         /*  Average character width. */
  USHORT     fsType;                /*  Type indicators. */
  USHORT     fsFontUse;             /*  Font-use indicators. */
} FATTRS;

typedef   FATTRS   * PFATTRS ;