![]() |
Cinder
0.9.1
|
#include <Font.h>
Public Types | |
typedef uint16_t | Glyph |
Public Member Functions | |
Font () | |
Font (const std::string &aName, float size) | |
Font (DataSourceRef dataSource, float size) | |
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) const |
Glyph | getGlyphChar (char utf8Char) const |
std::vector< Glyph > | getGlyphs (const std::string &utf8String) const |
Shape2d | getGlyphShape (Glyph glyphIndex) const |
Rectf | getGlyphBoundingBox (Glyph glyph) const |
CGFontRef | getCgFontRef () const |
CTFontRef | getCtFontRef () const |
Static Public Member Functions | |
static const std::vector< std::string > & | getNames (bool forceRefresh=false) |
static Font | getDefault () |
typedef std::shared_ptr< FontObj > Font::* | unspecified_bool_type |
operator unspecified_bool_type () const | |
void | reset () |
Represents an instance of a font at a point size. Implicitly shared object.
typedef uint16_t cinder::Font::Glyph |
typedef std::shared_ptr<FontObj> Font::* cinder::Font::unspecified_bool_type |
Emulates shared_ptr-like behavior.
cinder::Font::Font | ( | ) |
constructs a null Font
cinder::Font::Font | ( | const std::string & | aName, |
float | size | ||
) |
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.
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 | ) | const |
Font::Glyph cinder::Font::getGlyphChar | ( | char | utf8Char | ) | const |
vector< Font::Glyph > cinder::Font::getGlyphs | ( | const std::string & | utf8String | ) | const |
Returns a cinder::Shape2d representing the shape of the glyph at glyphIndex.
Returns the bounding box of a Glyph, relative to the baseline as the origin.
|
static |
|
static |
CGFontRef cinder::Font::getCgFontRef | ( | ) | const |
CTFontRef cinder::Font::getCtFontRef | ( | ) | const |
cinder::Font::operator unspecified_bool_type | ( | ) | const |
Emulates shared_ptr-like behavior.
void cinder::Font::reset | ( | ) |
Emulates shared_ptr-like behavior.