|
|
| Font () |
| | Default constructor.
|
| |
|
| Font (const std::string &family, std::size_t size, const std::string &styleName, Weight weight=Weight::Normal, Slant slant=Slant::Normal, Stretch stretch=Stretch::Normal) |
| | Construct a font with an exact style name hint.
|
| |
|
| Font (const std::string &family, std::size_t size, Weight weight=Weight::Normal, Slant slant=Slant::Normal, Stretch stretch=Stretch::Normal) |
| | Construct a font with explicit weight and slant.
|
| |
|
| Font (Category category, std::size_t size, Weight weight=Weight::Normal, Slant slant=Slant::Normal, Stretch stretch=Stretch::Normal) |
| | Construct a font from a generic category.
|
| |
|
const std::string & | family () const |
| | Returns the family of the font.
|
| |
|
std::size_t | size () const |
| | Returns the size of the font.
|
| |
|
const std::string & | styleName () const |
| | Returns the optional exact style name hint.
|
| |
|
bool | hasStyleName () const |
| | Returns true if an exact style name hint is set.
|
| |
|
Weight | weight () const |
| | Returns the weight of the font request.
|
| |
|
Slant | slant () const |
| | Returns the slant of the font request.
|
| |
|
Stretch | stretch () const |
| | Returns the stretch of the font request.
|
| |
|
Category | category () const |
| | Returns the generic font category.
|
| |
|
Font | withSize (std::size_t size) const |
| | Returns a copy of this font with a different size.
|
| |
|
Font | withWeight (Weight weight) const |
| | Returns a copy of this font with a different weight.
|
| |
|
Font | withSlant (Slant slant) const |
| | Returns a copy of this font with a different slant.
|
| |
|
Font | withStretch (Stretch stretch) const |
| | Returns a copy of this font with a different stretch.
|
| |
Font describes the family, size and style attributes that painters use to select a concrete typeface. The same description can be used both for text measurement and for actual rendering, which keeps layout and drawing in sync across paint targets.