Mako 7.4.0 API
Loading...
Searching...
No Matches
JawsMako::ILayoutFont Class Referenceabstract

ILayoutFont interface. More...

#include <layout.h>

Inheritance diagram for JawsMako::ILayoutFont:

Classes

class  CLayoutFontItem
 An association of a font and it's font index. More...
 

Public Types

enum  eFontStyle { eFSAny , eFSItalic = 1 , eFSRegular = 64 }
 Font style. More...
 
enum  eFontProportion { eFPAny , eFPMonoSpaced , eFPProportional }
 Font proportion. More...
 
enum  eFontSerifStyle { eFSSAny , eFSSSerif , eFSSSansSerif }
 Font serif style. More...
 

Public Member Functions

virtual CLayoutFontVect findFonts () const =0
 Find matching fonts.
 
virtual void findFont (IDOMFontOpenTypePtr &font, uint32 &fontIndex, bool exact=true) const =0
 Find matching font.
 
- 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 ILayoutFontPtr create (const IJawsMakoPtr &jawsMako, const ILayoutFontWeightPtr &weight=ILayoutFontWeightPtr(), eFontStyle style=eFSAny, eFontProportion proportion=eFPAny, eFontSerifStyle serifStyle=eFSSAny, uint64 codePage=UINT64_MAX)
 Create a ILayoutFont instance.
 

Additional Inherited Members

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

Detailed Description

ILayoutFont interface.

A interface that enumerates system fonts with information drawn from OpenType tables to allow font selection based on characteristics such as font weight, style, proportion, serif style and code page ranges.

Member Enumeration Documentation

◆ eFontProportion

Font proportion.

Enumerator
eFPAny 

Match against any proportion type.

eFPMonoSpaced 

Monospace (fixed-width) font.

eFPProportional 

Proportional (variable-width) font.

◆ eFontSerifStyle

Font serif style.

Enumerator
eFSSAny 

Match against any style.

eFSSSerif 

Serif.

eFSSSansSerif 

Sans Serif.

◆ eFontStyle

Font style.

Enumerator
eFSAny 

Match against any style.

eFSItalic 

Italic.

eFSRegular 

Regular.

Member Function Documentation

◆ create()

static JAWSMAKO_API ILayoutFontPtr JawsMako::ILayoutFont::create ( const IJawsMakoPtr & jawsMako,
const ILayoutFontWeightPtr & weight = ILayoutFontWeightPtr(),
eFontStyle style = eFSAny,
eFontProportion proportion = eFPAny,
eFontSerifStyle serifStyle = eFSSAny,
uint64 codePage = UINT64_MAX )
static

Create a ILayoutFont instance.

Parameters
jawsMakoThe IJawsMako object.
weightWeights used when finding fonts. When comparing weights, the usWeightClass field from the font OS/2 table will be used. The default value is NULL, which returns fonts of any weight.
styleThe style to be used when finding fonts. The style will be compared with the bit values from the fsSelection field in the OS/2 table. The default value is eFSAny, which returns fonts of any style.
proportionThe proportion type used when finding fonts. The proportion type is determined from both the proportion value in the OS/2 table panose field, and the isFixedPitch field in the post table header, and they are expected to be consistent. The default value is eFPAny, which return both proportional and monospace fonts.
serifStyleThe Serif style used when finding fonts. This is determined using both the OS/2 table sFamilyClass and panose fields, and they are expected to be consistent. The default value is eFSSAny, which returns both Serif and Sans Serif fonts.
codePageThe code page character ranges used used when finding fonts. This is equivalent to the OS/2 ulCodePageRange1 and ulCodePageRange2 fields and can be used to find fonts that set specific ranges. The default value sets all bits to 1 (all code page ranges).
Returns
ILayoutFontPtr A smart pointer to the ILayoutFont object.

◆ findFont()

virtual void JawsMako::ILayoutFont::findFont ( IDOMFontOpenTypePtr & font,
uint32 & fontIndex,
bool exact = true ) const
pure virtual

Find matching font.

Returns the first font found to match the selection criteria, and the font index.

Parameters
fontReference to the font to be returned, which will be set NULL if there were no matching fonts.
fontIndexReference to the index of the font within the font file.
exactWhen true only exact font matches will be returned. When false the font determined to be the closest match will be returned. The default is true.

◆ findFonts()

virtual CLayoutFontVect JawsMako::ILayoutFont::findFonts ( ) const
pure virtual

Find matching fonts.

Returns
CLayoutFontVect A vector of CLayoutFontItem.

The documentation for this class was generated from the following file: