Inherits from PXFontOptions : NSObject
Conforms to NSCopying
PXPooledObject
Declared in PXTextureFontOptions.h
PXTextureFontOptions.m

Overview

Defines a set of options to use when creating a PXTextureFont. These options will decide how the texture atlas will be created and what will be stored.

Example:

PXTextureFontOptions *fontOptions = [[PXTextureFontOptions alloc] initWithSize:24.0f
                                                                 characterSets:PXFontCharacterSet_AllLetters | PXFontCharacterSet_Numerals
                                                             specialCharacters:@",.!?"]];
[PXFont registerFontWithContentsOfFile:@"font.ttf"
                                  name:@"myFont"
                               options:fontOptions];
[fontOptions release];

Tasks

Properties

size

The font size to be used to create the texture font generated by these options.

@property (nonatomic) float size

Discussion

Default: 12.0f

Declared In

PXTextureFontOptions.h

textureModifier

A texture modifier to be applied to a texture font generated using these options.

@property (nonatomic, retain) id<PXTextureModifier> textureModifier

Discussion

Default: nil

Declared In

PXTextureFontOptions.h

Class Methods

defaultSize

Returns the default font size for an texture based fonts.

+ (float)defaultSize

Return Value

The default font size.

Declared In

PXTextureFontOptions.m

textureFontOptionsWithSize:characterSets:specialCharacters:

Creates a PXTextureFontOptions. The font options holds information necessary to build a texture based font properly.

+ (PXTextureFontOptions *)textureFontOptionsWithSize:(float)size characterSets:(unsigned)characterSets specialCharacters:(NSString *)specialCharacters

Parameters

size

The font size to be used to create the texture font generated by these options.

characterSets

A single or multiple (or'ed together) PXFontCharacterSet(s).

specialCharacters

Any characters not defined in the sets that you wish to include.

Declared In

PXTextureFontOptions.m

Instance Methods

initWithSize:characterSets:specialCharacters:

Creates a new PXTextureFontOptions. The font options holds information necessary to build a texture based font properly.

- (id)initWithSize:(float)_size characterSets:(unsigned)characterSets specialCharacters:(NSString *)specialCharacters

Parameters

characterSets

A single or multiple (or'ed together) PXFontCharacterSet(s).

specialCharacters

Any characters not defined in the sets that you wish to include.

size

The font size to be used to create the texture font generated by these options.

Declared In

PXTextureFontOptions.m