Class FontsSubsystem
Namespace: Aspose.Note.Fonts
Assembly: Aspose.Note.dll (25.6.0)
Base class implementing Aspose.Note.Fonts.IFontsSubsystem interface.Provides functionality for default font and font’s substitutions.Override Aspose.Note.Fonts.FontsSubsystem.FetchFontFamily protected member function in a derived class to implement logic for retrieving of System.Drawing.FontFamily object.
public abstract class FontsSubsystem
: Aspose.Words.IFontsSubsystem
{
}
Inheritance
Derived
Implements
Inherited Members
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
FontsSubsystem(Stream, Dictionary<string, string="">)
Initializes a new instance of the Aspose.Note.Fonts.FontsSubsystem class.
protected FontsSubsystem(Stream defaultFont, Dictionary<string, string> fontsSubstitutions = null)
{
}
Parameters
defaultFont
Stream
The stream containing default Font.
fontsSubstitutions
Dictionary
<
string
, string
>
The fonts substitutions.
FontsSubsystem(string, Dictionary<string, string="">)
Initializes a new instance of the Aspose.Note.Fonts.FontsSubsystem class.
protected FontsSubsystem(string defaultFontFile, Dictionary<string, string> fontsSubstitutions = null)
{
}
This is the reformatted version of your provided code. The adjustments include proper indentation and spacing to conform with standard C# conventions for improved readability.
Parameters
defaultFontFile
string
The stream containing default Font.
fontsSubstitutions
Dictionary
<
string
, string
>
The fonts substitutions.
FontsSubsystem()
Initializes a new instance of the Aspose.Note.Fonts.FontsSubsystem class.
protected void FontsSubsystem()
{
}
Properties
DefaultFont
Gets or sets default font.
public FontFamily DefaultFont
{
get;
protected set;
}
Property Value
Methods
AddFont(Stream, string)
Add the font.
public void AddFont(Stream stream, string tempFolder)
{
}
Parameters
stream
Stream
The stream containing the font.
tempFolder
string
The temp Folder.
AddFont(Stream)
Add the font.
public void AddFont(Stream stream)
{
}
Parameters
stream
Stream
The stream containing the font.
AddFont(string)
Add the font.
public void AddFont(string file)
{
}
Parameters
file
string
The path to the file containing the font.
AddFontSubstitution(string, string)
Adds font substitution.
public void AddFontSubstitution(
string substituted,
string substitution
)
{
}
public void AnotherMethod()
{
}
Parameters
substituted
string
The substituted font name.
substitution
string
The substitution font name.
FetchFontFamily(string)
Fetches font family as a candidate for GetFontFamily.
protected abstract FontFamily FetchFontFamily(string fontName)
{
}
Parameters
fontName
string
The font name.
Returns
The System.Drawing.FontFamily.
FindFontFamilyInInternalCollection(string)
Tries to find font family in internal collection of GDI fonts.
protected FontFamily FindFontFamilyInInternalCollection(string fontFamilyName)
{
foreach (var fontFamily in InternalFontFamilies)
{
if (fontFamily.Name == fontFamilyName)
return fontFamily;
}
return null;
}
Parameters
fontFamilyName
string
The font family name.
Returns
The System.Drawing.FontFamily.
GetFontFamily(string)
Gets font family.
public virtual FontFamily GetFontFamily(string fontName)
{
}
Parameters
fontName
string
The font name.
Returns
The System.Drawing.FontFamily.
LoadFontsFromFolder(string)
Loads all TrueType fonts from specified folder to internal collection.
public void LoadFontsFromFolder(string folder)
{
}
This is the reformatted code with proper indentation, spacing, and general readability improvements.
Parameters
folder
string
The folder containing fonts.
Exceptions
Parameter ‘folder’ is null or empty.
There directory specified by folder does not exist.
The file from folder does not contain TrueType font.
TranslateFontName(string)
Tries to translate font name to its substitution via internal table.
protected string TranslateFontName(string fontName)
{
}
Parameters
fontName
string
The font name.
Returns
The name of substitution font if it is specified otherwise the specified font name itself.</string,></string,></string,></string,>