Class DocumentFontsSubsystem

Class DocumentFontsSubsystem

De naam: Aspose.Note.Fonts Verzameling: Aspose.Note.dll (25.4.0)

Eenvoudige implementatie van Aspose.Note.Fonts.FoonsSubsystem. Retrieves System.Drawing.PhantFamily object vanuit OS.

public class DocumentFontsSubsystem : FontsSubsystem, IFontsSubsystem

Inheritance

object FontsSubsystem DocumentFontsSubsystem

Implements

IFontsSubsystem

Geëerbiede leden

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

Toon hoe u een document in pdf-formaat kunt opslaan met behulp van een gespecificeerde standaard font.

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

Toon hoe u een document in pdf-formaat kunt opslaan met behulp van standaard font uit een bestand.

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

Toon hoe u een document in pdf-formaat kunt opslaan met behulp van standaard font uit een stroom.

// 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, woordenboek<string, string="">)

Initialiseert een nieuwe instantie van de Aspose.Note.Fonts.DocumentFonsSubsystem klasse.

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

Parameters

defaultFontStream Stream

De default font.

fontsSubstitutions Dictionary < string , string >

De fonts vervangen.

DocumentFontsSubsystem(string, woordenboek <string, string="">)

Initialiseert een nieuwe instantie van de Aspose.Note.Fonts.DocumentFonsSubsystem klasse.

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

Parameters

defaultFontFile string

De default font.

fontsSubstitutions Dictionary < string , string >

De fonts vervangen.

DocumentFontsSubsystem(Woordenboek String, String="">)

Initialiseert een nieuwe instantie van de Aspose.Note.Fonts.DocumentFonsSubsystem klasse.

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

Parameters

fontsSubstitutions Dictionary < string , string >

De fonts vervangen.

Properties

Default

Geeft of zet de statische standaardinstantie.

public static DocumentFontsSubsystem Default { get; set; }

Eigendomswaarde

DocumentFontsSubsystem

Methods

FetchFontFamily(String)

Fetches font familie als kandidaat voor GetFontFamily.

protected override FontFamily FetchFontFamily(string fontName)

Parameters

fontName string

De naam van de font.

Returns

FontFamily

Het systeem.Drawing.FontFamily

UsingDefaultFont(string, woordenboek <string, string="">)

Creëer een nieuwe DocumentFontsSubsystem-instantie met behulp van de voorgeschreven letternaam.

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

Parameters

defaultFontName string

De standaard fontnaam.

fontsSubstitutions Dictionary < string , string >

De fonts vervangen.

Returns

DocumentFontsSubsystem

Het Aspose.Note.Fonts.DocumentFonsSubsystem.

Examples

Toon hoe u een document in pdf-formaat kunt opslaan met behulp van een gespecificeerde standaard font.

// 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, woordenboek <string, string="">)

Creëer een nieuwe DocumentFontsSubsystem-instantie met behulp van een lettertype uit het bepaalde bestand als standaard.

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

Parameters

filePath string

De bestand met een standaard fontnaam.

fontsSubstitutions Dictionary < string , string >

De fonts vervangen.

Returns

DocumentFontsSubsystem

Het Aspose.Note.Fonts.DocumentFonsSubsystem.

Examples

Toon hoe u een document in pdf-formaat kunt opslaan met behulp van standaard font uit een bestand.

// 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, woordenboek<string, string="">)

Creëer een nieuwe DocumentFontsSubsystem-instantie met behulp van een lettertype van de specifieke stroom als standaard.

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

Parameters

defaultFontStream Stream

De stroom die de standaard fontnaam bevat.

fontsSubstitutions Dictionary < string , string >

De fonts vervangen.

Returns

DocumentFontsSubsystem

Het Aspose.Note.Fonts.DocumentFonsSubsystem.

Examples

Toon hoe u een document in pdf-formaat kunt opslaan met behulp van standaard font uit een stroom.

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

 Nederlands