ImFontAtlas
Static Members
| Name | Type |
|---|---|
self |
cpp.Star |
fontCfg |
cpp.Star |
| Returns |
|---|
| cpp.Star |
Selects between AddFontDefaultVector() and AddFontDefaultBitmap().
| Name | Type | Default |
|---|---|---|
self |
cpp.Star | |
fontCfg |
cpp.Star | null |
| Returns |
|---|
| cpp.Star |
Embedded scalable font. Recommended at any higher size.
| Name | Type | Default |
|---|---|---|
self |
cpp.Star | |
fontCfg |
cpp.Star | null |
| Returns |
|---|
| cpp.Star |
Embedded classic pixel-clean font. Recommended at Size 13px with no scaling.
| Name | Type | Default |
|---|---|---|
self |
cpp.Star | |
fontCfg |
cpp.Star | null |
| Returns |
|---|
| cpp.Star |
addFontFromFileTTF(self: cpp.Star, filename: cpp.ConstCharStar, ?sizePixels: cpp.Float32 = 0.0, ?fontCfg: cpp.Star = null, ?glyphRanges: cpp.Star = null): cpp.Star| Name | Type | Default |
|---|---|---|
self |
cpp.Star | |
filename |
cpp.ConstCharStar | |
sizePixels |
cpp.Float32 | 0.0 |
fontCfg |
cpp.Star | null |
glyphRanges |
cpp.Star | null |
| Returns |
|---|
| cpp.Star |
addFontFromMemoryTTF(self: cpp.Star, fontData: cpp.RawPointer<cpp.Void>, fontDataSize: Int, ?sizePixels: cpp.Float32 = 0.0, ?fontCfg: cpp.Star = null, ?glyphRanges: cpp.Star = null): cpp.StarNote: Transfer ownership of 'ttf_data' to ImFontAtlas! Will be deleted after destruction of the atlas. Set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed.
| Name | Type | Default |
|---|---|---|
self |
cpp.Star | |
fontData |
cpp.RawPointer<cpp.Void> | |
fontDataSize |
Int | |
sizePixels |
cpp.Float32 | 0.0 |
fontCfg |
cpp.Star | null |
glyphRanges |
cpp.Star | null |
| Returns |
|---|
| cpp.Star |
addFontFromMemoryCompressedTTF(self: cpp.Star, compressedFontData: cpp.RawPointer<cpp.Void>, compressedFontDataSize: Int, ?sizePixels: cpp.Float32 = 0.0, ?fontCfg: cpp.Star = null, ?glyphRanges: cpp.Star = null): cpp.Star'compressed_font_data' still owned by caller. Compress with binary_to_compressed_c.cpp.
| Name | Type | Default |
|---|---|---|
self |
cpp.Star | |
compressedFontData |
cpp.RawPointer<cpp.Void> | |
compressedFontDataSize |
Int | |
sizePixels |
cpp.Float32 | 0.0 |
fontCfg |
cpp.Star | null |
glyphRanges |
cpp.Star | null |
| Returns |
|---|
| cpp.Star |
addFontFromMemoryCompressedBase85TTF(self: cpp.Star, compressedFontDataBase85: cpp.ConstCharStar, ?sizePixels: cpp.Float32 = 0.0, ?fontCfg: cpp.Star = null, ?glyphRanges: cpp.Star = null): cpp.Star'compressed_font_data_base85' still owned by caller. Compress with binary_to_compressed_c.cpp with -base85 parameter.
| Name | Type | Default |
|---|---|---|
self |
cpp.Star | |
compressedFontDataBase85 |
cpp.ConstCharStar | |
sizePixels |
cpp.Float32 | 0.0 |
fontCfg |
cpp.Star | null |
glyphRanges |
cpp.Star | null |
| Returns |
|---|
| cpp.Star |
| Name | Type |
|---|---|
self |
cpp.Star |
font |
cpp.Star |
Clear everything (fonts + textures). Don't call mid-frame!
| Name | Type |
|---|---|
self |
cpp.Star |
Clear input+output font data/glyphs. You can call this mid-frame if you load new fonts afterwards!
| Name | Type |
|---|---|
self |
cpp.Star |
Compact cached glyphs and texture.
| Name | Type |
|---|---|
self |
cpp.Star |
Change font loader at runtime.
| Name | Type |
|---|---|
self |
cpp.Star |
fontLoader |
cpp.Star |
[OBSOLETE] Clear input data (all ImFontConfig structures including sizes, TTF data, glyph ranges, etc.) = all the data used to build the texture and fonts.
| Name | Type |
|---|---|
self |
cpp.Star |
[OBSOLETE] Clear CPU-side copy of the texture data. Saves RAM once the texture has been copied to graphics memory.
| Name | Type |
|---|---|
self |
cpp.Star |
Basic Latin, Extended Latin
| Name | Type |
|---|---|
self |
cpp.Star |
| Returns |
|---|
| cpp.Star |
Register a rectangle. Return -1 (ImFontAtlasRectId_Invalid) on error.
| Name | Type | Default |
|---|---|---|
self |
cpp.Star | |
width |
Int | |
height |
Int | |
outR |
cpp.Star | null |
| Returns |
|---|
| Int |
Unregister a rectangle. Existing pixels will stay in texture until resized / garbage collected.
| Name | Type |
|---|---|
self |
cpp.Star |
id |
Int |
Get rectangle coordinates for current texture. Valid immediately, never store this (read above)!
| Name | Type |
|---|---|
self |
cpp.Star |
id |
Int |
outR |
cpp.Star |
| Returns |
|---|
| Bool |
Instance Members
flags: IntBuild flags (see ImFontAtlasFlags_)
texDesiredFormat: ImTextureFormatDesired texture format (default to ImTextureFormat_RGBA32 but may be changed to ImTextureFormat_Alpha8).
texGlyphPadding: IntFIXME: Should be called "TexPackPadding". Padding between glyphs within texture in pixels. Defaults to 1. If your rendering method doesn't rely on bilinear filtering you may set this to 0 (will also need to set AntiAliasedLinesUseTex = false).
texMinWidth: IntMinimum desired texture width. Must be a power of two. Default to 512.
texMinHeight: IntMinimum desired texture height. Must be a power of two. Default to 128.
texMaxWidth: IntMaximum desired texture width. Must be a power of two. Default to 8192.
texMaxHeight: IntMaximum desired texture height. Must be a power of two. Default to 8192.
userData: cpp.RawPointer<cpp.Void>Store your own atlas related user-data (if e.g. you have multiple font atlas).
texRef: ImTextureRefLatest texture identifier == TexData->GetTexRef().
texData: cpp.StarLatest texture.
Metadata
| Name | Parameters |
|---|---|
:structAccess |
- |
:include |
"linc_imgui.h" |