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

  •   textureDatas

    A list holding references to every PXTextureData used to make up the PXTextureFont object

    property

Properties

textureDatas

A list holding references to every PXTextureData used to make up the PXTextureFont object

@property (nonatomic, readonly) NSArray *textureDatas

Declared In

PXTextureFont.h