Class FontsSubsystem
Tên không gian: Aspose.Note.Fonts Tổng hợp: Aspose.Note.dll (25.4.0)
Khóa học cơ sở thực hiện Aspose.Note.Fonts.IFONTsSubsystem interface.Cung cấp chức năng cho các thay thế font mặc định và font.Override Aspose.Note.Fonts.Các tính năng thành viên được bảo vệ trong một lớp derived để thực hiện logic cho việc lấy lại đối tượng System.Drawing.FootFamily.
public abstract class FontsSubsystem : IFontsSubsystem
{
public abstract Font GetFontByName(string name);
public abstract void AddFont(Font font);
public abstract void RemoveFont(Font font);
}
Inheritance
Derived
Implements
Thành viên thừa kế
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
FontsSubsystem(Stream, Từ điển<string, string="">)
Bắt đầu một trường hợp mới của lớp Aspose.Note.Fonts.FoonsSubsystem.
protected FontsSubsystem(
Stream defaultFont,
Dictionary<string, string> fontsSubstitutions = null)
{
}
Parameters
defaultFont
Stream
dòng chứa font mặc định.
fontsSubstitutions
Dictionary
<
string
, string
>
Các phông chữ thay thế
FontsSubsystem(string, Từ điển<strin, string="">)
Bắt đầu một trường hợp mới của lớp Aspose.Note.Fonts.FoonsSubsystem.
protected FontsSubsystem(string defaultFontFile, Dictionary<string, string> fontsSubstitutions = null)
{
}
Parameters
defaultFontFile
string
dòng chứa font mặc định.
fontsSubstitutions
Dictionary
<
string
, string
>
Các phông chữ thay thế
Hệ thống Fonts( )
Bắt đầu một trường hợp mới của lớp Aspose.Note.Fonts.FoonsSubsystem.
protected FontsSubsystem()
{
}
Properties
DefaultFont
Nhận hoặc đặt font mặc định.
public FontFamily DefaultFont
{
get;
protected set;
}
Giá trị bất động sản
Methods
AddFont (tạm dịch: Stream, string)
Thêm font
public void AddFont(Stream stream, string tempFolder)
{
}
Parameters
stream
Stream
dòng có chứa font.
tempFolder
string
Cấu hình Temp Folder
Thông tin AddFont (Stream)
Thêm font
public void AddFont(Stream stream)
{
}
Parameters
stream
Stream
dòng có chứa font.
Lời bài hát: String (String)
Thêm font
public void AddFont(string file)
{
}
Parameters
file
string
Đường đến tệp chứa font.
AddFontSubstitution(tring, string)
Thay thế phông chữ.
public void AddFontSubstitution(string substituted, string substitution)
{
}
Parameters
substituted
string
Tên văn bản thay thế.
substitution
string
Tên chữ thay thế.
Trang chủ » FetchFontFamily(string)
Fetches gia đình font như một ứng cử viên cho GetFontFamily.
protected abstract FontFamily FetchFontFamily(string fontName)
{
}
Parameters
fontName
string
Tên của font
Returns
Hệ thống.Drawing.FontFamily
TìmFontFamilyInInternalCollection(string)
Cố gắng tìm gia đình font trong bộ sưu tập nội bộ các font GDI.
protected FontFamily FindFontFamilyInInternalCollection(string fontFamilyName)
{
foreach (FontFamily fontFamily in this._internalFontFamilies)
{
if (fontFamily.Name == fontFamilyName)
return fontFamily;
}
return null;
}
Parameters
fontFamilyName
string
Tên gia đình font.
Returns
Hệ thống.Drawing.FontFamily
Lời bài hát: String
Chụp ảnh gia đình.
public virtual FontFamily GetFontFamily(string fontName)
{
}
Parameters
fontName
string
Tên của font
Returns
Hệ thống.Drawing.FontFamily
LoadFontsFromFolder(nghĩa)
Tải tất cả các phông chữ TrueType từ thư mục cụ thể đến bộ sưu tập nội bộ.
public void LoadFontsFromFolder(string folder)
{
foreach (var file in Directory.GetFiles(folder, "*.ttf"))
{
using (var font = new Font(file))
{
AddFont(font);
}
}
}
Parameters
folder
string
Các thư mục chứa font.
Exceptions
Parameter ‘folder’ là không hoặc trống.
Không có thư mục được chỉ định bởi folder.
Tệp từ thư mục không chứa font TrueType.
Bản dịch (string )
Cố gắng dịch tên phông chữ để thay thế nó thông qua bảng nội bộ.
protected string TranslateFontName(string fontName)
{
}
Parameters
fontName
string
Tên của font
Returns
Tên của chữ cái thay thế nếu nó được chỉ định khác tên chữ bản thân cụ thể.</string,></string,></string,></string,>