public final class ImFontConfig extends ImGuiStructDestroyable
ptr
Constructor and Description |
---|
ImFontConfig()
This class will create a native structure.
|
Modifier and Type | Method and Description |
---|---|
protected long |
create() |
short |
getEllipsisChar()
Explicitly specify unicode codepoint of ellipsis character.
|
int |
getFontBuilderFlags()
Settings for custom font builder.
|
byte[] |
getFontData()
TTF/OTF data
|
boolean |
getFontDataOwnedByAtlas()
TTF/OTF data ownership taken by the container ImFontAtlas (will delete memory itself).
|
int |
getFontDataSize()
TTF/OTF data size
|
int |
getFontNo()
Index of font within TTF/OTF file
|
ImVec2 |
getGlyphExtraSpacing()
Extra spacing (in pixels) between glyphs.
|
void |
getGlyphExtraSpacing(ImVec2 dstImVec2)
Extra spacing (in pixels) between glyphs.
|
float |
getGlyphExtraSpacingX()
Extra spacing (in pixels) between glyphs.
|
float |
getGlyphExtraSpacingY()
Extra spacing (in pixels) between glyphs.
|
float |
getGlyphMaxAdvanceX()
Maximum AdvanceX for glyphs
|
float |
getGlyphMinAdvanceX()
Minimum AdvanceX for glyphs, set Min to align font icons, set both Min/Max to enforce mono-space font
|
ImVec2 |
getGlyphOffset()
Offset all glyphs from this font input.
|
void |
getGlyphOffset(ImVec2 dstImVec2)
Offset all glyphs from this font input.
|
float |
getGlyphOffsetX()
Offset all glyphs from this font input.
|
float |
getGlyphOffsetY()
Offset all glyphs from this font input.
|
short[] |
getGlyphRanges()
Pointer to a user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list).
|
boolean |
getMergeMode()
Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g.
|
int |
getOversampleH()
Rasterize at higher quality for sub-pixel positioning.
|
int |
getOversampleV()
Rasterize at higher quality for sub-pixel positioning.
|
boolean |
getPixelSnapH()
Align every glyph to pixel boundary.
|
float |
getRasterizerMultiply()
Brighten (
> 1.0f) or darken (< 1.0f) font output. |
float |
getSizePixels()
Size in pixels for rasterizer (more or less maps to the resulting font height).
|
void |
setEllipsisChar(int ellipsisChar)
Explicitly specify unicode codepoint of ellipsis character.
|
void |
setFontBuilderFlags(int fontBuilderFlags)
Settings for custom font builder.
|
void |
setFontData(byte[] fontData)
TTF/OTF data
|
void |
setFontDataOwnedByAtlas(boolean isFontDataOwnedByAtlas)
TTF/OTF data ownership taken by the container ImFontAtlas (will delete memory itself).
|
void |
setFontDataSize(int fontDataSize)
TTF/OTF data size
|
void |
setFontNo(int fontNo)
Index of font within TTF/OTF file
|
void |
setGlyphExtraSpacing(float x,
float y)
Extra spacing (in pixels) between glyphs.
|
void |
setGlyphMaxAdvanceX(float glyphMaxAdvanceX)
Maximum AdvanceX for glyphs
|
void |
setGlyphMinAdvanceX(float glyphMinAdvanceX)
Minimum AdvanceX for glyphs, set Min to align font icons, set both Min/Max to enforce mono-space font
|
void |
setGlyphOffset(float x,
float y)
Offset all glyphs from this font input.
|
void |
setGlyphRanges(short[] glyphRanges)
Pointer to a user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list).
|
void |
setMergeMode(boolean mergeMode)
Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g.
|
void |
setName(java.lang.String name)
Name (strictly to ease debugging)
|
void |
setOversampleH(int oversampleH)
Rasterize at higher quality for sub-pixel positioning.
|
void |
setOversampleV(int oversampleV)
Rasterize at higher quality for sub-pixel positioning.
|
void |
setPixelSnapH(boolean isPixelSnapH)
Align every glyph to pixel boundary.
|
void |
setRasterizerMultiply(float rasterizerMultiply)
Brighten (
> 1.0f) or darken (< 1.0f) font output. |
void |
setSizePixels(float sizePixels)
Size in pixels for rasterizer (more or less maps to the resulting font height).
|
destroy
isNotValidPtr, isValidPtr
public ImFontConfig()
ImGuiStructDestroyable.destroy()
method to manually free used memory.protected long create()
create
in class ImGuiStructDestroyable
public byte[] getFontData()
public void setFontData(byte[] fontData)
public int getFontDataSize()
public void setFontDataSize(int fontDataSize)
public boolean getFontDataOwnedByAtlas()
public void setFontDataOwnedByAtlas(boolean isFontDataOwnedByAtlas)
BINDING NOTICE: By default binding will set this value to false.
If this is not done, Dear ImGui will try to free memory allocated by JVM to store fonts data while running ImGui.destroyContext()
.
This will result into a native exception, since JVM by itself controls it's own resources.
public int getFontNo()
public void setFontNo(int fontNo)
public float getSizePixels()
public void setSizePixels(float sizePixels)
public int getOversampleH()
public void setOversampleH(int oversampleH)
public int getOversampleV()
public void setOversampleV(int oversampleV)
public boolean getPixelSnapH()
public void setPixelSnapH(boolean isPixelSnapH)
public ImVec2 getGlyphExtraSpacing()
public void getGlyphExtraSpacing(ImVec2 dstImVec2)
public float getGlyphExtraSpacingX()
public float getGlyphExtraSpacingY()
public void setGlyphExtraSpacing(float x, float y)
public ImVec2 getGlyphOffset()
public void getGlyphOffset(ImVec2 dstImVec2)
public float getGlyphOffsetX()
public float getGlyphOffsetY()
public void setGlyphOffset(float x, float y)
public short[] getGlyphRanges()
public void setGlyphRanges(short[] glyphRanges)
public float getGlyphMinAdvanceX()
public void setGlyphMinAdvanceX(float glyphMinAdvanceX)
public float getGlyphMaxAdvanceX()
public void setGlyphMaxAdvanceX(float glyphMaxAdvanceX)
public boolean getMergeMode()
public void setMergeMode(boolean mergeMode)
public int getFontBuilderFlags()
public void setFontBuilderFlags(int fontBuilderFlags)
public float getRasterizerMultiply()
>
1.0f) or darken (<
1.0f) font output. Brightening small fonts may be a good workaround to make them more readable.public void setRasterizerMultiply(float rasterizerMultiply)
>
1.0f) or darken (<
1.0f) font output. Brightening small fonts may be a good workaround to make them more readable.public short getEllipsisChar()
public void setEllipsisChar(int ellipsisChar)
public void setName(java.lang.String name)