namespace SabreTools.Models.PortableExecutable
{
///
/// Contains information about an individual font in a font resource group. The structure definition
/// provided here is for explanation only; it is not present in any standard header file.
///
///
public sealed class FontDirEntry
{
///
/// A user-defined version number for the resource data that tools can use to read and write
/// resource files.
///
public ushort Version { get; set; }
///
/// The size of the file, in bytes.
///
public uint Size { get; set; }
///
/// The font supplier's copyright information.
///
/// 60 characters
public byte[]? Copyright { get; set; }
///
/// The type of font file.
///
public ushort Type { get; set; }
///
/// The point size at which this character set looks best.
///
public ushort Points { get; set; }
///
/// The vertical resolution, in dots per inch, at which this character set was digitized.
///
public ushort VertRes { get; set; }
///
/// The horizontal resolution, in dots per inch, at which this character set was digitized.
///
public ushort HorizRes { get; set; }
///
/// The distance from the top of a character definition cell to the baseline of the typographical
/// font.
///
public ushort Ascent { get; set; }
///
/// The amount of leading inside the bounds set by the PixHeight member. Accent marks and other
/// diacritical characters can occur in this area.
///
public ushort InternalLeading { get; set; }
///
/// The amount of extra leading that the application adds between rows.
///
public ushort ExternalLeading { get; set; }
///
/// An italic font if not equal to zero.
///
public byte Italic { get; set; }
///
/// An underlined font if not equal to zero.
///
public byte Underline { get; set; }
///
/// A strikeout font if not equal to zero.
///
public byte StrikeOut { get; set; }
///
/// The weight of the font in the range 0 through 1000. For example, 400 is roman and 700 is bold.
/// If this value is zero, a default weight is used. For additional defined values, see the
/// description of the LOGFONT structure.
///
public ushort Weight { get; set; }
///
/// The character set of the font. For predefined values, see the description of the LOGFONT
/// structure.
///
public byte CharSet { get; set; }
///
/// The width of the grid on which a vector font was digitized. For raster fonts, if the member
/// is not equal to zero, it represents the width for all the characters in the bitmap. If the
/// member is equal to zero, the font has variable-width characters.
///
public ushort PixWidth { get; set; }
///
/// The height of the character bitmap for raster fonts or the height of the grid on which a
/// vector font was digitized.
///
public ushort PixHeight { get; set; }
///
/// The pitch and the family of the font. For additional information, see the description of
/// the LOGFONT structure.
///
public byte PitchAndFamily { get; set; }
///
/// The average width of characters in the font (generally defined as the width of the letter x).
/// This value does not include the overhang required for bold or italic characters.
///
public ushort AvgWidth { get; set; }
///
/// The width of the widest character in the font.
///
public ushort MaxWidth { get; set; }
///
/// The first character code defined in the font.
///
public byte FirstChar { get; set; }
///
/// The last character code defined in the font.
///
public byte LastChar { get; set; }
///
/// The character to substitute for characters not in the font.
///
public byte DefaultChar { get; set; }
///
/// The character that will be used to define word breaks for text justification.
///
public byte BreakChar { get; set; }
///
/// The number of bytes in each row of the bitmap. This value is always even so that the rows
/// start on word boundaries. For vector fonts, this member has no meaning.
///
public ushort WidthBytes { get; set; }
///
/// The offset in the file to a null-terminated string that specifies a device name. For a
/// generic font, this value is zero.
///
public uint Device { get; set; }
///
/// The offset in the file to a null-terminated string that names the typeface.
///
public uint Face { get; set; }
///
/// This member is reserved.
///
public uint Reserved { get; set; }
///
/// The name of the device if this font file is designated for a specific device.
///
public string? DeviceName { get; set; }
///
/// The typeface name of the font.
///
public string? FaceName { get; set; }
}
}