This class template contains logical font properties.

template <class character>
struct logical_font
  int height;
  int width;
  int escapement;
  int orientation;
  int weight;
  byte italic;
  byte underline;
  byte strikeout;
  byte character_set;
  byte output_precision;
  byte clip_precision;
  byte quality;
  byte pitch_and_family;
  character face_name[face_size];


height The character height or character cell height (in logical units). The character height (also known as the em height) is the character cell height minus the internal leading. The font mapper interprets the specified height as follows.

>0 The font mapper transforms the value into device units and matches it to the cell height of available fonts.
0 The font mapper uses the default height value when searching for a match.
<0 The font mapper transforms the value into device units and matches its absolute value to the character height of available fonts.

The font mapper obtains the largest font not exceeding the requested size.

The font mapping occurs only when the font is first used.

width The average width (in logical units) of characters in the font. If this member is zero, the aspect ratio of the device is compared to the aspect ratio of the available fonts to ind the closest match (minimizing the absolute value of the difference).
escapement The angle (in tenths of a degree) between the escapement vector and the x-axis of the device. The escapement vector is parallel to the base line of a row of text.

When advanced graphics mode is set, the escapement angle of the string may be specified independently to the orientation angle of the string's characters.

When compatible graphics mode is in effect, this member specifies both the escapement and orientation. This member and the member Orientation should be set to the same value.

orientation The angle (in tenths of a degree) between a character's base line and the x-axis of the device.
weight The weight of the font. The weight of a font ranges from 0 - 1000. The enumeration font_weight contains standard values.
italic true if the font is an italic font.
underline true if the font is an underline font.
strikeout true if the font is overstruck.
character_set The character set. The value font_characters::oem specifies a character set that is dependent upon the operating system.

The value font_characters::_default allows the name and size of a font to fully describe the logical font. If the specified font name does not exist, a font from another character set may be substituted.

This member is important in the font mapping process. If you specify a type face name (member face_name), this member should match the character set of the type face.

output_precision The output precision. The output precision defines how closely the output must match the requested font's: height, width, character orientation, escapement, pitch and font type. A value from the enumeration font_output may be specified.
clip_precision Specifies the clipping precision. The clipping precision defines how characters lying partially outside the clipping region are clipped. flags from the enumeration font_clip may be specified.
quality The output quality. The output quality defines how the graphics device interface attempts to match the logical font attributes to those of an actual physical font. A value from the enumeration font_quality may be specified.
pitch_and_family The pitch and family of the font. The two low-order bits specify the pitch of the font. One of the following values may be given:

Bits 4 through 7 specify the font family which may be selected from the enumeration font_family.

A complete value for this member is obtained by using the bitwise OR operator to combine a pitch constant with a family constant.

face_name A string that specifies the typeface name of the font. The string's length (including the null terminator) may not exceed 32 characters. If an empty string is specified, the first font that matches the other attributes is used.


The default constructor initializes all the members to zero.

For unit mode unit::pixel, the height for a font with a given point size is:

height = point_size * get_device_capabilities(device,capability::logical_pixels_y) / 72;