nw::font::PackedFont::InitStreamingConstruct Member Function
void InitStreamingConstruct(
ConstructContext * pContext,
void * pBuffer,
u32 bufferSize,
const char * glyphGroups = LOAD_GLYPH_ALL
);
| Name | Description | |
|---|---|---|
| out | pContext | Pointer to the streaming construct context to be initialized |
| out | pBuffer | Pointer to the buffer associated with this instance. Must be aligned on a 128-byte boundary. |
| in | bufferSize | Size of the buffer pointed to by pBuffer. |
| in | glyphGroups | String specifying the glyph group to load. |
Performs initialization to construct a font by extracting glyph groups successively loaded from the archive font.
For bufferSize, specify the buffer size that can be obtained with the nw::font::PackedFont::GetRequireBufferSizefunction. For pBuffer, specify the pointer to a memory region of that buffer size. When the font is successfully constructed, the memory region pointed to by pBuffer is under the management of this instance. Do not overwrite or release this memory region until the nw::font::PackedFont::Destroy function is called. The cache count specified by the nw::font::PackedFont::GetRequireBufferSize function does not need to be specified here because it can be obtained internally by inverse calculating bufferSize.
See the description for the nw::font::PackedFont::GetRequireBufferSize function for the meaning of the value specified by glyphGroups.
By using the InitStreamingConstruct function and the nw::font::PackedFont::StreamingConstruct function as a pair, you can build a font from a DVD or NAND using only a small read buffer. To construct the font, first use the InitStreamingConstruct function to initialize the streaming construct context, then call the nw::font::PackedFont::StreamingConstruct function each time data is obtained from DVD or NAND.
If the entire archive font can be read into memory, you can use the simpler nw::font::PackedFont::Construct function.
CONFIDENTIAL