Class DocumentFontsSubsystem
Der Name: Aspose.Note.Fonts Zusammensetzung: Aspose.Note.dll (25.4.0)
Einfache Implementierung von Aspose.Note.Fonts.FoonsSubsystem. Retrieves System.Drawing.PhantFamily Objekt von OS.
public class DocumentFontsSubsystem : FontsSubsystem, IFontsSubsystem
Inheritance
object ← FontsSubsystem ← DocumentFontsSubsystem
Implements
Vererbte Mitglieder
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
Zeigt, wie man ein Dokument in PDF-Format mit angegebenem Standardschrift speichert.
// 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")
});
Zeigt an, wie man ein Dokument in PDF-Format mit Standardschrift aus einem Datei speichert.
// 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)
});
Zeigt an, wie man ein Dokument in PDF-Format mit Standardschrift aus einem Stream speichert.
// 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, Wörterbuch<string, String="">"">)
Initialisiert eine neue Instanz der Aspose.Note.Fonts.DocumentFonsSubsystem Klasse.
public DocumentFontsSubsystem(Stream defaultFontStream, Dictionary<string, string=""> fontsSubstitutions = null)
Parameters
defaultFontStream
Stream
Das Default Font.
fontsSubstitutions
Dictionary
&undlt;
string
, string
>
Die Fonts ersetzen.
DocumentFontsSubsystem(String, Wörterbuch<string="">"">)
Initialisiert eine neue Instanz der Aspose.Note.Fonts.DocumentFonsSubsystem Klasse.
public DocumentFontsSubsystem(string defaultFontFile, Dictionary<string, string=""> fontsSubstitutions = null)
Parameters
defaultFontFile
string
Das Default Font.
fontsSubstitutions
Dictionary
&undlt;
string
, string
>
Die Fonts ersetzen.
DocumentFontsSubsystem(Wörterbuch String, String="">"">)
Initialisiert eine neue Instanz der Aspose.Note.Fonts.DocumentFonsSubsystem Klasse.
public DocumentFontsSubsystem(Dictionary<string, string=""> fontsSubstitutions = null)
Parameters
fontsSubstitutions
Dictionary
&undlt;
string
, string
>
Die Fonts ersetzen.
Properties
Default
Erhalten oder setzen die statische Standardinstanz.
public static DocumentFontsSubsystem Default { get; set; }
Eigentumswert
Methods
FetchFontFamily(String)
Fetches Schriftfamilie als Kandidat für GetFontFamily.
protected override FontFamily FetchFontFamily(string fontName)
Parameters
fontName
string
Der Font Name.
Returns
Das System.Drawing.FontFamily
UsingDefaultFont(String, Wörterbuch<string="">"">)
Erstellen Sie eine neue DocumentFontsSubsystem-Instanz mit dem angegebenen Standard-Schriftname.
public static DocumentFontsSubsystem UsingDefaultFont(string defaultFontName, Dictionary<string, string=""> fontsSubstitutions = null)
Parameters
defaultFontName
string
Der default font name.
fontsSubstitutions
Dictionary
&undlt;
string
, string
>
Die Fonts ersetzen.
Returns
Das Aspose.Note.Fonts.DocumentFonsSubsystem.
Examples
Zeigt, wie man ein Dokument in PDF-Format mit angegebenem Standardschrift speichert.
// 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, Wörterbuch<string="">"">)
Erstellen Sie eine neue DocumentFontsSubsystem-Instanz mit einem Schriftwort aus der angegebenen Datei als Standard.
public static DocumentFontsSubsystem UsingDefaultFontFromFile(string filePath, Dictionary<string, string=""> fontsSubstitutions = null)
Parameters
filePath
string
Die Datei enthält den Standard-Schriftname.
fontsSubstitutions
Dictionary
&undlt;
string
, string
>
Die Fonts ersetzen.
Returns
Das Aspose.Note.Fonts.DocumentFonsSubsystem.
Examples
Zeigt an, wie man ein Dokument in PDF-Format mit Standardschrift aus einem Datei speichert.
// 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, Wörterbuch<string, String="">"">)
Erstellen Sie eine neue DocumentFontsSubsystem-Instanz mit einem Schriftwort aus dem angegebenen Stream als Standard.
public static DocumentFontsSubsystem UsingDefaultFontFromStream(Stream defaultFontStream, Dictionary<string, string=""> fontsSubstitutions = null)
Parameters
defaultFontStream
Stream
Der Stream enthält den Standard-Schriftname.
fontsSubstitutions
Dictionary
&undlt;
string
, string
>
Die Fonts ersetzen.
Returns
Das Aspose.Note.Fonts.DocumentFonsSubsystem.
Examples
Zeigt an, wie man ein Dokument in PDF-Format mit Standardschrift aus einem Stream speichert.
// 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,>