Boost.UI
User Interface Boost library
|
Font class. More...
Public Types | |
enum | family { family::other, family::serif, family::sans_serif, family::cursive, family::fantasy, family::monospace } |
Enumaration of font families. More... | |
enum | slant { slant::normal, slant::italic, slant::oblique } |
Enumaration of font slants. More... | |
enum | weight { weight::normal, weight::bold } |
Enumaration of font weights. More... | |
typedef void * | native_handle_type |
Implementation-defined font type. | |
Public Member Functions | |
font & | set_family (family f) |
Sets font family. | |
family | get_family () const |
Returns font family. | |
font & | set_slant (slant s) |
Sets font slant. | |
slant | get_slant () const |
Returns font slant. | |
font & | set_weight (weight w) |
Sets font weight. | |
weight | get_weight () const |
Returns font weight. | |
font & | name (const uistring &n) |
Sets font name. More... | |
uistring | name () const |
Returns font name. | |
font & | size_pt (double pt) |
Sets font size in points. More... | |
double | size_pt () const |
Returns font size in points. | |
bool | valid () const noexcept |
Returns true only if font is valid. | |
font (double pt, family f, slant s=slant::normal, weight w=weight::normal) | |
Creates font. | |
font (double pt, const uistring &n, slant s=slant::normal, weight w=weight::normal) | |
Creates font. | |
native_handle_type | native_handle () |
Returns the implementation-defined underlying font handle. | |
const native_handle_type | native_handle () const |
Returns the implementation-defined underlying font handle. | |
Static Public Member Functions | |
static font | caption () noexcept |
Returns default font used for captioned widgets. | |
Font class.
|
strong |
|
strong |
|
strong |
Sets font name.
std::out_of_range | If font name isn't supported |
font& boost::ui::font::size_pt | ( | double | pt | ) |
Sets font size in points.
std::out_of_range | If font size isn't positive value |