FontRepository.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 //using Aspose.Pdf.Exceptions;
4 
5 #include <system/object.h>
6 #include <system/enum_helpers.h>
7 
8 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
9 
10 namespace Aspose
11 {
12 namespace Font
13 {
14 namespace Sources
15 {
16 class FontDefinition;
17 } // namespace Sources
18 } // namespace Font
19 namespace Pdf
20 {
21 namespace Text
22 {
23 class Font;
24 class FontSourceCollection;
25 enum class FontStyles;
26 class FontSubstitutionCollection;
27 enum class FontTypes;
28 } // namespace Text
29 } // namespace Pdf
30 } // namespace Aspose
31 namespace System
32 {
33 namespace Collections
34 {
35 namespace Generic
36 {
37 template <typename> class List;
38 } // namespace Generic
39 } // namespace Collections
40 namespace IO
41 {
42 class Stream;
43 } // namespace IO
44 class String;
45 } // namespace System
46 
47 namespace Aspose {
48 
49 namespace Pdf {
50 
51 namespace Text {
52 
61 class ASPOSE_PDF_SHARED_CLASS FontRepository final : public System::Object
62 {
63  typedef FontRepository ThisType;
64  typedef System::Object BaseType;
65 
66  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
67  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
68 
69 public:
70 
74  static ASPOSE_PDF_SHARED_API System::SharedPtr<FontSubstitutionCollection> get_Substitutions();
78  static ASPOSE_PDF_SHARED_API System::SharedPtr<FontSourceCollection> get_Sources();
79 
87  static ASPOSE_PDF_SHARED_API System::SharedPtr<Font> FindFont(System::String fontName);
96  static ASPOSE_PDF_SHARED_API System::SharedPtr<Font> FindFont(System::String fontName, bool ignoreCase);
105  static ASPOSE_PDF_SHARED_API System::SharedPtr<Font> FindFont(System::String fontFamilyName, FontStyles stl);
116  static ASPOSE_PDF_SHARED_API System::SharedPtr<Font> FindFont(System::String fontFamilyName, FontStyles stl, bool ignoreCase);
125  static ASPOSE_PDF_SHARED_API System::SharedPtr<Font> OpenFont(System::SharedPtr<System::IO::Stream> fontStream, FontTypes fontType);
133  static ASPOSE_PDF_SHARED_API System::SharedPtr<Font> OpenFont(System::String fontFilePath);
142  static ASPOSE_PDF_SHARED_API System::SharedPtr<Font> OpenFont(System::String fontFilePath, System::String metricsFilePath);
148  static ASPOSE_PDF_SHARED_API void LoadFonts();
152  static ASPOSE_PDF_SHARED_API void ReloadFonts();
153 
154 private:
155 
157 
158 };
159 
160 } // namespace Text
161 } // namespace Pdf
162 } // namespace Aspose
163 
164 
String class used across the library. Is a substitute for C# System.String when translating code...
Definition: string.h:121
class ASPOSECPP_SHARED_CLASS List
Definition: ienumerable.h:17
Performs font search. Searches in system installed fonts and standard Pdf fonts. Also provides functi...
Definition: FontRepository.h:61
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:64
Definition: Artifact.h:67
The type that supports reliable, two-way, connection-based byte streams without duplication of data a...
FontStyles
Specifies style information applied to text.
Definition: FontStyles.h:22
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: fwd.h:22
Represents a text type.
Definition: AFRelationship.h:4
List forward declaration.
Definition: Artifact.h:74
FontTypes
Supported font types enumeration.
Definition: FontTypes.h:18
Whole PDF file will be submitted.