GlyphRun 類別

定義

表示單一大小之單一字型單一字體、使用單一呈現樣式的一系列圖像 (Glyph)。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.

Glyphs 元素代表 XAML 中 GlyphRun 的輸出。The 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, Boolean, Double, Single, 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(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 的雙向 (Bidirectional) 巢狀層次。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

取得或設定 UTF16 字碼指標的清單,代表 GlyphRun 的 Unicode 內容。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 的 em 大小。Gets or sets the em size used for rendering the GlyphRun.

GlyphIndices

取得或設定 UInt16 值的陣列,這些值表示呈現實體字型 (Physical Font) 中的圖像索引。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 之插入號 (Caret) 的字元點擊。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 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。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().

適用於