cinder::Font Class Reference

#include <Font.h>

List of all members.

Classes

class  Obj

Public Types

typedef uint16_t Glyph

Public Member Functions

 Font ()
 constructs a null Font
 Font (const std::string &aName, float size)
 Constructs a Font from its name (Postscript name preferred) and its size in points.
 Font (DataSourceRef dataSource, float size)
 Constructs a Font from a DataSource representing font data (such as a .ttf file) and its size in points.
const std::string & getName () const
std::string getFullName () const
float getSize () const
float getLeading () const
float getAscent () const
float getDescent () const
size_t getNumGlyphs () const
Glyph getGlyphIndex (size_t idx)
Glyph getGlyphChar (char utf8Char)
std::vector< GlyphgetGlyphs (const std::string &utf8String)
Shape2d getGlyphShape (Glyph glyphIndex)
 Returns a cinder::Shape2d representing the shape of the glyph at glyphIndex.
CGFontRef getCgFontRef () const
CTFontRef getCtFontRef () const
::LOGFONT getLogfont () const
const Gdiplus::Font * getGdiplusFont () const

Static Public Member Functions

static const std::vector
< std::string > & 
getNames (bool forceRefresh=false)



typedef shared_ptr< Obj > Font::* unspecified_bool_type
 Emulates shared_ptr-like behavior.
 operator unspecified_bool_type ()
 Emulates shared_ptr-like behavior.
void reset ()
 Emulates shared_ptr-like behavior.

Member Typedef Documentation

typedef uint16_t cinder::Font::Glyph
typedef shared_ptr<Obj> Font::* cinder::Font::unspecified_bool_type

Emulates shared_ptr-like behavior.


Constructor & Destructor Documentation

cinder::Font::Font (  ) 

constructs a null Font

cinder::Font::Font ( const std::string &  aName,
float  size 
)

Constructs a Font from its name (Postscript name preferred) and its size in points.

Note:
Assumes a point size relative to 72dpi on Cocoa but 96dpi on Windows. This creates rough parity between the platforms on type size, but in Windows this renders fonts smaller than normal.
cinder::Font::Font ( DataSourceRef  dataSource,
float  size 
)

Constructs a Font from a DataSource representing font data (such as a .ttf file) and its size in points.

Note:
Assumes a point size relative to 72dpi on Cocoa but 96dpi on Windows. This creates rough parity between the platforms on type size, but in Windows this renders fonts smaller than normal.

Member Function Documentation

const std::string & cinder::Font::getName (  )  const
std::string cinder::Font::getFullName (  )  const
float cinder::Font::getSize (  )  const
float cinder::Font::getLeading (  )  const
float cinder::Font::getAscent (  )  const
float cinder::Font::getDescent (  )  const
size_t cinder::Font::getNumGlyphs (  )  const
Font::Glyph cinder::Font::getGlyphIndex ( size_t  idx  ) 
Font::Glyph cinder::Font::getGlyphChar ( char  utf8Char  ) 
vector< Font::Glyph > cinder::Font::getGlyphs ( const std::string &  utf8String  ) 
Shape2d cinder::Font::getGlyphShape ( Glyph  glyphIndex  ) 

Returns a cinder::Shape2d representing the shape of the glyph at glyphIndex.

const vector< string > & cinder::Font::getNames ( bool  forceRefresh = false  )  [static]
CGFontRef cinder::Font::getCgFontRef (  )  const
CTFontRef cinder::Font::getCtFontRef (  )  const
::LOGFONT cinder::Font::getLogfont (  )  const
const Gdiplus::Font* cinder::Font::getGdiplusFont (  )  const
cinder::Font::operator unspecified_bool_type (  ) 

Emulates shared_ptr-like behavior.

void cinder::Font::reset (  ) 

Emulates shared_ptr-like behavior.


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