GetScriptFont

Fonts.GetScriptFont method

Gets the font name associated with a specific script tag from the presentation theme.

public string GetScriptFont(string script)
ParameterTypeDescription
scriptStringThe BCP-47 script code (e.g., “Latn”, “Cyrl”, “Jpan”) used to identify a writing system.

Return Value

The name of the font used for the specified script, or null if the script is not defined.

Examples

This example demonstrates how to retrieve the font assigned to the Cyrillic script in the presentation theme.

[C#]
string font = presentation.MasterTheme.FontScheme.Major.GetScriptFont("Cyrl");
Console.WriteLine("Font for Cyrillic script: " + font);

See Also