Represents an instance of a font at a point size. Implicitly shared object.
More...
#include <Font.h>
Represents an instance of a font at a point size. Implicitly shared object.
Emulates shared_ptr-like behavior.
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.
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.
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 |
Glyph cinder::Font::getGlyphIndex |
( |
size_t |
idx | ) |
const |
Glyph cinder::Font::getGlyphChar |
( |
char |
utf8Char | ) |
const |
std::vector<Glyph> cinder::Font::getGlyphs |
( |
const std::string & |
utf8String | ) |
const |
Shape2d cinder::Font::getGlyphShape |
( |
Glyph |
glyphIndex | ) |
const |
Returns a cinder::Shape2d representing the shape of the glyph at glyphIndex.
Rectf cinder::Font::getGlyphBoundingBox |
( |
Glyph |
glyph | ) |
const |
Returns the bounding box of a Glyph, relative to the baseline as the origin.
const vector< string > & cinder::Font::getNames |
( |
bool |
forceRefresh = false | ) |
|
|
static |
Font cinder::Font::getDefault |
( |
| ) |
|
|
static |
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: