HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FONT_Info Class Reference

#include <FONT_Info.h>

Public Member Functions

bool isValid () const
 
const char * typeface () const
 The typeface (font family) of the font. E.g. 'Helvetica'. More...
 
const char * name () const
 
FONT_Style style () const
 
bool hasStyle (FONT_Style style) const
 Returns true if the font has the specific style flag set. More...
 
bool isSlanted () const
 Returns true if the font is italic or oblique. More...
 
bool isBolded () const
 Returns true if the font is bolded in some way. More...
 
FONT_Weight weight () const
 The weight of the font. More...
 
const char * path () const
 
int faceIndex () const
 
bool operator< (const FONT_Info &other) const
 Less-than operator for comparison and sorting. More...
 

Static Public Member Functions

static bool styleName (FONT_Style style, UT_WorkBuffer &name)
 Returns the font style name given an FONT_Style bitmap value. More...
 
static bool parseStyleName (const char *name, FONT_Style &style)
 Attempts to parse a font's style name into the style bit field. More...
 
static const char * weightName (FONT_Weight weight)
 
static bool parseWeightName (const char *name, FONT_Weight &weight)
 Attempts to parse a font's weight name into the style bit field. More...
 

Friends

class FONT_Registry
 

Detailed Description

Definition at line 26 of file FONT_Info.h.

Member Function Documentation

int FONT_Info::faceIndex ( ) const
inline

Returns the index of the face in the font file. This is used for TrueType and OpenType font collection files to select the correct face from within the file.

Definition at line 65 of file FONT_Info.h.

bool FONT_Info::hasStyle ( FONT_Style  style) const
inline

Returns true if the font has the specific style flag set.

Definition at line 43 of file FONT_Info.h.

bool FONT_Info::isBolded ( ) const
inline

Returns true if the font is bolded in some way.

Definition at line 52 of file FONT_Info.h.

bool FONT_Info::isSlanted ( ) const
inline

Returns true if the font is italic or oblique.

Definition at line 47 of file FONT_Info.h.

bool FONT_Info::isValid ( ) const
inline

Definition at line 29 of file FONT_Info.h.

const char* FONT_Info::name ( ) const
inline

The full name of the font, including style and weight. E.g. 'Helvetica Bold Oblique'

Definition at line 36 of file FONT_Info.h.

bool FONT_Info::operator< ( const FONT_Info other) const
inline

Less-than operator for comparison and sorting.

Definition at line 81 of file FONT_Info.h.

static bool FONT_Info::parseStyleName ( const char *  name,
FONT_Style style 
)
static

Attempts to parse a font's style name into the style bit field.

static bool FONT_Info::parseWeightName ( const char *  name,
FONT_Weight weight 
)
static

Attempts to parse a font's weight name into the style bit field.

const char* FONT_Info::path ( ) const
inline

Returns the filename of the font. Can be either a TrueType, OpenType, or Adobe Type-1 font.

Definition at line 60 of file FONT_Info.h.

FONT_Style FONT_Info::style ( ) const
inline

A bitmap of the styles of the face. See FONT_Style for possible bits.

Definition at line 40 of file FONT_Info.h.

static bool FONT_Info::styleName ( FONT_Style  style,
UT_WorkBuffer name 
)
static

Returns the font style name given an FONT_Style bitmap value.

const char* FONT_Info::typeface ( ) const
inline

The typeface (font family) of the font. E.g. 'Helvetica'.

Definition at line 32 of file FONT_Info.h.

FONT_Weight FONT_Info::weight ( ) const
inline

The weight of the font.

Definition at line 56 of file FONT_Info.h.

static const char* FONT_Info::weightName ( FONT_Weight  weight)
static

Returns the a weight name closest to the weight value given. The value is clamped. See FONT_Weight for the known, named values.

Friends And Related Function Documentation

friend class FONT_Registry
friend

Definition at line 86 of file FONT_Info.h.


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