Class DocumentFontsSubsystem

Class DocumentFontsSubsystem

İsim alanı : Aspose.Note.Fonts Toplama: Aspose.Note.dll (25.4.0)

Basit uygulanması Aspose.Note.FontsSubsystem. Retrieves System.Drawing.FoontFamily nesne OS’den.

public class DocumentFontsSubsystem : FontsSubsystem, IFontsSubsystem

Inheritance

object FontsSubsystem DocumentFontsSubsystem

Implements

IFontsSubsystem

mirasçı üyeleri

FontsSubsystem.AddFontSubstitution(string, string) , FontsSubsystem.AddFont(Stream, string) , FontsSubsystem.AddFont(Stream) , FontsSubsystem.AddFont(string) , FontsSubsystem.LoadFontsFromFolder(string) , FontsSubsystem.GetFontFamily(string) , FontsSubsystem.TranslateFontName(string) , FontsSubsystem.FetchFontFamily(string) , FontsSubsystem.FindFontFamilyInInternalCollection(string) , FontsSubsystem.DefaultFont , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

Belgeyi PDF formatında nasıl kaydeteceğinizi belirli bir varsayılan yazı tipi kullanılarak gösterir.

// The path to the documents directory.
                                                                                   string dataDir = RunExamples.GetDataDir_LoadingAndSaving();

                                                                                   // Load the document into Aspose.Note.
                                                                                   Document oneFile = new Document(Path.Combine(dataDir, "missing-font.one"));

                                                                                   // Save the document as PDF
                                                                                   dataDir = dataDir + "SaveUsingDocumentFontsSubsystemWithDefaultFontName_out.pdf";
                                                                                   oneFile.Save(dataDir, new PdfSaveOptions() 
                                                                                                         {
                                                                                                             FontsSubsystem = DocumentFontsSubsystem.UsingDefaultFont("Times New Roman")
                                                                                                         });

PDF formatında bir belgeyi bir dosyadan varsayılan yazı tipi kullanarak nasıl kaydedileceğini gösterir.

// The path to the documents directory.
                                                                                     string dataDir = RunExamples.GetDataDir_LoadingAndSaving();

                                                                                     string fontFile = Path.Combine(dataDir, "geo_1.ttf");

                                                                                     // Load the document into Aspose.Note.
                                                                                     Document oneFile = new Document(Path.Combine(dataDir, "missing-font.one"));

                                                                                     // Save the document as PDF
                                                                                     dataDir = dataDir + "SaveUsingDocumentFontsSubsystemWithDefaultFontFromFile_out.pdf";
                                                                                     oneFile.Save(dataDir, new PdfSaveOptions()
                                                                                                               {
                                                                                                                   FontsSubsystem = DocumentFontsSubsystem.UsingDefaultFontFromFile(fontFile)
                                                                                                               });

PDF formatında bir belgeyi bir akımdan varsayılan yazı tipi kullanarak nasıl kaydedileceğini gösterir.

// The path to the documents directory.
                                                                                       string dataDir = RunExamples.GetDataDir_LoadingAndSaving();

                                                                                       string fontFile = Path.Combine(dataDir, "geo_1.ttf");

                                                                                       // Load the document into Aspose.Note.
                                                                                       Document oneFile = new Document(Path.Combine(dataDir, "missing-font.one"));

                                                                                       // Save the document as PDF
                                                                                       dataDir = dataDir + "SaveUsingDocumentFontsSubsystemWithDefaultFontFromStream_out.pdf";

                                                                                       using (var stream = File.Open(fontFile, FileMode.Open, FileAccess.Read, FileShare.Read))
                                                                                       {
                                                                                           oneFile.Save(dataDir, new PdfSaveOptions()
                                                                                                                     {
                                                                                                                         FontsSubsystem = DocumentFontsSubsystem.UsingDefaultFontFromStream(stream)
                                                                                                                     });
                                                                                       }

Constructors

DocumentFontsSubsystem(Stream, Sözlük<string, string=» »)

Aspose.Note.Fonts.DocumentFonsSubsystem sınıfının yeni bir örneğini başlatır.

public DocumentFontsSubsystem(Stream defaultFontStream, Dictionary<string, string=""> fontsSubstitutions = null)

Parameters

defaultFontStream Stream

default yazı tipi.

fontsSubstitutions Dictionary &lt için; string , string >

Yazıları değiştirmek için.

DocumentFontsSubsystem(string, Sözlük<string, string=» »)

Aspose.Note.Fonts.DocumentFonsSubsystem sınıfının yeni bir örneğini başlatır.

public DocumentFontsSubsystem(string defaultFontFile, Dictionary<string, string=""> fontsSubstitutions = null)

Parameters

defaultFontFile string

default yazı tipi.

fontsSubstitutions Dictionary &lt için; string , string >

Yazıları değiştirmek için.

DocumentFontsSubsystem(Sözlük <string, string=» »)

Aspose.Note.Fonts.DocumentFonsSubsystem sınıfının yeni bir örneğini başlatır.

public DocumentFontsSubsystem(Dictionary<string, string=""> fontsSubstitutions = null)

Parameters

fontsSubstitutions Dictionary &lt için; string , string >

Yazıları değiştirmek için.

Properties

Default

statik default örneğini alır veya ayarlar.

public static DocumentFontsSubsystem Default { get; set; }

Mülkiyet Değer

DocumentFontsSubsystem

Methods

FetchFontFamily(Sırt)

GetFontFamily için bir aday olarak font ailesini fetches.

protected override FontFamily FetchFontFamily(string fontName)

Parameters

fontName string

Şifre Adı .

Returns

FontFamily

Sistem.Drawing.FontFamily için tıklayınız

UsingDefaultFont(string, Sözlük<string, string=» »)

Yeni DocumentFontsSubsystem örneği belirlenmiş varsayılan yazı tipi adı kullanılarak oluşturun.

public static DocumentFontsSubsystem UsingDefaultFont(string defaultFontName, Dictionary<string, string=""> fontsSubstitutions = null)

Parameters

defaultFontName string

Default yazı tipi adı.

fontsSubstitutions Dictionary &lt için; string , string >

Yazıları değiştirmek için.

Returns

DocumentFontsSubsystem

Aspose.Note.Fonts.DocumentFonsSubsystem ile ilgili bilgiler

Examples

Belgeyi PDF formatında nasıl kaydeteceğinizi belirli bir varsayılan yazı tipi kullanılarak gösterir.

// The path to the documents directory.
                                                                                   string dataDir = RunExamples.GetDataDir_LoadingAndSaving();

                                                                                   // Load the document into Aspose.Note.
                                                                                   Document oneFile = new Document(Path.Combine(dataDir, "missing-font.one"));

                                                                                   // Save the document as PDF
                                                                                   dataDir = dataDir + "SaveUsingDocumentFontsSubsystemWithDefaultFontName_out.pdf";
                                                                                   oneFile.Save(dataDir, new PdfSaveOptions() 
                                                                                                         {
                                                                                                             FontsSubsystem = DocumentFontsSubsystem.UsingDefaultFont("Times New Roman")
                                                                                                         });

UsingDefaultFontFromFile(string, Sözlük<string, string=» »)

Yeni DocumentFontsSubsystem örneğini varsayılan olarak belirtilen dosyadan bir yazı tipi kullanarak oluşturun.

public static DocumentFontsSubsystem UsingDefaultFontFromFile(string filePath, Dictionary<string, string=""> fontsSubstitutions = null)

Parameters

filePath string

Dosya varsayılan yazı tipi adı içerir.

fontsSubstitutions Dictionary &lt için; string , string >

Yazıları değiştirmek için.

Returns

DocumentFontsSubsystem

Aspose.Note.Fonts.DocumentFonsSubsystem ile ilgili bilgiler

Examples

PDF formatında bir belgeyi bir dosyadan varsayılan yazı tipi kullanarak nasıl kaydedileceğini gösterir.

// The path to the documents directory.
                                                                                     string dataDir = RunExamples.GetDataDir_LoadingAndSaving();

                                                                                     string fontFile = Path.Combine(dataDir, "geo_1.ttf");

                                                                                     // Load the document into Aspose.Note.
                                                                                     Document oneFile = new Document(Path.Combine(dataDir, "missing-font.one"));

                                                                                     // Save the document as PDF
                                                                                     dataDir = dataDir + "SaveUsingDocumentFontsSubsystemWithDefaultFontFromFile_out.pdf";
                                                                                     oneFile.Save(dataDir, new PdfSaveOptions()
                                                                                                               {
                                                                                                                   FontsSubsystem = DocumentFontsSubsystem.UsingDefaultFontFromFile(fontFile)
                                                                                                               });

UsingDefaultFontFromStream(Stream, Sözlük<string, string=» »)

Yeni DocumentFontsSubsystem örneğini varsayılan olarak belirtilen akımdan bir yazı tipi kullanarak oluşturun.

public static DocumentFontsSubsystem UsingDefaultFontFromStream(Stream defaultFontStream, Dictionary<string, string=""> fontsSubstitutions = null)

Parameters

defaultFontStream Stream

Standart yazı tipi adı içeren akım.

fontsSubstitutions Dictionary &lt için; string , string >

Yazıları değiştirmek için.

Returns

DocumentFontsSubsystem

Aspose.Note.Fonts.DocumentFonsSubsystem ile ilgili bilgiler

Examples

PDF formatında bir belgeyi bir akımdan varsayılan yazı tipi kullanarak nasıl kaydedileceğini gösterir.

// The path to the documents directory.
                                                                                       string dataDir = RunExamples.GetDataDir_LoadingAndSaving();

                                                                                       string fontFile = Path.Combine(dataDir, "geo_1.ttf");

                                                                                       // Load the document into Aspose.Note.
                                                                                       Document oneFile = new Document(Path.Combine(dataDir, "missing-font.one"));

                                                                                       // Save the document as PDF
                                                                                       dataDir = dataDir + "SaveUsingDocumentFontsSubsystemWithDefaultFontFromStream_out.pdf";

                                                                                       using (var stream = File.Open(fontFile, FileMode.Open, FileAccess.Read, FileShare.Read))
                                                                                       {
                                                                                           oneFile.Save(dataDir, new PdfSaveOptions()
                                                                                                                     {
                                                                                                                         FontsSubsystem = DocumentFontsSubsystem.UsingDefaultFontFromStream(stream)
                                                                                                                     });
                                                                                       }

</string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,>

 Türkçe