Class DocumentFontsSubsystem

Class DocumentFontsSubsystem

名称: Aspose.Note.Fonts 合計: Aspose.Note.dll (25.4.0)

シンプルな実装 Aspose.Note.FontsSubsystem. Retrieves System.Drawing.FoontFamily オブジェクトを OS からリリースします。

public class DocumentFontsSubsystem : FontsSubsystem, IFontsSubsystem

Inheritance

object FontsSubsystem DocumentFontsSubsystem

Implements

IFontsSubsystem

相続人

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

PDF形式で文書を保存する方法を指定したデフォルトフォントで表示します。

// 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形式の文書を保存する方法を示します。

// 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形式のドキュメントをストリームからデフォルトフォントを使用して保存する方法を示します。

// 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(ストリーム, 辞書<string, string=「>」)

Aspose.Note.Fonts.DocumentFonsSubsystem クラスの新しいインスタンスを開始します。

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

Parameters

defaultFontStream Stream

デフォルトフォント

fontsSubstitutions Dictionary < string , string >

フォントの代替

DocumentFontsSubsystem(string, 辞書<string, string=「>」)

Aspose.Note.Fonts.DocumentFonsSubsystem クラスの新しいインスタンスを開始します。

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

Parameters

defaultFontFile string

デフォルトフォント

fontsSubstitutions Dictionary < string , string >

フォントの代替

DocumentFontsSubsystem(辞書(ストリング、ストリング)=「>」)

Aspose.Note.Fonts.DocumentFonsSubsystem クラスの新しいインスタンスを開始します。

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

Parameters

fontsSubstitutions Dictionary < string , string >

フォントの代替

Properties

Default

入力または静的デフォルトの例を設定します。

public static DocumentFontsSubsystem Default { get; set; }

不動産価値

DocumentFontsSubsystem

Methods

FetchFontFamily(ストレッチ)

Fetches フォントファミリーは GetFontFamily の候補者です。

protected override FontFamily FetchFontFamily(string fontName)

Parameters

fontName string

フォント名です。

Returns

FontFamily

フォントファミリー(FontFamily)

UsingDefaultFont(string, 辞書<string, string=「>」)

新しい DocumentFontsSubsystem インスタンスを作成するには、指定されたデフォルトフォント名を使用します。

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

Parameters

defaultFontName string

デフォルトフォント名

fontsSubstitutions Dictionary < string , string >

フォントの代替

Returns

DocumentFontsSubsystem

Aspose.Note.Fonts.DocumentFonsSubsystem を参照してください。

Examples

PDF形式で文書を保存する方法を指定したデフォルトフォントで表示します。

// 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, 辞書<string, string=「>」)

デフォルトとして指定されたファイルからフォントを使用して新しい DocumentFontsSubsystem インスタンスを作成します。

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

Parameters

filePath string

デフォルトフォント名を含むファイル。

fontsSubstitutions Dictionary < string , string >

フォントの代替

Returns

DocumentFontsSubsystem

Aspose.Note.Fonts.DocumentFonsSubsystem を参照してください。

Examples

ファイルからデフォルトフォントを使用してPDF形式の文書を保存する方法を示します。

// 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(ストリーム, 辞書<string, string=「>」)

デフォルトとして指定ストリームからフォントを使用して新しい DocumentFontsSubsystem インスタンスを作成します。

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

Parameters

defaultFontStream Stream

既定のフォント名を含むストリーム。

fontsSubstitutions Dictionary < string , string >

フォントの代替

Returns

DocumentFontsSubsystem

Aspose.Note.Fonts.DocumentFonsSubsystem を参照してください。

Examples

PDF形式のドキュメントをストリームからデフォルトフォントを使用して保存する方法を示します。

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

 日本語