Class GdiFontMetrics
Class that obtains OutlineTextMetrics for a TrueType font
Inheritance
Inherited Members
Namespace: Telerik.Pdf.Gdi
Assembly: TelerikData.dll
Syntax
public class GdiFontMetrics
Fields
GDI_ERROR
Declaration
public const long GDI_ERROR = 4294967295L
Field Value
System.Int64
|
Properties
AnsiKerningPairs
Gets a collection of kerning pairs for characters defined in the WinAnsiEncoding scheme only.
Declaration
public GdiKerningPairs AnsiKerningPairs { get; }
Property Value
GdiKerningPairs
|
Ascent
Specifies the maximum distance characters in this font extend above the base line. This is the typographic ascent for the font.
Declaration
public int Ascent { get; }
Property Value
System.Int32
|
AverageWidth
Gets the average width of glyphs in a font.
Declaration
public int AverageWidth { get; }
Property Value
System.Int32
|
BoundingBox
Gets the font's bounding box.
Declaration
public int[] BoundingBox { get; }
Property Value
System.Int32[]
|
Remarks
This is the smallest rectangle enclosing the shape that would result if all the glyphs of the font were placed with their origins cooincident and then filled.
CapHeight
Gets the distance between the baseline and the approximate height of uppercase letters.
Declaration
public int CapHeight { get; }
Property Value
System.Int32
|
Descent
Specifies the maximum distance characters in this font extend below the base line. This is the typographic descent for the font.
Declaration
public int Descent { get; }
Property Value
System.Int32
|
EmSquare
Specifies the number of logical units defining the x- or y-dimension of the em square for this font. The common value for EmSquare is 2048.
Declaration
public int EmSquare { get; }
Property Value
System.Int32
|
Remarks
The number of units in the x- and y-directions are always the same for an em square.)
FaceName
Retrieves the typeface name of the font that is selected into the device context supplied to the GdiFontMetrics constructor.
Declaration
public string FaceName { get; }
Property Value
System.String
|
FirstChar
Gets the value of the first character defined in the font
Declaration
public int FirstChar { get; }
Property Value
System.Int32
|
Flags
Gets a collection of flags defining various characteristics of a font (e.g. serif or sans-serif, symbolic, etc).
Declaration
public int Flags { get; }
Property Value
System.Int32
|
IsEmbeddable
Gets a value indicating whether the font can be legally embedded within a document.
Declaration
public bool IsEmbeddable { get; }
Property Value
System.Boolean
|
IsSubsettable
Gets a value indicating whether the font can be legally subsetted.
Declaration
public bool IsSubsettable { get; }
Property Value
System.Boolean
|
ItalicAngle
Gets the main italic angle of the font expressed in tenths of a degree counterclockwise from the vertical.
Declaration
public int ItalicAngle { get; }
Property Value
System.Int32
|
Remarks
Regular (roman) fonts have a value of zero. Italic fonts typically have a negative italic angle (that is, they lean to the right).
KerningPairs
Gets a collection of kerning pairs.
Declaration
public GdiKerningPairs KerningPairs { get; }
Property Value
GdiKerningPairs
|
LastChar
Gets the value of the last character defined in the font
Declaration
public int LastChar { get; }
Property Value
System.Int32
|
MaxWidth
Gets the maximum width of glyphs in a font.
Declaration
public int MaxWidth { get; }
Property Value
System.Int32
|
StemV
TODO: The thickness, measured horizontally, of the dominant vertical stems of the glyphs in the font.
Declaration
public int StemV { get; }
Property Value
System.Int32
|
XHeight
Gets the distance between the baseline and the approximate height of non-ascending lowercase letters.
Declaration
public int XHeight { get; }
Property Value
System.Int32
|
Methods
GetAnsiWidths()
Returns the width, in PDF units, of consecutive glyphs for the WinAnsiEncoding only.
Declaration
public int[] GetAnsiWidths()
Returns
System.Int32[]
An array consisting of 256 elements. |
GetFontData()
Gets font metric data for a TrueType font or TrueType collection.
Declaration
public byte[] GetFontData()
Returns
System.Byte[]
|
GetWidths()
Retrieves the widths, in PDF units, of consecutive glyphs.
Declaration
public int[] GetWidths()
Returns
System.Int32[]
An array of integers whose size is equal to the number of glyphs specified in the 'maxp' table. The width at location 0 is the width of glyph with index 0, The width at location 1 is the width of glyph with index 1, etc... |
MapCharacter(Char)
Translates the supplied character to a glyph index using the currently selected font.
Declaration
public int MapCharacter(char c)
Parameters
System.Char
c
A unicode character. |
Returns
System.Int32
|