public final class ImFontConfig
extends java.lang.Object
Constructor and Description |
---|
ImFontConfig()
This class will create a native structure.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
short |
getEllipsisChar()
Explicitly specify unicode codepoint of ellipsis character.
|
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
|
void |
getGlyphExtraSpacing(ImVec2 dstImVec2)
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
|
void |
getGlyphOffset(ImVec2 dstImVec2)
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.
|
int |
getRasterizerFlags()
Settings for custom font rasterizer (e.g.
|
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(short ellipsisChar)
Explicitly specify unicode codepoint of ellipsis character.
|
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 |
setRasterizerFlags(int rasterizerFlags)
Settings for custom font rasterizer (e.g.
|
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).
|
public ImFontConfig()
destroy()
method to manually free used memory.public void destroy()
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 void getGlyphExtraSpacing(ImVec2 dstImVec2)
public void setGlyphExtraSpacing(float x, float y)
public void getGlyphOffset(ImVec2 dstImVec2)
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 getRasterizerFlags()
public void setRasterizerFlags(int rasterizerFlags)
public float getRasterizerMultiply()
public void setRasterizerMultiply(float rasterizerMultiply)
public short getEllipsisChar()
public void setEllipsisChar(short ellipsisChar)
public void setName(java.lang.String name)