6#include <system/object.h>
7#include <system/string.h>
9#include "drawing/font_family.h"
10#include "drawing/font_style.h"
11#include "drawing/graphics_unit.h"
12#include "text/text_rendering_hint.h"
13#include "details/aux_types.h"
16#define DEFAULT_FONT_OPERATIONS_DPI 96.f
19ASPOSECPP_3RD_PARTY_TYPEDEF(SkScalar,
float);
21ASPOSECPP_3RD_PARTY_CLASS(SkFont);
23ASPOSECPP_3RD_PARTY_CLASS(SkTypeface);
25namespace System {
namespace Drawing {
35 RTTI_INFO(
Font, ::System::BaseTypesInfo<System::Object>)
75 ASPOSECPP_SHARED_API
float GetHeight(
float dpi = DEFAULT_FONT_OPERATIONS_DPI);
129 void Initialize(
const String& family_name,
float em_size,
FontStyle style,
GraphicsUnit unit, uint8_t gdi_charset,
bool gdi_vertical_font);
146 static String StripVerticalName(
const String &family_name);
150 SkScalar GetDotNetPositionOffset(
float dpi);
152 void UpdateForPpem(uint16_t ppem, SkFont& font);
154 void OverrideSkFontSettings(SkFont& font)
const;
165 uint8_t m_gdi_charset;
167 bool m_gdi_vertical_font;
169 String m_original_font_name;
Represents a particular format for text, including font face, size, and style. Objects of this class ...
Definition: font.h:33
void Dispose()
Releases all operating system resources acquired by the current object.
Definition: font.h:114
SharedPtr< FontFamily > get_FontFamily()
Returns the font family of the font represented by the current object.
Font(const String &family_name, float em_size, FontStyle style, GraphicsUnit unit=GraphicsUnit::Point, uint8_t gdi_charset=1, bool gdi_vertical_font=false)
Constructs a new instance of Font class.
float get_Size()
Returns the em size of the font represented by the current object measured in the units specified by ...
GraphicsUnit get_Unit()
Returns the measurement unit for the font represented by the current object.
static SharedPtr< Font > FromLogFont(const SharedPtr< Object > &lf)
NOT IMPLEMENTED.
Font(const String &family_name, float em_size, GraphicsUnit unit=GraphicsUnit::Point)
Constructs a new instance of Font class.
float GetHeight(float dpi=DEFAULT_FONT_OPERATIONS_DPI)
Returns the height of the font represented by the current object when drawn to a display device with ...
Font(const SharedPtr< FontFamily > &family, float em_size, FontStyle style, GraphicsUnit unit=GraphicsUnit::Point, uint8_t gdi_charset=1, bool gdi_vertical_font=false)
Constructs a new instance of Font class.
uint8_t get_GdiCharSet()
Returns a value that indicates the GDI character set used by the font represented by the current obje...
int get_Height()
Returns the line spacing of the font represented by the current object in pixels.
float GetHeight(const SharedPtr< Graphics > &graphics)
Returns the line spacing of the font represented by the current object, in the current unit of a spec...
bool Equals(System::SharedPtr< System::Object > obj) override
Determines if the current and the specified objects are identical.
bool get_Strikeout()
Determines if the font represented by the current object has the strikeout style applied.
Font(const SharedPtr< Font > &prototype, FontStyle new_style)
Constructs a new instance of Font class that represents the specified existing font with the specifie...
bool get_Italic()
Determines if the font represented by the current object has the italic style applied.
bool get_Bold()
Determines if the font represented by the current object has the bold style applied.
FontStyle get_Style()
Returns the font style of the font represented by the current object.
Definition: font.h:105
bool get_Underline()
Determines if the font represented by the current object has the underline style applied.
FontStyle get_FontStyle()
Returns the font style of the font represneted by the current object.
SharedPtr< Font > Clone()
Returns a copy of the current font.
String get_OriginalFontName()
Returns the originally specified name of the font.
String get_Name()
Returns the face name of the font represented by the current object.
Font(const SharedPtr< FontFamily > &family, float em_size, GraphicsUnit unit=GraphicsUnit::Point)
Constructs a new instance of Font class.
float get_SizeInPoints()
Returns the em size of the font represented by the current object in points.
Represents a drawing surface. Objects of this class should only be allocated using System::MakeObject...
Definition: graphics.h:68
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
std::vector< std::pair< uint16_t, uint16_t > > GaspTableData
Definition: aux_types.h:12
TextRenderingHint
Specifies the quality of text rendering.
Definition: text_rendering_hint.h:9
FontStyle
Represents a font style.
Definition: font_style.h:10
GraphicsUnit
Represents a unit of measure.
Definition: graphics_unit.h:10
@ Point
A printer's point (1/72 of an inch).
Definition: db_command.h:9