cocos2d-x  3.3rc0
 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
local isDistanceFieldEnabled ()
float getOutlineSize () const
local getOutlineSize ()
void renderCharAt (unsigned char *dest, int posX, int posY, unsigned char *bitmap, long bitmapWidth, long bitmapHeight)
var renderCharAt ( var dest, var posX, var posY, var bitmap, var bitmapWidth, var bitmapHeight)
local renderCharAt ( local dest, local posX, local posY, local bitmap, local bitmapWidth, local bitmapHeight)
virtual FontAtlascreateFontAtlas () override
local createFontAtlas ()
virtual int * getHorizontalKerningForTextUTF16 (const std::u16string &text, int &outNumLetters) const override
var getHorizontalKerningForTextUTF16 ( var text, var outNumLetters)
local getHorizontalKerningForTextUTF16 ( local text, local outNumLetters)
unsigned char * getGlyphBitmap (unsigned short theChar, long &outWidth, long &outHeight, Rect &outRect, int &xAdvance)
var getGlyphBitmap ( var theChar, var outWidth, var outHeight, var outRect, var xAdvance)
local getGlyphBitmap ( local theChar, local outWidth, local outHeight, local outRect, local xAdvance)
virtual int getFontMaxHeight () const override
var getFontMaxHeight ()
local getFontMaxHeight ()
virtual int getFontAscender () const
local getFontAscender ()
- Public Member Functions inherited from Font
virtual const char * getCurrentGlyphCollection () const
local getCurrentGlyphCollection ()
- 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...
 
local getReferenceCount ()
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()

Static Public Member Functions

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

Static Public Attributes

static const int DistanceMapSpread
var DistanceMapSpread
local DistanceMapSpread

Protected Member Functions

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

Additional Inherited Members

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

Constructor & Destructor Documentation

FontFreeType ( bool  distanceFieldEnabled = false,
int  outline = 0 
)
protected
var FontFreeType ( var  distanceFieldEnabled = false,
var  outline = 0 
)
protected
local FontFreeType ( local  distanceFieldEnabled = false,
local  outline = 0 
)
protected
virtual ~FontFreeType ( )
protectedvirtual
var ~FontFreeType ( )
protectedvirtual
local ~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
var create ( var  fontName,
var  fontSize,
var  glyphs,
var  customGlyphs,
var  distanceFieldEnabled = false,
var  outline = 0 
)
static
local create ( local  fontName,
local  fontSize,
local  glyphs,
local  customGlyphs,
local  distanceFieldEnabled = false,
local  outline = 0 
)
static
virtual FontAtlas* createFontAtlas ( )
overridevirtual

Implements Font.

var createFontAtlas ( )
overridevirtual

Implements Font.

local createFontAtlas ( )
overridevirtual

Implements Font.

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

Reimplemented from Font.

var getFontMaxHeight ( )
overridevirtual

Reimplemented from Font.

local getFontMaxHeight ( )
overridevirtual

Reimplemented from Font.

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

Implements Font.

var
getHorizontalKerningForTextUTF16
( var  text,
var  outNumLetters 
)
overridevirtual

Implements Font.

local
getHorizontalKerningForTextUTF16
( local  text,
local  outNumLetters 
)
overridevirtual

Implements Font.

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

Member Data Documentation

const int DistanceMapSpread
static
var DistanceMapSpread
static
local DistanceMapSpread
static

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