PXTextureFontOptions Class Reference
| 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
-
textureModifierA texture modifier to be applied to a texture font generated using these options.
property -
sizeThe font size to be used to create the texture font generated by these options.
property -
– initWithSize:characterSets:specialCharacters:Creates a new PXTextureFontOptions. The font options holds information necessary to build a texture based font properly.
-
+ defaultSizeReturns the default font size for an texture based fonts.
-
+ textureFontOptionsWithSize:characterSets:specialCharacters:Creates a PXTextureFontOptions. The font options holds information necessary to build a texture based font properly.
Properties
Class Methods
defaultSize
Returns the default font size for an texture based fonts.
+ (float)defaultSizeReturn Value
The default font size.
Declared In
PXTextureFontOptions.mtextureFontOptionsWithSize: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 *)specialCharactersParameters
- 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.mInstance 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 *)specialCharactersParameters
- 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