Font weights used by ILayoutFont for font selection.
More...
#include <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 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.
|
|
|
static JAWSMAKO_API ILayoutFontWeightPtr | create (uint16 weight=eAny, uint16 allowedError=0) |
| Create a font weight instance using a single weight value.
|
|
static JAWSMAKO_API ILayoutFontWeightPtr | createFromVect (const CUInt16Vect &weights, uint16 allowedError=0) |
| Create a font weight instance using a vector of weight values.
|
|
static JAWSMAKO_API ILayoutFontWeightPtr | createFromRange (uint16 weightLow, uint16 weightHigh) |
| Create a font weight instance using a range of weight values.
|
|
|
virtual | ~IRCObject () |
| Virtual destructor.
|
|
Font weights used by ILayoutFont for font selection.
◆ eFontWeight
Font weight.
Enumeration of common weights intended to be used with ILayoutFontWeight::create().
Enumerator |
---|
eAny | Match against any weight.
|
eThin | Thin.
|
eExtraLight | Extra Light.
|
eLight | Light.
|
eSemiLight | Semi Light.
|
eNormal | Normal.
|
eMedium | Medium.
|
eSemiBold | Semi Bold.
|
eBold | Bold.
|
eExtraBold | Extra Bold.
|
eBlack | Black.
|
eExtraBlack | Extra Black.
|
◆ create()
static JAWSMAKO_API ILayoutFontWeightPtr JawsMako::ILayoutFontWeight::create |
( |
uint16 | weight = eAny, |
|
|
uint16 | allowedError = 0 ) |
|
static |
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()
static JAWSMAKO_API ILayoutFontWeightPtr JawsMako::ILayoutFontWeight::createFromRange |
( |
uint16 | weightLow, |
|
|
uint16 | weightHigh ) |
|
static |
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()
static JAWSMAKO_API ILayoutFontWeightPtr JawsMako::ILayoutFontWeight::createFromVect |
( |
const CUInt16Vect & | weights, |
|
|
uint16 | allowedError = 0 ) |
|
static |
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 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: