Jump to content

FATTRS: Difference between revisions

From EDM2
mNo edit summary
Ak120 (talk | contribs)
No edit summary
Line 1: Line 1:
== FATTRS ==
== FATTRS ==
Font-attributes structure.  
Font-attributes structure.  


=== Type ===  
=== Type ===  
 
  [[USHORT]]  usRecordLength
  [[OS2 API:DataType:USHORT|USHORT]]  usRecordLength
  USHORT  fsSelection
  [[OS2 API:DataType:USHORT|USHORT]] fsSelection
  [[LONG]]    lMatch
  [[OS2 API:DataType:LONG|LONG]]    lMatch
  [[CHAR]]    szFacename[ [[FACESIZE]] ]
  [[OS2 API:DataType:CHAR|CHAR]]    szFacename[ [[OS2 API:Constant:FACESIZE|FACESIZE]] ]
  USHORT  idRegistry
  [[OS2 API:DataType:USHORT|USHORT]] idRegistry
  USHORT  usCodePage
  [[OS2 API:DataType:USHORT|USHORT]] usCodePage
  LONG    lMaxBaselineExt
  [[OS2 API:DataType:LONG|LONG]]   lMaxBaselineExt
  LONG    lAveCharWidth
  [[OS2 API:DataType:LONG|LONG]]   lAveCharWidth
  USHORT  fsType
  [[OS2 API:DataType:USHORT|USHORT]] fsType
  USHORT  fsFontUse
  [[OS2 API:DataType:USHORT|USHORT]] fsFontUse
   
   
==== C Declaration Method ====
==== C Declaration Method ====
typedef struct
typedef struct


=== Fields ===
=== Fields ===
 
;usRecordLength:Length of record.
usRecordLength Length of record.
;fsSelection:Selection indicators.
 
:Flags causing the following features to be simulated by the system.
fsSelection   Selection indicators.
:Note: If an italic flag is applied to a font that is itself defined as italic, the font is slanted further by italic simulation.
                Flags causing the following features to be simulated by the
: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.
                system.
: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.
                Note: If an italic flag is applied to a font that is itself
: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.
                defined as italic, the font is slanted further by italic
::FATTR_SEL_ITALIC - Generate italic font.
                simulation.
::FATTR_SEL_UNDERSCORE - Generate underscored font.
                Underscore or strikeout lines are drawn using the appropriate
::FATTR_SEL_BOLD - Generate bold font. (Note that the resulting characters are wider than those in the original font.)
                attributes (for example, color) from the character bundle (see
::FATTR_SEL_STRIKEOUT - Generate font with overstruck characters.
                the CHARBUNDLE datatype), not the line bundle (see LINEBUNDLE).
::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.
                The width of the line, and the vertical position of the line in
;lMatch:Matched-font identity.
                font space, are determined by the font. Horizontally, the line
;szFacename[ [[FACESIZE]] ]: Typeface name.
                starts from a point in font space directly above or below the
:The typeface name of the font, for example, Tms Rmn.
                start point of each character, and extends to a point directly
;idRegistry:Registry identifier.
                above or below the escapement point for that character.
:Font registry identifier (zero if unknown).
 
;usCodePage:Code page.
                For this purpose, the start and escapement points are those
: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.
                applicable to left-to-right or right-to-left character
;lMaxBaselineExt:Maximum baseline extension.
                directions (see GpiSetCharDirection in Graphics Programming
:For raster fonts, this should be the height of the required font, in world coordinates. For outline fonts, this should be zero.
                Interface), even if the string is currently being drawn in a
;lAveCharWidth:Average character width.
                top-to-bottom or bottom-to-top direction.
: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.
                For left-to-right or right-to-left directions, any white space
::FATTR_TYPE_KERNING - Enable kerning (PostScript only).
                generated by the character extra and character break extra  
::FATTR_TYPE_MBCS - Font for mixed single- and double-byte code pages.                 
                attributes (see GpiSetCharExtra and GpiSetCharBreakExtra in  
::FATTR_TYPE_DBCS - Font for double-byte code pages.
                Graphics Programming Interface Programming Reference), as well  
::FATTR_TYPE_ANTIALIASED - Antialiased font required. Only valid if supported by the device driver.
                as increments provided by the vector of increments on  
;fsFontUse:Font-use indicators.
                GpiCharStringPos and GpiCharStringPosAt, are also  
:These flags indicate how the font is to be used. They affect presentation speed and font quality.
                underlined/overstruck, so that in these cases the line is
::FATTR_FONTUSE_NOMIX - Text is not mixed with graphics and can be written without regard to any interaction with graphics objects.
                continuous for the string.
::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).
                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[ [[OS2 API:Constant:FACESIZE|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).
 
[[OS2_API | Back to OS/2 API]]
 


[[Category:The OS/2 API Project]]
[[Category:Data type]]

Revision as of 17:35, 1 November 2016

FATTRS

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).