mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-26 13:37:00 +00:00
ImFontConfig: Clarified persistence requirement of GlyphRanges array (#651)
This commit is contained in:
parent
ed20fcf9d5
commit
2f55dc1f33
3
imgui.h
3
imgui.h
@ -1254,7 +1254,7 @@ struct ImFontConfig
|
||||
int OversampleH, OversampleV; // 3, 1 // Rasterize at higher quality for sub-pixel positioning. We don't use sub-pixel positions on the Y axis.
|
||||
bool PixelSnapH; // false // Align every character to pixel boundary (if enabled, set OversampleH/V to 1)
|
||||
ImVec2 GlyphExtraSpacing; // 0, 0 // Extra spacing (in pixels) between glyphs
|
||||
const ImWchar* GlyphRanges; // // List of Unicode range (2 value per range, values are inclusive, zero-terminated list)
|
||||
const ImWchar* GlyphRanges; // // Pointer to a user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list). THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE.
|
||||
bool MergeMode; // false // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. ASCII font + icons + Japanese glyphs).
|
||||
bool MergeGlyphCenterV; // false // When merging (multiple ImFontInput for one ImFont), vertically center new glyphs instead of aligning their baseline
|
||||
|
||||
@ -1273,6 +1273,7 @@ struct ImFontConfig
|
||||
// 3. Upload the pixels data into a texture within your graphics system.
|
||||
// 4. Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture. This value will be passed back to you during rendering to identify the texture.
|
||||
// 5. Call ClearTexData() to free textures memory on the heap.
|
||||
// NB: If you use a 'glyph_ranges' array you need to make sure that your array persist up until the ImFont is cleared. We only copy the pointer, not the data.
|
||||
struct ImFontAtlas
|
||||
{
|
||||
IMGUI_API ImFontAtlas();
|
||||
|
Loading…
Reference in New Issue
Block a user