nw::font::PackedFont::PreloadSheet Member Function

Syntax

bool PreloadSheet(
     CharCode c
);

Arguments

Name Description
in c Character code indicating the glyph included on the sheet to be loaded.

Return Values

Returns TRUE if the sheet was newly cached by this function; returns FALSE if it had already been cached.

Description

Loads a sheet into cache in advance.

Loads the sheet containing the glyph specified with c into cache. Normally, this function does not need to be called because the sheet required for the glyph is cached by the nw::font::PackedFont::GetGlyphfunction. However, because it takes time to expand a sheet, it may be possible to reduce the load at rendering time by using this function to cache the sheet in advance.
There is a caveat, though: You must pay attention to the number of caches, which can be obtained with the nw::font::PackedFont::GetNumCache function. The reason is that even if you attempt to cache in advance more than the number of caches, the sheets that were first cached will be discarded.

In general, when there are insufficient caches, the very last cache to have been used is destroyed. When this function is called, the cache it touches is considered to have been used even if this function returns FALSE, indicating that the sheet was already cached.

See Also

nw::font::PackedFont::GetNumCache

Revision History

2009/11/09
Initial version.

CONFIDENTIAL