Class DocumentFontsSubsystem

Class DocumentFontsSubsystem

Název místa: Aspose.Note.Fonts Shromáždění: Aspose.Note.dll (25.4.0)

Jednoduchá implementace Aspose.Note.FontsSubsystem. Retrieves System.Drawing.FoundFamily objekt z OS.

public class DocumentFontsSubsystem : FontsSubsystem, IFontsSubsystem

Inheritance

object FontsSubsystem DocumentFontsSubsystem

Implements

IFontsSubsystem

Dědiční členové

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

Ukazuje, jak uložit dokument ve formátu PDF pomocí specifikovaného výchozího písma.

// 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")
                                                                                                         });

Ukazuje, jak uložit dokument ve formátu PDF pomocí výchozího písma z souboru.

// 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)
                                                                                                               });

Ukazuje, jak uložit dokument ve formátu PDF pomocí výchozího písma z toku.

// 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, Slovník<string, string="">"">)

Začíná nová instance třídy Aspose.Note.Fonts.DocumentFonsSubsystem.

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

Parameters

defaultFontStream Stream

Zde je default font.

fontsSubstitutions Dictionary < string , string >

Náhrada fontů.

DocumentFontsSubsystem(String, slovní řádek, string="">"">)

Začíná nová instance třídy Aspose.Note.Fonts.DocumentFonsSubsystem.

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

Parameters

defaultFontFile string

Zde je default font.

fontsSubstitutions Dictionary < string , string >

Náhrada fontů.

DocumentFontsSubsystem(Slovník String, String="">"">)

Začíná nová instance třídy Aspose.Note.Fonts.DocumentFonsSubsystem.

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

Parameters

fontsSubstitutions Dictionary < string , string >

Náhrada fontů.

Properties

Default

Obdržíte nebo nastavíte statický default.

public static DocumentFontsSubsystem Default { get; set; }

Hodnota nemovitosti

DocumentFontsSubsystem

Methods

FetchFontFamily(Stringová)

Fetches font rodina jako kandidát na GetFontFamily.

protected override FontFamily FetchFontFamily(string fontName)

Parameters

fontName string

Název písma.

Returns

FontFamily

Připravte si obrázek.FontFamily

UsingDefaultFont(String, slovní řádek, string="">"">)

Vytvořte novou příklad DocumentFontsSubsystem pomocí předvoleného názvu písma.

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

Parameters

defaultFontName string

Standardní název písma.

fontsSubstitutions Dictionary < string , string >

Náhrada fontů.

Returns

DocumentFontsSubsystem

Soubor Aspose.Note.Fonts.DocumentFonsSubsystem.

Examples

Ukazuje, jak uložit dokument ve formátu PDF pomocí specifikovaného výchozího písma.

// 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, slovní řádek, string="">"">)

Vytvořte nový příklad DocumentFontsSubsystem pomocí písma z specifikovaného souboru jako výchozí.

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

Parameters

filePath string

Soubor, který obsahuje výchozí název písma.

fontsSubstitutions Dictionary < string , string >

Náhrada fontů.

Returns

DocumentFontsSubsystem

Soubor Aspose.Note.Fonts.DocumentFonsSubsystem.

Examples

Ukazuje, jak uložit dokument ve formátu PDF pomocí výchozího písma z souboru.

// 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, Slovník<string, string="">"">)

Vytvořte novou příklad DocumentFontsSubsystem pomocí písma z specifikovaného toku jako výchozí.

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

Parameters

defaultFontStream Stream

Stream obsahující výchozí název písma.

fontsSubstitutions Dictionary < string , string >

Náhrada fontů.

Returns

DocumentFontsSubsystem

Soubor Aspose.Note.Fonts.DocumentFonsSubsystem.

Examples

Ukazuje, jak uložit dokument ve formátu PDF pomocí výchozího písma z toku.

// 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,>

 Čeština