Back to DOM
ScriptFontClass
Definition
- Namespace
- DOM.Styles
- Assembly
- DOM.dll
Describes a font mapping for a specific script/language category.
Remarks
pairs a script identifier with a typeface name and is used by themes and font schemes to provide script-specific font selection (for example Latin, East Asian or complex script families). Consumers should treat the as the script/category key and as the font family to apply for that script. ScriptFont ScriptName TypeFace Script fonts are collected inside . ScriptFonts
Examples
csharp
1// 1. Latin script font mapping
2var sf = new ScriptFont { ScriptName = "Latn", TypeFace = "Calibri" };
3
csharp
1// 2. Arabic script font mapping
2var sf = new ScriptFont { ScriptName = "Arab", TypeFace = "Traditional Arabic" };
3
csharp
1// 3. Hebrew script font mapping
2var sf = new ScriptFont { ScriptName = "Hebr", TypeFace = "David" };
3
csharp
1// 4. Add to a FontScheme
2var scheme = new FontScheme
3{
4 Name = "Custom",
5 ScriptFonts = new List<ScriptFont>
6 {
7 new ScriptFont { ScriptName = "Latn", TypeFace = "Calibri" },
8 new ScriptFont { ScriptName = "Arab", TypeFace = "Traditional Arabic" }
9 }
10};
11
csharp
1// 5. CJK script font mapping
2var sf = new ScriptFont { ScriptName = "Jpan", TypeFace = "MS Gothic" };
3
Properties
ScriptName
Gets or sets the script identifier this font mapping applies to.
TypeFace
Gets or sets the typeface (font family) to use for the given script.