Class FontConfigs

Class FontConfigs

Namespace: Aspose.Cells
Assembly: Aspose.Cells.dll (25.2.0)

Specifies font settings

public class FontConfigs

Inheritance

objectFontConfigs

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

FontConfigs()

public FontConfigs()

Properties

DefaultFontName

Gets or sets the default font name.

public static string DefaultFontName { get; set; }

Property Value

string

PreferSystemFontSubstitutes

Indicate whether to use system font substitutes first or not when a font is not presented and the substitute of this font is not set. e.g. On Ubuntu, “Arial” font is generally substituted by “Liberation Sans”. Default value is false.

public static bool PreferSystemFontSubstitutes { get; set; }

Property Value

bool

Methods

GetFontSources()

Gets a copy of the array that contains the list of sources

public static FontSourceBase[] GetFontSources()

Returns

FontSourceBase[]

GetFontSubstitutes(string)

Returns array containing font substitute names to be used if original font is not presented.

public static string[] GetFontSubstitutes(string originalFontName)

Parameters

originalFontName string

originalFontName

Returns

string[]

An array containing font substitute names to be used if original font is not presented.

IsFontAvailable(string)

Indicate whether the font is available.

public static bool IsFontAvailable(string fontName)

Parameters

fontName string

font name

Returns

bool

true if font is available, otherwise false.

SetFontFolder(string, bool)

Sets the fonts folder

public static void SetFontFolder(string fontFolder, bool recursive)

Parameters

fontFolder string

The folder that contains TrueType fonts.

recursive bool

Determines whether or not to scan subfolders.

SetFontFolders(string[], bool)

Sets the fonts folders

public static void SetFontFolders(string[] fontFolders, bool recursive)

Parameters

fontFolders string[]

The folders that contains TrueType fonts.

recursive bool

Determines whether or not to scan subfolders.

SetFontSources(FontSourceBase[])

Sets the fonts sources.

public static void SetFontSources(FontSourceBase[] sources)

Parameters

sources FontSourceBase[]

An array of sources that contain TrueType fonts.

SetFontSubstitutes(string, string[])

Font substitute names for given original font name.

public static void SetFontSubstitutes(string originalFontName, string[] substituteFontNames)

Parameters

originalFontName string

Original font name.

substituteFontNames string[]

List of font substitute names to be used if original font is not presented.