CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
private_font_collection.h
1
2#ifndef _private_font_collection_h_
3#define _private_font_collection_h_
4
5#include "font_collection.h"
6#include "drawing/font_family.h"
7
8#include <map>
9
10namespace System{ namespace Drawing{ namespace Text{
15 class ASPOSECPP_SHARED_CLASS PrivateFontCollection final: public FontCollection
16 {
17 public:
20 ASPOSECPP_SHARED_API void AddFontFile(const String& filename);
21
22 // AddMemoryFont replacement
26 ASPOSECPP_SHARED_API void AddFont(const System::ArrayPtr<uint8_t>& data, int len);
27
29 ASPOSECPP_SHARED_API ArrayPtr<SharedPtr<FontFamily>> get_Families() override;
30
31 private:
33 void FillFontFamilies(const std::vector<sk_sp<SkTypeface>>& sk_typefaces);
34
37 std::map<std::string, SharedPtr<FontFamily>> m_font_family_map;
38 };
39
40}}}
41
42#endif //_private_font_collection_h_
A base class for installed and private font collections. Objects of this class should only be allocat...
Definition: font_collection.h:18
Represents a collection of font families provided by the client application. Objects of this class sh...
Definition: private_font_collection.h:16
void AddFontFile(const String &filename)
Adds a font from the specified file to the collection.
ArrayPtr< SharedPtr< FontFamily > > get_Families() override
Returns an array of FontFamily objects associated with the font collection represented by the current...
void AddFont(const System::ArrayPtr< uint8_t > &data, int len)
Adds the specified font to the collection.
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
@ Text
Defines color adjustment information for text.
Definition: db_command.h:9