nw::font::PackedFont::GetRequireBufferSize Member Functionstatic u32 GetRequireBufferSize( const void * bfnt, int numSheetCache ); static u32 GetRequireBufferSize( const void * bfnt, const char* glyphGroups, int numSheetCache ); static u32 GetRequireBufferSize( const void * bfnt, f32 rateSheetCache ); static u32 GetRequireBufferSize( const void * bfnt, const char* glyphGroups, f32 rateSheetCache );
| GetRequireBufferSize ( const void *, int ) | Calculates the buffer size required to construct the font. |
| GetRequireBufferSize ( const void *, const char *, int ) | Calculates the buffer size required to construct the font. |
| GetRequireBufferSize ( const void *, f32 ) | Calculates the buffer size required to construct the font. |
| GetRequireBufferSize ( const void *, const char *, f32 ) | Calculates the buffer size required to construct the font. |
GetRequireBufferSize ( const void *, int )The brfnt argument specifies a pointer to the header portion of the archive font loaded into memory. At least an amount equal to PackedFont::HEADER_SIZE (= 16 KB) needs to be loaded from the beginning of the file.
Specify in glyphGroups a comma-delimited string of the glyph groups to be loaded. For example, to make available the glyphs belonging to the "ascii" group, specify as follows:
u32 requireSize = PackedFont::GetRequireBufferSize(brfnt, "ascii", rate);
To make available the glyphs belonging to the "ascii", "european", and "jis0" groups, specify as follows.
u32 requireSize = PackedFont::GetRequireBufferSize(brfnt, "ascii,european,jis0", rate);
There is no significance to the order of the group names.
These group names are defined by the glyph group specification (XGGP) file that is used when the archive font is created. Characters whose group is not defined by the glyph group specification (XGGP) file are assigned to the group with the name "*". In the following example, glyphs belonging to the "ascii" group and glyphs not belonging to any group are specified.
u32 requireSize = PackedFont::GetRequireBufferSize(brfnt, "ascii,*");
As a special case, all glyphs contained in an archive font are loaded when the empty string is specified in glyphGroups. In the function format where glyphGroups is not passed as an argument, the function proceeds assuming that an empty string was passed to glyphGroups. nw::font::PackedFont::LOAD_GLYPH_ALL, defined as the empty string, can also be explicitly passed.
Pass as the argument either numSheetCache or rateSheetCache to specify the number of expanded sheets to cache.
With numSheetCache, the number of sheets to cache is specified directly.
With rateSheetCache, the number of caches is specified in proportion to the number of loaded sheets. For example, if the number of loaded sheets is 100 and the rateSheetCache is 0.3f, the cache count is 30 (100 * 0.3). The cache count must be an integer to be meaningful. If it is not, it is truncated to an integer, and then the required memory size is calculated.
With either function format, the cache count is clamped between 1 and the number of loaded sheets.
The same size buffer is required to construct a font whether the nw::font::PackedFont::Constructfunction is used or the pair of the nw::font::PackedFont::InitStreamingConstruct function and the nw::font::PackedFont::StreamingConstruct function are used.
GetRequireBufferSize ( const void *, const char *, int )The brfnt argument specifies a pointer to the header portion of the archive font loaded into memory. At least an amount equal to PackedFont::HEADER_SIZE (= 16 KB) needs to be loaded from the beginning of the file.
Specify in glyphGroups a comma-delimited string of the glyph groups to be loaded. For example, to make available the glyphs belonging to the "ascii" group, specify as follows.
u32 requireSize = PackedFont::GetRequireBufferSize(brfnt, "ascii", rate);
To make available the glyphs belonging to the "ascii", "european", and "jis0" groups, specify as follows.
u32 requireSize = PackedFont::GetRequireBufferSize(brfnt, "ascii,european,jis0", rate);
The statement for the PCM type is as follows. There is no significance to the order of the group names.
These group names are defined by the glyph group specification (XGGP) file that is used when the archive font is created. Characters whose group is not defined by the glyph group specification (XGGP) file are assigned to the group with the name "*". In the following example, glyphs belonging to the "ascii" group and glyphs not belonging to any group are specified.
u32 requireSize = PackedFont::GetRequireBufferSize(brfnt, "ascii,*");
As a special case, all glyphs contained in an archive font are loaded when the empty string is specified in glyphGroups. In the function format where glyphGroups is not passed as an argument, the function proceeds assuming that an empty string was passed to glyphGroups. nw::font::PackedFont::LOAD_GLYPH_ALL, defined as the empty string, can also be explicitly passed.
Pass as the argument either numSheetCache or rateSheetCache to specify the number of expanded sheets to cache.
With numSheetCache, the number of sheets to cache is specified directly.
With rateSheetCache, the number of caches is specified in proportion to the number of loaded sheets. For example, if the number of loaded sheets is 100 and the rateSheetCache is 0.3f, the cache count is 30 (100 * 0.3). The cache count must be an integer to be meaningful. If it is not, it is truncated to an integer, and then the required memory size is calculated.
With either function format, the cache count is clamped between 1 and the number of loaded sheets.
The same size buffer is required to construct a font whether the nw::font::PackedFont::Constructfunction is used or the pair of the nw::font::PackedFont::InitStreamingConstruct function and the nw::font::PackedFont::StreamingConstruct function are used.
GetRequireBufferSize ( const void *, f32 ) The brfnt argument specifies a pointer to the header portion of the archive font loaded into memory. At least an amount equal to PackedFont::HEADER_SIZE (= 16 KB) needs to be loaded from the beginning of the file.
Specify in glyphGroups a comma-delimited string of the glyph groups to be loaded. For example, to make available the glyphs belonging to the "ascii" group, specify as follows.
u32 requireSize = PackedFont::GetRequireBufferSize(brfnt, "ascii", rate);
To make available the glyphs belonging to the "ascii", "european", and "jis0" groups, specify as follows.
u32 requireSize = PackedFont::GetRequireBufferSize(brfnt, "ascii,european,jis0", rate);
The statement for the PCM type is as follows. There is no significance to the order of the group names.
These group names are defined by the glyph group specification (XGGP) file that is used when the archive font is created. Characters whose group is not defined by the glyph group specification (XGGP) file are assigned to the group with the name "*". In the following example, glyphs belonging to the "ascii" group and glyphs not belonging to any group are specified.
u32 requireSize = PackedFont::GetRequireBufferSize(brfnt, "ascii,*");
As a special case, all glyphs contained in an archive font are loaded when the empty string is specified in glyphGroups. In the function format where glyphGroups is not passed as an argument, the function proceeds assuming that an empty string was passed to glyphGroups. nw::font::PackedFont::LOAD_GLYPH_ALL, defined as the empty string, can also be explicitly passed.
Pass as the argument either numSheetCache or rateSheetCache to specify the number of expanded sheets to cache.
With numSheetCache, the number of sheets to cache is specified directly.
With rateSheetCache, the number of caches is specified in proportion to the number of loaded sheets. For example, if the number of loaded sheets is 100 and the rateSheetCache is 0.3f, the cache count is 30 (100 * 0.3). The cache count must be an integer to be meaningful. If it is not, it is truncated to an integer, and then the required memory size is calculated.
With either function format, the cache count is clamped between 1 and the number of loaded sheets.
The same size buffer is required to construct a font whether the nw::font::PackedFont::Constructfunction is used or the pair of the nw::font::PackedFont::InitStreamingConstruct function and the nw::font::PackedFont::StreamingConstruct function are used.
GetRequireBufferSize ( const void *, const char *, f32 )The brfnt argument specifies a pointer to the header portion of the archive font loaded into memory. At least an amount equal to PackedFont::HEADER_SIZE (= 16 KB) needs to be loaded from the beginning of the file.
Specify in glyphGroups a comma-delimited string of the glyph groups to be loaded. For example, to make available the glyphs belonging to the "ascii" group, specify as follows.
u32 requireSize = PackedFont::GetRequireBufferSize(brfnt, "ascii", rate);
To make available the glyphs belonging to the "ascii", "european", and "jis0" groups, specify as follows.
u32 requireSize = PackedFont::GetRequireBufferSize(brfnt, "ascii,european,jis0", rate);
The statement for the PCM type is as follows. There is no significance to the order of the group names.
These group names are defined by the glyph group specification (XGGP) file that is used when the archive font is created. Characters whose group is not defined by the glyph group specification (XGGP) file are assigned to the group with the name "*". In the following example, glyphs belonging to the "ascii" group and glyphs not belonging to any group are specified.
u32 requireSize = PackedFont::GetRequireBufferSize(brfnt, "ascii,*");
As a special case, all glyphs contained in an archive font are loaded when the empty string is specified in glyphGroups. In the function format where glyphGroups is not passed as an argument, the function proceeds assuming that an empty string was passed to glyphGroups. nw::font::PackedFont::LOAD_GLYPH_ALL, defined as the empty string, can also be explicitly passed.
Pass as the argument either numSheetCache or rateSheetCache to specify the number of expanded sheets to cache.
With numSheetCache, the number of sheets to cache is specified directly.
With rateSheetCache, the number of caches is specified in proportion to the number of loaded sheets. For example, if the number of loaded sheets is 100 and the rateSheetCache is 0.3f, the cache count is 30 (100 * 0.3). The cache count must be an integer to be meaningful. If it is not, it is truncated to an integer, and then the required memory size is calculated.
With either function format, the cache count is clamped between 1 and the number of loaded sheets.
The same size buffer is required to construct a font whether the nw::font::PackedFont::Constructfunction is used or the pair of the nw::font::PackedFont::InitStreamingConstruct function and the nw::font::PackedFont::StreamingConstruct function are used.
CONFIDENTIAL