29 #if defined( CINDER_WINRT )
34 #define generic GenericFromFreeTypeLibrary
35 #include FT_FREETYPE_H
45 #if defined( CINDER_COCOA )
46 typedef struct CGFont *CGFontRef;
47 #if defined( CINDER_COCOA )
48 typedef const struct __CTFont * CTFontRef;
50 #elif defined( CINDER_MSW )
93 #if defined( CINDER_WINRT )
94 FT_Face getFace()
const {
return mObj->mFace; }
97 static const std::vector<std::string>&
getNames(
bool forceRefresh =
false );
100 #if defined( CINDER_COCOA )
101 CGFontRef getCgFontRef()
const;
102 CTFontRef getCtFontRef()
const;
103 #elif defined( CINDER_MSW )
104 ::LOGFONT getLogfont()
const {
return mObj->mLogFont; }
105 ::HFONT getHfont()
const {
return mObj->mHfont; }
106 const Gdiplus::Font* getGdiplusFont()
const {
return mObj->mGdiplusFont.get(); }
107 static HDC getGlobalDc();
122 #if defined( CINDER_COCOA )
124 const struct __CTFont* mCTFont;
125 #elif defined( CINDER_MSW )
126 ::TEXTMETRIC mTextMetric;
129 std::shared_ptr<Gdiplus::Font> mGdiplusFont;
130 std::vector<std::pair<uint16_t,uint16_t> > mUnicodeRanges;
132 #elif defined( CINDER_WINRT )
133 std::vector<std::pair<uint16_t,uint16_t> > mUnicodeRanges;
140 std::shared_ptr<Obj> mObj;
155 virtual const char*
what()
const throw() {
return mMessage; }
Shape2d getGlyphShape(Glyph glyphIndex) const
Returns a cinder::Shape2d representing the shape of the glyph at glyphIndex.
std::string getFullName() const
Glyph getGlyphIndex(size_t idx) const
GLsizei const GLchar ** string
Definition: GLee.h:2427
float getSize() const
Definition: Font.cpp:225
std::vector< Glyph > getGlyphs(const std::string &utf8String) const
std::shared_ptr< Obj > Font::* unspecified_bool_type
Emulates shared_ptr-like behavior.
Definition: Font.h:145
virtual const char * what() const
Definition: Font.h:155
static const std::vector< std::string > & getNames(bool forceRefresh=false)
Definition: Font.cpp:210
Represents an instance of a font at a point size. Implicitly shared object.
Definition: Font.h:63
Glyph getGlyphChar(char utf8Char) const
uint16_t Glyph
Definition: Font.h:65
static Font getDefault()
Definition: Font.cpp:215
FontInvalidNameExc()
Definition: Font.h:153
Rectf getGlyphBoundingBox(Glyph glyph) const
Returns the bounding box of a Glyph, relative to the baseline as the origin.
Definition: Exception.h:32
void reset()
Emulates shared_ptr-like behavior.
Definition: Font.h:147
std::shared_ptr< class DataSource > DataSourceRef
Definition: DataSource.h:35
const std::string & getName() const
Definition: Font.cpp:220
GLsizeiptr size
Definition: GLee.h:2089
size_t getNumGlyphs() const
Font()
constructs a null Font
Definition: Font.h:68