Mako 7.5.0 API
Loading...
Searching...
No Matches
JawsMako::ILayoutFontWeight Class Referenceabstract

Font weights used by ILayoutFont for font selection. More...

#include <layout.h>

Inheritance diagram for JawsMako::ILayoutFontWeight:

Public Types

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...
 

Public Member Functions

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.
 
- Public Member Functions inherited from IRCObject
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 Public Member Functions

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.
 

Additional Inherited Members

- Protected Member Functions inherited from IRCObject
virtual ~IRCObject ()
 Virtual destructor.
 

Detailed Description

Font weights used by ILayoutFont for font selection.

Member Enumeration Documentation

◆ 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.

Member Function Documentation

◆ 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
weightThe weight to use when matching. The default value of eAny will select fonts of any weight.
allowedErrorOptional 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
weightLowThe lower weight range value to use when matching.
weightHighThe 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
weightsThe weights to use when matching.
allowedErrorOptional 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
weightThe 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
weightThe 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
weightThe 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: