Class FontSettings
Namespace: Aspose.Imaging
Assembly: Aspose.Imaging.dll (25.2.0)
General imaging vector formats renderer font settings.
public static class FontSettings
Inheritance
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Properties
DefaultFontName
Gets or sets the default name of the font.
public static string DefaultFontName { get; set; }
Property Value
GetSystemAlternativeFont
Gets or sets a value indicating whether [get alternative font].
public static bool GetSystemAlternativeFont { get; set; }
Property Value
Methods
GetDefaultFontsFolders()
Gets the default fonts folders.
public static string[] GetDefaultFontsFolders()
Returns
string[]
Returns system folder
GetFontsFolders()
Gets a copy of the array that contains the list of folders where Aspose.Words looks for TrueType fonts.
public static string[] GetFontsFolders()
Returns
string[]
A copy of the current font locations.
Remarks
The returned value is a copy of the data that Aspose.Words uses. If you change the entries in the returned array, it will have no effect on document rendering. To specify new font locations use the Aspose.Imaging.FontSettings.SetFontsFolders(System.String[],System.Boolean) method.
Reset()
Resets the fonts folder and default font name to the system default.
public static void Reset()
SetFontsFolder(string)
This is a shortcut to Aspose.Imaging.FontSettings.SetFontsFolders(System.String[],System.Boolean) for setting only one font directory. There are no checks performed on the fonts folder.
public static void SetFontsFolder(string fontFolder)
Parameters
fontFolder
string
The font folder.
SetFontsFolders(string[], bool)
Sets the folders where TrueType fonts are loaded from and clears all loaded fonts. There are no checks performed on the fonts folders.
public static void SetFontsFolders(string[] fontsFolders, bool recursive)
Parameters
fontsFolders
string[]
The fonts folders.
recursive
bool
if set to true
[recursive].
UpdateFonts()
Updates fonts cache for PSD files that contain text layers. This method guarantees that fonts from folder fontsFolder using
method FontSettings.SetFontsFolder(fontsFolder) or after reset fonts using FontSettings.Reset() will be taken into consideration when processing PSD files. Please use this method each time when
FontSettings.SetFontsFolder(fontsFolder) or FontSettings.Reset() called for PSD images. Without calling this Method there is no guarantee that fonts will be updated.
public static void UpdateFonts()