Contains font native API.
- Namespace
- xtd::drawing::native
- Library
- xtd.drawing.native
- Warning
- Internal use only
|
static intptr | create (const xtd::string &family_name, float em_size, bool bold, bool italic, bool underline, bool strikeout, xtd::byte gdi_char_set, bool gdi_vertical_font) |
| Creates font.
|
|
static intptr | create_from_hdc (intptr hdc) |
| Creates font from hdc.
|
|
static intptr | create_from_hfont (intptr hfont) |
| Creates font from hfont.
|
|
static void | destroy (intptr font) |
| Destroys the font.
|
|
static int32 | dpi () |
| Gets the screen dpi .
|
|
static void | get_information (intptr font, xtd::string &name, float &em_size, bool &bold, bool &italic, bool &underline, bool &strikeout, xtd::byte &gdi_char_set, bool &gdi_vertical_font) |
| Gets the font information from font hanfle.
|
|
static float | height (intptr font) |
| Gets the font height.
|
|
static float | height (intptr font, intptr hdc) |
| Gets the font height for the specified hdc.
|
|
◆ create()
static intptr xtd::drawing::native::font::create |
( |
const xtd::string & |
family_name, |
|
|
float |
em_size, |
|
|
bool |
bold, |
|
|
bool |
italic, |
|
|
bool |
underline, |
|
|
bool |
strikeout, |
|
|
xtd::byte |
gdi_char_set, |
|
|
bool |
gdi_vertical_font |
|
) |
| |
|
staticprotected |
Creates font.
- Parameters
-
family_name | A string representation of the font family for the new font. |
em_size | The em-size of the new font in pixels. |
bold | true if font is bold; otherwise false. |
italic | true if font is italic; otherwise false. |
underline | true if font is underline; otherwise false. |
strikeout | true if font is strikeout; otherwise false. |
gdi_char_set | A byte that specifies a GDI character set to use for this font. |
gdi_vertical_font | A boolean value indicating whether the new xtd::drawing::font is derived from a GDI vertical font. |
- Returns
- The created font handle.
- Warning
- Internal use only
◆ create_from_hdc()
static intptr xtd::drawing::native::font::create_from_hdc |
( |
intptr |
hdc | ) |
|
|
staticprotected |
Creates font from hdc.
- Parameters
-
hdc | The handle of the device context font. |
- Returns
- The created font handle.
- Warning
- Internal use only
◆ create_from_hfont()
static intptr xtd::drawing::native::font::create_from_hfont |
( |
intptr |
hfont | ) |
|
|
staticprotected |
Creates font from hfont.
- Parameters
-
hfont | The handle of the font. |
- Returns
- The created font handle.
- Warning
- Internal use only
◆ destroy()
static void xtd::drawing::native::font::destroy |
( |
intptr |
font | ) |
|
|
staticprotected |
Destroys the font.
- Parameters
-
- Warning
- Internal use only
◆ dpi()
static int32 xtd::drawing::native::font::dpi |
( |
| ) |
|
|
staticprotected |
Gets the screen dpi .
- Returns
- The screen dpi.
- Warning
- Internal use only
◆ get_information()
static void xtd::drawing::native::font::get_information |
( |
intptr |
font, |
|
|
xtd::string & |
name, |
|
|
float & |
em_size, |
|
|
bool & |
bold, |
|
|
bool & |
italic, |
|
|
bool & |
underline, |
|
|
bool & |
strikeout, |
|
|
xtd::byte & |
gdi_char_set, |
|
|
bool & |
gdi_vertical_font |
|
) |
| |
|
staticprotected |
Gets the font information from font hanfle.
- Parameters
-
font | The font handle to retrieve informations. |
name | The font name. |
em_size | The font em-size. |
bold | True is the font is bold; otherwise false. |
italic | True is the font is italic; otherwise false. |
underline | True is the font is underline; otherwise false. |
strikeout | True is the font is strikeout; otherwise false. |
gdi_char_set | The GDI character set. |
gdi_vertical_font | True is the font is GDI vertical font; otherwise false.
Character set | Value |
ANSI | 0 |
DEFAULT | 1 |
SYMBOL | 2 |
SHIFTJIS | 128 |
HANGEUL | 129 |
HANGUL | 129 |
GB2312 | 134 |
CHINESEBIG5 | 136 |
OEM | 255 |
JOHAB | 130 |
HEBREW | 177 |
ARABIC | 178 |
GREEK | 161 |
TURKISH | 162 |
VIETNAMESE | 163 |
THAI | 222 |
EASTEUROPE | 238 |
RUSSIAN | 204 |
MAC | 77 |
BALTIC | 186 |
|
- Warning
- Internal use only
◆ height() [1/2]
static float xtd::drawing::native::font::height |
( |
intptr |
font | ) |
|
|
staticprotected |
Gets the font height.
- Parameters
-
- Returns
- The font height.
- Warning
- Internal use only
◆ height() [2/2]
static float xtd::drawing::native::font::height |
( |
intptr |
font, |
|
|
intptr |
hdc |
|
) |
| |
|
staticprotected |
Gets the font height for the specified hdc.
- Parameters
-
font | The font handle. |
hdc | The device context handle. |
- Returns
- The font height.
- Warning
- Internal use only
The documentation for this class was generated from the following file:
- xtd.drawing.native/include/xtd/drawing/native/font.h