4#include "system/object.h"
5#include "drawing/text/font_collection.h"
6#include "drawing/font_style.h"
7#include "drawing/text/generic_font_families.h"
8#include "system/string.h"
9#include "system/array.h"
11#ifdef ASPOSECPPLIB_BEING_BUILT
12#include <core/SkTypeface.h>
13#include <core/SkPaint.h>
14#include <core/SkFontStyle.h>
20ASPOSECPP_3RD_PARTY_CLASS(SkFontStyle);
22ASPOSECPP_3RD_PARTY_CLASS(SkPaint);
24ASPOSECPP_3RD_PARTY_CLASS(SkString);
26ASPOSECPP_3RD_PARTY_CLASS(SkTypeface);
28template <
typename T>
class sk_sp;
30namespace System {
namespace Drawing {
34namespace Drawing2D {
class GraphicsPath; }
113 static ASPOSECPP_SHARED_API
void MarkFontFamilyAsSymbolic(
const String& name);
127 MEMBER_FUNCTION_MAKE_OBJECT(
FontFamily, CODEPORTING_ARGS(), CODEPORTING_ARGS());
133 MEMBER_FUNCTION_MAKE_OBJECT(
FontFamily, CODEPORTING_ARGS(
const String &name,
FontStyle init_font_style), CODEPORTING_ARGS(name, init_font_style));
137 FontFamily(
const sk_sp<SkTypeface>& sk_typeface);
142 FontFamily(
const sk_sp<SkTypeface>& sk_typeface,
const SkString &name);
143 MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(
FontFamily, CODEPORTING_ARGS(
const sk_sp<SkTypeface>& sk_typeface,
const SkString &name));
149 bool Initialization(
bool create_default_on_fail,
FontStyle init_font_style);
154 void AddSkTypeface(sk_sp<SkTypeface> sk_typeface);
158 sk_sp<SkTypeface> GetSkTypeface(
FontStyle font_style);
162 SkFontStyle ConvertToSkFontStyle(
FontStyle font_style);
166 FontStyle ConvertToFontStyle(SkFontStyle sk_font_style);
171 void GetFontMetrics(
FontStyle font_style,
void *font_metrics);
173 bool IsSymbolicTypeface(
const SkTypeface* typeface);
180 static bool ExtractStyleSet(
String font_family_name,
181 int *font_normal_width,
int *font_normal_weight,
182 String* new_font_family_name =
nullptr,
188 static bool CutFontSuffix(
String &font_family_name,
String &suffix);
192 String m_font_family_name;
195 std::vector<sk_sp<SkTypeface>> m_sk_typefaces;
197 int m_sk_font_normal_width;
199 int m_sk_font_normal_weight;
201 int m_symbolic_flag = -1;
Represents a set of connected lines and curves. Objects of this class should only be allocated using ...
Definition: graphics_path.h:80
Represents a group of type faces that share a similar basic design. Objects of this class should only...
Definition: font_family.h:43
int GetCellAscent(FontStyle style)
Returns the cell ascent of the font family represented by the current object for the specified font s...
String GetName(int language) const
Returns the name of the font family represented by the current object.
String get_Name() const
Returns the name of the font family represented by the current object.
int GetLineSpacing(FontStyle style)
Returns the line spacing of the font family represented by the current object for the specified font ...
bool IsStyleAvailable(FontStyle style)
Determines if the specified font style is available.
FontFamily(const String &name)
Constructs a new instance of FontFamily class that represents a font family with the specified name.
int GetEmHeight(FontStyle style)
Returns the height of em square in font design units for the specified style.
int GetCellDescent(FontStyle style)
Returns the cell descent of the font family represented by the current object for the specified font ...
static ArrayPtr< SharedPtr< FontFamily > > get_Families()
Returns an array containing all FontFamily objects associated with the current graphics context.
static SharedPtr< FontFamily > get_GenericMonospace()
Returns a FontFamily object that represents a Generic Monospace font family.
virtual ~FontFamily()
Destructor.
static SharedPtr< FontFamily > get_GenericSerif()
Returns a FontFamily object that represents a Generic Serif font family.
FontFamily(Text::GenericFontFamilies generic_family)
Constructs a new instance of FontFamily from the specified generic font family.
bool Equals(System::SharedPtr< System::Object > obj) override
Determines if the current and the specified objects are identical.
static SharedPtr< FontFamily > get_GenericSansSerif()
Returns a FontFamily object that represents a Generic Sans Serif font family.
SharedPtr< FontFamily > Clone()
Returns a copy of the current FontFamily object.
void Dispose()
Releases all operating system resources acquired by the current object.
Definition: font_family.h:102
FontFamily(const String &name, const SharedPtr< Text::FontCollection > &font_collection)
Constructs a new instance of FontFamily in the specified FontCollection with the specified name.
Represents a particular format for text, including font face, size, and style. Objects of this class ...
Definition: font.h:33
Represents a drawing surface. Objects of this class should only be allocated using System::MakeObject...
Definition: graphics.h:68
Represents a collection of font families provided by the client application. Objects of this class sh...
Definition: private_font_collection.h:16
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
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
static const String Empty
Empty string.
Definition: string.h:894
GenericFontFamilies
Represents a generic font family.
Definition: generic_font_families.h:6
FontStyle
Represents a font style.
Definition: font_style.h:10
Definition: db_command.h:9