#include <WFont>
Public Types | |
| Default | |
| Browser-dependent default. | |
| Serif | |
| e.g. Times | |
| SansSerif | |
| e.g. Helvetica | |
| Cursive | |
| e.g. Zapf-Chancery | |
| Fantasy | |
| e.g. Western | |
| Monospace | |
| e.g. Courier | |
| NormalStyle | |
| Normal (default). | |
| Italic | |
| Italic. | |
| Oblique | |
| Oblique. | |
| NormalVariant | |
| Normal (default). | |
| SmallCaps | |
| Small Capitals. | |
| NormalWeight | |
| Normal (default) (Value == 400). | |
| Bold | |
| Bold (Value == 700). | |
| Bolder | |
| Bolder than the parent widget. | |
| Lighter | |
| Lighter than the parent widget. | |
| Value | |
| Specify a value (100 - 900). | |
| XXSmall | |
| Extra Extra small. | |
| XSmall | |
| Extra small. | |
| Small | |
| Small. | |
| Medium | |
| Medium, default. | |
| Large | |
| Large. | |
| XLarge | |
| Extra large. | |
| XXLarge | |
| Extra Extra large. | |
| Smaller | |
| Relatively smaller than the parent widget. | |
| Larger | |
| Relatively larger than the parent widget. | |
| FixedSize | |
| Explicit size, See also fontFixedSize(). | |
| enum | GenericFamily { Default, Serif, SansSerif, Cursive, Fantasy, Monospace } |
| The generic font family. More... | |
| enum | Style { NormalStyle, Italic, Oblique } |
| The font style. More... | |
| enum | Variant { NormalVariant, SmallCaps } |
| The font variant. More... | |
| enum | Weight { NormalWeight, Bold, Bolder, Lighter, Value } |
| The font weight. More... | |
| enum | Size { XXSmall, XSmall, Small, Medium, Large, XLarge, XXLarge, Smaller, Larger, FixedSize } |
| The font size. More... | |
Public Member Functions | |
| WFont () | |
| A default font (dependent on the user agent). | |
| void | setFamily (GenericFamily genericFamily, const WString &specificFamilies) |
| Set the font family. | |
| GenericFamily | genericFamily () const |
| Get the font generic family. | |
| const WString & | specificFamilies () const |
| Get the font specific family names. | |
| void | setStyle (Style style) |
| Set the font style. | |
| Style | style () const |
| Get the font style. | |
| void | setVariant (Variant variant) |
| Set the font variant. | |
| Variant | variant () const |
| Get the font variant. | |
| void | setWeight (Weight weight, int value=400) |
| Set the font weight. | |
| Weight | weight () const |
| Get the font weight. | |
| int | weightValue () const |
| Get the font weight value. | |
| void | setSize (Size size, WLength fixedSize=WLength()) |
| Set the font size. | |
| Size | size () const |
| Get the font size. | |
| WLength | fixedSize () const |
| Get the fixed font size for FixedSize . | |
| enum Wt::WFont::Size |
The font size.
| enum Wt::WFont::Style |
| enum Wt::WFont::Variant |
| enum Wt::WFont::Weight |
| void Wt::WFont::setFamily | ( | GenericFamily | genericFamily, | |
| const WString & | specificFamilies | |||
| ) |
Set the font family.
The font family is specified using a generic family name, in addition to a comma-seperated list of specific font choices.
The first specific font that can be matched will be used, otherwise a generic font will be used.
| void Wt::WFont::setWeight | ( | Weight | weight, | |
| int | value = 400 | |||
| ) |
Set the font weight.
When setting weight == Value, you may specify a value.
Valid values are between 100 and 900, and are rounded to multiples of 100.
1.4.7