cocos2d-x  3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
FontFreeType Class Reference

#include <CCFontFreeType.h>

Inheritance diagram for FontFreeType:
Font Ref

Public Member Functions

bool isDistanceFieldEnabled () const
 
float getOutlineSize () const
 
void renderCharAt (unsigned char *dest, int posX, int posY, unsigned char *bitmap, long bitmapWidth, long bitmapHeight)
 
virtual FontAtlascreateFontAtlas () override
 
virtual int * getHorizontalKerningForTextUTF16 (const std::u16string &text, int &outNumLetters) const override
 
unsigned char * getGlyphBitmap (unsigned short theChar, long &outWidth, long &outHeight, Rect &outRect, int &xAdvance)
 
virtual int getFontMaxHeight () const override
 
virtual int getFontAscender () const
 
- Public Member Functions inherited from Font
virtual const char * getCurrentGlyphCollection () const
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()
 NA NA More...
 

Static Public Member Functions

static FontFreeTypecreate (const std::string &fontName, int fontSize, GlyphCollection glyphs, const char *customGlyphs, bool distanceFieldEnabled=false, int outline=0)
 
static void shutdownFreeType ()
 

Static Public Attributes

static const int DistanceMapSpread
 

Protected Member Functions

 FontFreeType (bool distanceFieldEnabled=false, int outline=0)
 
virtual ~FontFreeType ()
 
bool createFontObject (const std::string &fontName, int fontSize)
 
- Protected Member Functions inherited from Font
 Font ()
 
virtual ~Font ()
 NA NA More...
 
void setCurrentGlyphCollection (GlyphCollection glyphs, const char *customGlyphs=0)
 
const char * getGlyphCollection (GlyphCollection glyphs) const
 
- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from Font
GlyphCollection _usedGlyphs
 
char * _customGlyphs
 
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 
- Static Protected Attributes inherited from Font
static const char * _glyphASCII
 
static const char * _glyphNEHE
 

Constructor & Destructor Documentation

FontFreeType ( bool  distanceFieldEnabled = false,
int  outline = 0 
)
protected
virtual ~FontFreeType ( )
protectedvirtual

Member Function Documentation

static FontFreeType* create ( const std::string &  fontName,
int  fontSize,
GlyphCollection  glyphs,
const char *  customGlyphs,
bool  distanceFieldEnabled = false,
int  outline = 0 
)
static
virtual FontAtlas* createFontAtlas ( )
overridevirtual

Implements Font.

bool createFontObject ( const std::string &  fontName,
int  fontSize 
)
protected
virtual int getFontAscender ( ) const
virtual
virtual int getFontMaxHeight ( ) const
overridevirtual

Reimplemented from Font.

unsigned char* getGlyphBitmap ( unsigned short  theChar,
long &  outWidth,
long &  outHeight,
Rect outRect,
int &  xAdvance 
)
virtual int* getHorizontalKerningForTextUTF16 ( const std::u16string &  text,
int &  outNumLetters 
) const
overridevirtual

Implements Font.

float getOutlineSize ( ) const
inline
bool isDistanceFieldEnabled ( ) const
inline
void renderCharAt ( unsigned char *  dest,
int  posX,
int  posY,
unsigned char *  bitmap,
long  bitmapWidth,
long  bitmapHeight 
)
static void shutdownFreeType ( )
static

Member Data Documentation

const int DistanceMapSpread
static

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