nw::font::PackedFont::StreamingConstruct Member FunctionConstructResult StreamingConstruct( ConstructContext * pContext, const void* stream, u32 streamSize );
| Name | Description | |
|---|---|---|
| out | pContext | Pointer to the streaming construct context initialized with InitStreamingConstruct(). |
| in | stream | Pointer to the buffer storing a portion of the archive font. |
| in | streamSize | Number of bytes of data stored in the buffer pointed to by |
Constructs a font from successive loads from the archive font.
In stream, specify a pointer to a portion of the archive font loaded into memory; in streamSize, specify the portion's size. As long as the portions of the specified archive font are in order from the start, there are no restrictions on size or cycles.
By using the nw::font::PackedFont::InitStreamingConstruct function and the 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 initialize the streaming construct context with the nw::font::PackedFont::InitStreamingConstruct function, then call the 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.
ConstructResult, the type for the return value, is defined as follows.
enum ConstructResult
{
CONSTRUCT_MORE_DATA, // Subsequent data is required to construct the font.
CONSTRUCT_FINISH, // The construct process completed normally.
CONSTRUCT_ERROR, // An error was generated during the construct process.
CONSTRUCT_CONTINUE, // Used internally. This is never used as a return value.
NUM_OF_CONSTRUCT_RESULT
};
CONFIDENTIAL