nw::font::PackedFont::LockSheet Member Function
bool LockSheet(
CharCode c
);
| Name | Description | |
|---|---|---|
| in | c | Character code indicating the glyph included on the sheet to be locked. |
Prevents sheets in cache from being discarded.
With the PackedFont class, sheets are maintained in a compressed state and expanded and cached as needed by functions such as the nw::font::PackedFont::GetGlyph function. When there is insufficient cache available, the cache last used is discarded to free up cache.
By using this function, a sheet can be excluded from the discard targets even when cache becomes insufficient. Performance may be improved by locking sheets that contain characters that are used frequently, such as ASCII characters or Japanese hiragana.
The maximum number of sheets that can be locked is (number of caches - 1).
nw::font::PackedFont::GetNumCache
nw::font::PackedFont::UnlockSheet
nw::font::PackedFont::UnlockSheetAll
CONFIDENTIAL