PXTextureFont Class Reference
| Inherits from | PXFont : NSObject |
| Declared in | PXTextureFont.h PXTextureFont.m |
Overview
A PXTextureFont object represents a texture containing a parsed font. The texture is packed to try and use the least space possible.
The following code creates a texture filled with every letter, ‘,’ and ‘!’ from the Helvetica font with size of 30.0f. Then the texture that is created gets displayed.
PXFontOptions *fontOptions = [PXFontOptions fontOptionsWithSize:30.0f
characterSets:PXFontCharacterSet_AllLetters
specialCharacters:@",!"];
PXTextureFont *textureFont = [PXTextureFont registerSystemFontWithFont:@"Helvetica"
name:@"fontName"
fontOptions:fontOptions];
PXTexture *texture = [[PXTexture alloc] initWithTextureData:textureFont.textureData];
[self addChild:texture];
[texture release];
Tasks
-
textureDatasA list holding references to every PXTextureData used to make up the PXTextureFont object
property