FontPackParams

FontPackParams
Scaleform::GFx::State
    Scaleform::GFx::FontPackParams
Declaration
class FontPackParams : public State;
Description

FontPackParams contains the font rendering configuration options necessary to generate glyph textures. By setting TextureConfig, users can control the size of glyphs and textures that are generated during static texture glyph packing. FontPackParams is used primarily by the GFxExport tool when '-fonts' argument is specified. 

By default, Loader uses null FontPackParams, which means that static glyph textures are not generated and the dynamic cache described by FontCacheManager is used instead (unless textures were generated by the GFxExport tool and are loaded from GFx file). Setting FontPackParams will cause static glyph textures to be pre-generated during loading and used for rendering movies. This may produce blurrier text and potentially slower load times compared to the dynamic cache.

Examples
   // Configuring the glyph packer
   //-----------------------------
   // Creating the packer
   loader.SetFontPackParams(Ptr<FontPackParams>(*new GFx::FontPackParams()));

   // Optional TextureConfig
   FontPackParams::TextureConfig fontPackConfig;
   fontPackConfig.NominalSize = 32;
   fontPackConfig.PadPixels   = 2;
   fontPackConfig.TextureWidth  = 512;
   fontPackConfig.TextureHeight = 512;
   loader.GetFontPackParams()->SetTextureConfig(fontPackConfig);

   // Optional restriction: If the font contains more than 1000 glyphs it will not be packed.
   // Instead, this font will be displayed with the dynamic cache.
   loader.GetFontPackParams()->SetGlyphCountLimit(1000);
Methods
Method 
Description 
Obtains the scale from texture UV coordinates to the 1024 x 1024 glyph square. 
Gets the limit of the number of glyphs in a font. 
Obtains a virtual StateType
Returns the TextureConfig structure. 
Returns the pixel height of text. 
Obtains the flag of using separate textures for each font. 
Initializes FontPackParams. 
Sets the limit of the number of glyphs in a font. 
Sets the TextureConfig values. 
Sets the flag of using separate textures for each font. 
Structures
Structure 
Description 
TextureConfig structure describes the texture use policy of the static raster cache. 
File

GFx_Loader.h