Class OdfTextFontFallbackOptions
Configures text segmentation and font fallback behavior. 設定文字分段與字型遞補行為。
public sealed class OdfTextFontFallbackOptions
- Inheritance
-
OdfTextFontFallbackOptions
- Inherited Members
Constructors
OdfTextFontFallbackOptions()
Short overload of OdfTextFontFallbackOptions that uses default values for all optional parameters and forwards to the full overload. 便利多載:OdfTextFontFallbackOptions 的所有可選參數使用預設值並轉呼叫最長多載。
public OdfTextFontFallbackOptions()
OdfTextFontFallbackOptions(string?)
Short overload of OdfTextFontFallbackOptions that accepts baseFont; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 baseFont;其餘可選參數使用預設值並轉呼叫最長 OdfTextFontFallbackOptions 多載。
public OdfTextFontFallbackOptions(string? baseFont)
Parameters
baseFontstring
OdfTextFontFallbackOptions(string?, bool)
Initializes a new instance of the OdfTextFontFallbackOptions class. 初始化 OdfTextFontFallbackOptions 類別的新執行個體。
public OdfTextFontFallbackOptions(string? baseFont, bool declareDefaultCjkFallbackFonts)
Parameters
baseFontstringThe base CJK font family. / 基礎 CJK 字型家族。
declareDefaultCjkFallbackFontsboolA value indicating whether default CJK font-face declarations are written. / 是否寫入預設 CJK font-face 宣告。
Properties
BaseFont
Gets the base font family used before fallback mapping is applied. 取得套用遞補對照前使用的基礎字型家族。
public string BaseFont { get; }
Property Value
DeclareDefaultCjkFallbackFonts
Gets a value indicating whether the default CJK font-face declarations are written. 取得是否寫入預設 CJK font-face 宣告。
public bool DeclareDefaultCjkFallbackFonts { get; }
Property Value
FontContext
Gets the font context used for text segmentation; null uses the owning document's context. 取得文字分段所用的字型情境;為 null 時使用所屬文件的字型情境。
public OdfFontContext? FontContext { get; init; }
Property Value
Methods
Cns11643()
Short overload of Cns11643 that uses default values for all optional parameters and forwards to the full overload. 便利多載:Cns11643 的所有可選參數使用預設值並轉呼叫最長多載。
public static OdfTextFontFallbackOptions Cns11643()
Returns
Cns11643(string?)
Creates options for CNS 11643 full-font-library fallback. 建立 CNS 11643 全字庫情境的字型遞補設定。
public static OdfTextFontFallbackOptions Cns11643(string? baseFont)
Parameters
baseFontstringThe base CJK font family. / 基礎 CJK 字型家族。
Returns
- OdfTextFontFallbackOptions
The configured fallback options. / 已設定的遞補選項。
Custom(string?, IReadOnlyList<OdfFontFaceInfo>)
Short overload of Custom that uses the ambient font context; forwards to the full overload. 便利多載:Custom 使用環境字型情境(文件情境或 Default),轉呼叫最長多載。
public static OdfTextFontFallbackOptions Custom(string? baseFont, IReadOnlyList<OdfFontFaceInfo> fontFaces)
Parameters
baseFontstringThe base CJK font family. / 基礎 CJK 字型家族。
fontFacesIReadOnlyList<OdfFontFaceInfo>The font-face declarations to write into the document. / 要寫入文件的 font-face 宣告集合。
Returns
- OdfTextFontFallbackOptions
The configured fallback options. / 已設定的遞補選項。
Custom(string?, IReadOnlyList<OdfFontFaceInfo>, OdfFontContext?)
Creates options that declare caller-supplied font faces for custom rare-glyph fonts. 建立宣告呼叫端自訂 font-face 的遞補選項,供自訂罕字字型使用。
public static OdfTextFontFallbackOptions Custom(string? baseFont, IReadOnlyList<OdfFontFaceInfo> fontFaces, OdfFontContext? fontContext)
Parameters
baseFontstringThe base CJK font family. / 基礎 CJK 字型家族。
fontFacesIReadOnlyList<OdfFontFaceInfo>The font-face declarations to write into the document. / 要寫入文件的 font-face 宣告集合。
fontContextOdfFontContextThe font context used for segmentation; null uses the document context or Default. / 分段所用的字型情境;為 null 時使用文件情境或 Default。
Returns
- OdfTextFontFallbackOptions
The configured fallback options. / 已設定的遞補選項。
Remarks
Combine with RegisterSupplementaryPlaneFontMapping(string, IReadOnlyDictionary<int, string>) so text segmentation routes supplementary-plane characters to the declared fonts. 可搭配 RegisterSupplementaryPlaneFontMapping(string, IReadOnlyDictionary<int, string>) 使用,讓文字分段將增補平面字元導向所宣告的字型。
Exceptions
- ArgumentNullException
當
fontFaces為 null 時擲出- ArgumentException
當任一 font-face 宣告的名稱或字型家族為空白時擲出
HanaMin()
Creates options for Hanazono Mincho fallback. 建立花園明朝字型遞補設定。
public static OdfTextFontFallbackOptions HanaMin()
Returns
- OdfTextFontFallbackOptions
The configured fallback options. / 已設定的遞補選項。
Jigmo()
Creates options for Jigmo fallback. 建立字雲字型遞補設定。
public static OdfTextFontFallbackOptions Jigmo()
Returns
- OdfTextFontFallbackOptions
The configured fallback options. / 已設定的遞補選項。