Uređivanje

Dijeli putem


GlyphTypeface Class

Definition

Specifies a physical font face that corresponds to a font file on the disk.

public ref class GlyphTypeface : System::ComponentModel::ISupportInitialize
public class GlyphTypeface : System.ComponentModel.ISupportInitialize
type GlyphTypeface = class
    interface ISupportInitialize
Public Class GlyphTypeface
Implements ISupportInitialize
Inheritance
GlyphTypeface
Implements

Remarks

The GlyphTypeface object is a low level text object that corresponds to a single face of a font family as represented by an OpenType font file, or serialized as a block of memory in a document. The correct GlyphTypeface to use for a run of characters in a given logical font is normally determined by the WPF font system and recorded in the GlyphRun objects generated by the FormattedText object and line formatting text APIs.

The GlyphTypeface provides properties and methods for:

  • Obtaining font face common metrics, such as the ratio of ascent and descent to em size.

  • Obtaining metrics, outlines, and bitmaps for individual glyphs.

  • Serialization in a document.

The following list describes the type of application scenarios that illustrate the value of using the low-level control that the GlyphTypeface object provides.

  • A fixed format document generator may use the GlyphTypeface to obtain a binary image of the font for embedding in a document container

  • A printer driver may use the GlyphTypeface to obtain font glyph outlines or bitmaps, or the entire font image for sending to the printer.

  • A GlyphTypeface viewer application may use the GlyphTypeface to obtain metric and bitmap information.

Each glyph defines metrics that specify how it aligns with other Glyphs. The following graphic defines metric values for glyph characters.

Diagraph of glyph measurements
Metric values of glyph characters

Constructors

GlyphTypeface()

Initializes a new instance of the GlyphTypeface class.

GlyphTypeface(Uri, StyleSimulations)

Initializes a new instance of the GlyphTypeface class using the specified font file location and StyleSimulations value.

GlyphTypeface(Uri)

Initializes a new instance of the GlyphTypeface class using the specified font file location.

Properties

AdvanceHeights

Gets the advance heights for the glyphs represented by the GlyphTypeface object.

AdvanceWidths

Gets the advance widths for the glyphs represented by the GlyphTypeface object.

Baseline

Gets the baseline value for the GlyphTypeface.

BottomSideBearings

Gets the distance from bottom edge of the black box to the bottom end of the advance vector for the glyphs represented by the GlyphTypeface object.

CapsHeight

Gets the distance from the baseline to the top of an English capital, relative to em size, for the GlyphTypeface object.

CharacterToGlyphMap

Gets the nominal mapping of a Unicode code point to a glyph index as defined by the font 'CMAP' table.

Copyrights

Gets the copyright information for the GlyphTypeface object.

Descriptions

Gets the description information for the GlyphTypeface object.

DesignerNames

Gets the designer information for the GlyphTypeface object.

DesignerUrls

Gets the designer URL information for the GlyphTypeface object.

DistancesFromHorizontalBaselineToBlackBoxBottom

Gets the offset value from the horizontal Western baseline to the bottom of the glyph black box for the glyphs represented by the GlyphTypeface object.

EmbeddingRights

Gets the font embedding permission for the GlyphTypeface object.

FaceNames

Gets the face name for the GlyphTypeface object.

FamilyNames

Gets the family name for the GlyphTypeface object.

FontUri

Gets or sets the URI for the GlyphTypeface object.

GlyphCount

Gets the number of glyphs for the GlyphTypeface object.

Height

Gets the height of the character cell relative to the em size.

LeftSideBearings

Gets the distance from the leading end of the advance vector to the left edge of the black box for the glyphs represented by the GlyphTypeface object.

LicenseDescriptions

Gets the font license description information for the GlyphTypeface object.

ManufacturerNames

Gets the font manufacturer information for the GlyphTypeface object.

RightSideBearings

Gets the distance from the right edge of the black box to the right end of the advance vector for the glyphs represented by the GlyphTypeface object.

SampleTexts

Gets the sample text information for the GlyphTypeface object.

Stretch

Gets the FontStretch value for the GlyphTypeface object.

StrikethroughPosition

Gets a value that indicates the distance from the baseline to the strikethrough for the typeface.

StrikethroughThickness

Gets a value that indicates the thickness of the strikethrough relative to the font em size.

Style

Gets the style for the GlyphTypeface object.

StyleSimulations

Gets or sets the StyleSimulations for the GlyphTypeface object.

Symbol

Gets a value that indicates whether the GlyphTypeface font conforms to Unicode encoding.

TopSideBearings

Gets the distance from the top end of the vertical advance vector to the top edge of the black box for the glyphs represented by the GlyphTypeface object.

Trademarks

Gets the trademark notice information for the GlyphTypeface object.

UnderlinePosition

Gets the position of the underline in the GlyphTypeface.

UnderlineThickness

Gets the thickness of the underline relative to em size.

VendorUrls

Gets the vendor URL information for the GlyphTypeface object.

Version

Gets the font face version interpreted from the font's 'NAME' table.

VersionStrings

Gets the version string information for the GlyphTypeface object interpreted from the font's 'NAME' table.

Weight

Gets the designed weight of the font represented by the GlyphTypeface object.

Win32FaceNames

Gets the Win32 face name for the font represented by the GlyphTypeface object.

Win32FamilyNames

Gets the Win32 family name for the font represented by the GlyphTypeface object.

XHeight

Gets the Western x-height relative to em size for the font represented by the GlyphTypeface object.

Methods

ComputeSubset(ICollection<UInt16>)

Returns the binary image of the font subset based on a specified collection of glyphs.

Equals(Object)

Determines whether the specified object is equal to the current GlyphTypeface object.

GetFontStream()

Returns the font file stream represented by the GlyphTypeface object.

GetGlyphOutline(UInt16, Double, Double)

Returns a Geometry value describing the path for a single glyph in the font.

GetHashCode()

Serves as a hash function for GlyphTypeface.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

ISupportInitialize.BeginInit()

For a description of this member, see BeginInit().

ISupportInitialize.EndInit()

For a description of this member, see EndInit().

Applies to

See also