Font weights used by ILayoutFont for font selection.
More...
#include <jawsmako/layout.h>
|
| enum | eFontWeight {
eAny = 0
, eThin = 100
, eExtraLight = 200
, eLight = 300
,
eSemiLight = 350
, eNormal = 400
, eMedium = 500
, eSemiBold = 600
,
eBold = 700
, eExtraBold = 800
, eBlack = 900
, eExtraBlack = 950
} |
| | Font weight. More...
|
|
| virtual | ~ILayoutFontWeight () |
| virtual bool | match (uint16 weight) const =0 |
| | Test for a matching font weight.
|
| virtual uint16 | difference (uint16 weight) const =0 |
| | Find the font weight difference.
|
| virtual bool | equals (const ILayoutFontWeightPtr &weight) const =0 |
| | Determines if the given weight instance is equivalent to this instance.
|
| virtual void | addRef () const =0 |
| | Increases the reference count of the actual object pointed to. This would take place during an assignment or copying.
|
| virtual bool | decRef () const =0 |
| | Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to.
|
| virtual int32 | getRefCount () const =0 |
| | Retrieve the current reference count of the actual object pointed to.
|
Font weights used by ILayoutFont for font selection.
◆ eFontWeight
Font weight.
Enumeration of common weights intended to be used with ILayoutFontWeight::create().
| Enumerator |
|---|
| eAny | 0 | Match against any weight.
|
| eThin | 100 | Thin.
|
| eExtraLight | 200 | Extra Light.
|
| eLight | 300 | Light.
|
| eSemiLight | 350 | Semi Light.
|
| eNormal | 400 | Normal.
|
| eMedium | 500 | Medium.
|
| eSemiBold | 600 | Semi Bold.
|
| eBold | 700 | Bold.
|
| eExtraBold | 800 | Extra Bold.
|
| eBlack | 900 | Black.
|
| eExtraBlack | 950 | Extra Black.
|
◆ ~ILayoutFontWeight()
| virtual JawsMako::ILayoutFontWeight::~ILayoutFontWeight |
( |
| ) |
|
|
inlinevirtual |
◆ create()
Create a font weight instance using a single weight value.
- Parameters
-
| weight | The weight to use when matching. The default value of eAny will select fonts of any weight. |
| allowedError | Optional allowed error margin. The default value is 0. |
- Returns
- ILayoutFontWeightPtr A smart pointer to the ILayoutFontWeight object.
◆ createFromRange()
Create a font weight instance using a range of weight values.
- Parameters
-
| weightLow | The lower weight range value to use when matching. |
| weightHigh | The upper weight range value to use when matching. |
- Returns
- ILayoutFontWeightPtr A smart pointer to the ILayoutFontWeight object.
◆ createFromVect()
Create a font weight instance using a vector of weight values.
- Parameters
-
| weights | The weights to use when matching. |
| allowedError | Optional allowed error margin. The default value is 0. |
- Returns
- ILayoutFontWeightPtr A smart pointer to the ILayoutFontWeight object.
◆ difference()
| virtual uint16 JawsMako::ILayoutFontWeight::difference |
( |
uint16 | weight | ) |
const |
|
pure virtual |
Find the font weight difference.
For instances created with a range of weights, the return value will be a non-zero difference if the weight is outside the specified range. For instances created with a vector of weight values, the return value will be the difference from the closest weight in the vector.
- Parameters
-
| weight | The weight to test. |
- Returns
- uint16 The difference as an absolute value.
◆ equals()
| virtual bool JawsMako::ILayoutFontWeight::equals |
( |
const ILayoutFontWeightPtr & | weight | ) |
const |
|
pure virtual |
Determines if the given weight instance is equivalent to this instance.
- Parameters
-
| weight | The weight instance to compare with. |
- Returns
- bool True if equal, false otherwise.
◆ match()
| virtual bool JawsMako::ILayoutFontWeight::match |
( |
uint16 | weight | ) |
const |
|
pure virtual |
Test for a matching font weight.
- Parameters
-
| weight | The weight to test. The value will be tested against all weight values, or range of weights specified at creation. |
- Returns
- bool True if weight matched a weight value, or was within a range of weight values.
The documentation for this class was generated from the following file: