nw::font::ArchiveFont::GetRequireBufferSize Member Functionstatic u32 GetRequireBufferSize( const void * bfnt, const char * glyphGroups = LOAD_GLYPH_ALL );
| Name | Description | |
|---|---|---|
| in | bfnt | Pointer to the header portion of the font resource. |
| in | glyphGroups | String specifying the glyph group to load. |
Construct function or the InitStreamingConstruct function. bfnt. Calculates the buffer size required to construct the font.
The brfnt argument specifies a pointer to the header portion of the archive font loaded into memory. At least an amount equal to ArchiveFont::HEADER_SIZE (=16KB) 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 = ArchiveFont::GetRequireBufferSize(brfnt, "ascii");
To make available the glyphs belonging to the "ascii", "european", and "jis0" groups, specify as follows:
u32 requireSize = ArchiveFont::GetRequireBufferSize(brfnt, "ascii,european,jis0");
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 = ArchiveFont::GetRequireBufferSize(brfnt, "ascii,*");
As a special case, all glyphs contained in an archive font are loaded when the empty string is specified in glyphGroups. Because nw4r::ut::ArchiveFont::LOAD_GLYPH_ALL, the default argument for glyphGroups, is the empty string, all glyphs are loaded by default.
The same size buffer is required to construct a font whether the Construct function is used or the pair of the nw::font::ArchiveFont::InitStreamingConstruct function and the nw::font::ArchiveFont::StreamingConstruct function are used.
nw::font::Font::Font
nw::font::ArchiveFont::InitStreamingConstruct
nw::font::ArchiveFont::StreamingConstruct
nw::font::ArchiveFont::Construct
CONFIDENTIAL