GlyphRun 类

定义

表示一序列标志符号,这些标志符号来自具有一种字号和一种呈现样式的一种字体。Represents a sequence of glyphs from a single face of a single font at a single size, and with a single rendering style.

public ref class GlyphRun : System::ComponentModel::ISupportInitialize
public class GlyphRun : System.ComponentModel.ISupportInitialize
type GlyphRun = class
    interface DUCE.IResource
    interface ISupportInitialize
Public Class GlyphRun
Implements ISupportInitialize
继承
GlyphRun
实现

注解

GlyphRun对象包含字体详细信息,如标志符号索引和单个标志符号位置。The GlyphRun object includes font details such as glyph indices and individual glyph positions. 此外, GlyphRun对象还包含生成运行时所依据的原始 Unicode 码位、字符到标志符号缓冲区的偏移量映射信息以及每个字符和每个标志符号的标志。In addition, The GlyphRun object contains the original Unicode code points the run was generated from, character to glyph buffer offset mapping information, and per-character and per-glyph flags.

元素表示 XAML 中的的GlyphRun输出。 GlyphsThe Glyphs element represents the output of a GlyphRun in XAML. 以下标记语法用于描述Glyphs元素。The following markup syntax is used to describe the Glyphs element.

<!-- The example shows how to use a Glyphs object. -->
<Page
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  >

   <StackPanel Background="PowderBlue">

      <Glyphs
         FontUri             = "C:\WINDOWS\Fonts\TIMES.TTF"
         FontRenderingEmSize = "100"
         StyleSimulations    = "BoldSimulation"
         UnicodeString       = "Hello World!"
         Fill                = "Black"
         OriginX             = "100"
         OriginY             = "200"
      />

   </StackPanel>
</Page>

每个字形都定义了用于指定其与其他Glyphs的对齐方式的指标。Each glyph defines metrics that specify how it aligns with other Glyphs. 以下图形定义两种不同字形字符的各种排版品质。The following graphic defines the various typographic qualities of two different glyph characters.

字形度量的示意图Diagraph of glyph measurements
两个不同的字形字符的各种排字质量Various typographic qualities of two different glyph characters

构造函数

GlyphRun()

初始化 GlyphRun 类的新实例。Initializes a new instance of the GlyphRun class.

GlyphRun(GlyphTypeface, Int32, Boolean, Double, IList<UInt16>, Point, IList<Double>, IList<Point>, IList<Char>, String, IList<UInt16>, IList<Boolean>, XmlLanguage)

通过指定类的属性,初始化 GlyphRun 类的一个新实例。Initializes a new instance of the GlyphRun class by specifying properties of the class.

GlyphRun(GlyphTypeface, Int32, String, IList<UInt16>, IList<Boolean>, XmlLanguage, Boolean, Double, Single, IList<UInt16>, Point, IList<Double>, IList<Point>, IList<Char>)

通过指定类的属性,初始化 GlyphRun 类的一个新实例。Initializes a new instance of the GlyphRun class by specifying properties of the class.

GlyphRun(Single)

初始化 GlyphRun 类的新实例。Initializes a new instance of the GlyphRun class.

属性

AdvanceWidths

获取或设置 Double 值的列表,这些值表示对应于字形索引的步进宽度。Gets or sets the list of Double values that represent the advance widths corresponding to the glyph indices.

BaselineOrigin

获取或设置 GlyphRun 的基线原点。Gets or sets the baseline origin of the GlyphRun.

BidiLevel

获取或设置 GlyphRun 的双向嵌套级别。Gets or sets the bidirectional nesting level of the GlyphRun.

CaretStops

获取或设置 Boolean 值的列表,这些值确定表示 GlyphRun 的 Unicode 中每个 UTF16 码位是否具有脱字符。Gets or sets the list of Boolean values that determine whether there are caret stops for every UTF16 code point in the Unicode representing the GlyphRun.

Characters

获取或设置表示 GlyphRun 的 Unicode 内容的 UTF16 码位列表。Gets or sets the list of UTF16 code points that represent the Unicode content of the GlyphRun.

ClusterMap

获取或设置将 UInt16 中的字符映射到字形索引的 GlyphRun 值列表。Gets or sets the list of UInt16 values that maps characters in the GlyphRun to glyph indices.

DeviceFontName

获取或设置已优化其 GlyphRun 的特定设备字体。Gets or sets the specific device font for which the GlyphRun has been optimized.

FontRenderingEmSize

获取或设置用于呈现 GlyphRun 的全身大小。Gets or sets the em size used for rendering the GlyphRun.

GlyphIndices

获取或设置 UInt16 值的数组,这些值表示采用呈现物理字体的标志符号索引。Gets or sets an array of UInt16 values that represent the glyph indices in the rendering physical font.

GlyphOffsets

获取或设置 Point 值的数组,这些值表示 GlyphRun 中字形的偏移量。Gets or sets an array of Point values representing the offsets of the glyphs in the GlyphRun.

GlyphTypeface

获取或设置 GlyphTypefaceGlyphRunGets or sets the GlyphTypeface for the GlyphRun.

IsHitTestable

获取一个值,该值指示 GlyphRun 中是否存在任何有效的插入符号字符命中。Gets a value indicating whether there are any valid caret character hits within the GlyphRun.

IsSideways

获取或设置一个值,该值指示是否旋转标志字符。Gets or sets a value indicating whether to rotate glyphs.

Language

获取或设置 XmlLanguageGlyphRunGets or sets the XmlLanguage for the GlyphRun.

PixelsPerDip

获取或设置呈现文本时应使用的 PixelsPerDip。Get or sets the PixelsPerDip at which the text should be rendered.

方法

BuildGeometry()

检索 GeometryGlyphRunRetrieves the Geometry for the GlyphRun.

ComputeAlignmentBox()

搜索 GlyphRun 的对齐框。Retrieves the alignment box for the GlyphRun.

ComputeInkBoundingBox()

检索 GlyphRun 的墨迹边界框。Retrieves the ink bounding box for the GlyphRun.

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetCaretCharacterHitFromDistance(Double, Boolean)

检索 CharacterHit 值,该值表示 GlyphRun 的插入符号的字符命中。Retrieves the CharacterHit value that represents the character hit of the caret of the GlyphRun.

GetDistanceFromCaretCharacterHit(CharacterHit)

检索 GlyphRun 的前导边缘相对于脱字符(包含指定的字符命中)的前导边缘或尾随边缘的偏移量。Retrieves the offset from the leading edge of the GlyphRun to the leading or trailing edge of a caret stop containing the specified character hit.

GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetNextCaretCharacterHit(CharacterHit)

检索 GlyphRun 中逻辑方向上的下一个有效插入符号字符命中。Retrieves the next valid caret character hit in the logical direction in the GlyphRun.

GetPreviousCaretCharacterHit(CharacterHit)

检索 GlyphRun 中逻辑方向上的上一个有效插入符号字符命中。Retrieves the previous valid caret character hit in the logical direction in the GlyphRun.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

显式界面实现

ISupportInitialize.BeginInit()

有关此成员的说明,请参见 BeginInit()For a description of this member, see BeginInit().

ISupportInitialize.EndInit()

有关此成员的说明,请参见 EndInit()For a description of this member, see EndInit().

适用于