public final class ImFont extends ImGuiStructDestroyable
ptr
Modifier and Type | Method and Description |
---|---|
ImVec2 |
calcTextSizeA(float size,
float maxWidth,
float wrapWidth,
java.lang.String text) |
void |
calcTextSizeA(ImVec2 dstImVec2,
float size,
float maxWidth,
float wrapWidth,
java.lang.String text)
'max_width' stops rendering after a certain width (could be turned into a 2d size).
|
float |
calcTextSizeAX(float size,
float maxWidth,
float wrapWidth,
java.lang.String text)
'max_width' stops rendering after a certain width (could be turned into a 2d size).
|
float |
calcTextSizeAY(float size,
float maxWidth,
float wrapWidth,
java.lang.String text)
'max_width' stops rendering after a certain width (could be turned into a 2d size).
|
java.lang.String |
calcWordWrapPositionA(float scale,
java.lang.String text,
java.lang.String textEnd,
float wrapWidth) |
protected long |
create() |
ImFontGlyph |
findGlyph(int c) |
ImFontGlyph |
findGlyphNoFallback(int c) |
float |
getAscent()
Ascent: distance from top to bottom of e.g.
|
float |
getCharAdvance(int c) |
short |
getConfigDataCount()
Number of ImFontConfig involved in creating this font.
|
java.lang.String |
getDebugName() |
float |
getDescent()
Ascent: distance from top to bottom of e.g.
|
boolean |
getDirtyLookupTables() |
short |
getDotChar()
Character used for ellipsis rendering (if a single '...' character isn't found)
|
short |
getEllipsisChar()
Character used for ellipsis rendering.
|
float |
getFallbackAdvanceX()
= FallbackGlyph.AdvanceX
|
short |
getFallbackChar()
Replacement character if a glyph isn't found.
|
ImFontGlyph |
getFallbackGlyph()
= FindGlyph(FontFallbackChar)
|
float |
getFontSize()
Height of characters/line, set during loading (don't change after loading)
|
int |
getMetricsTotalSurface()
Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs)
|
float |
getScale()
Base font scale, multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
|
boolean |
isLoaded() |
void |
renderChar(ImDrawList drawList,
float size,
float posX,
float posY,
int col,
int c) |
void |
renderText(ImDrawList drawList,
float size,
float posX,
float posY,
int col,
float clipRectX,
float clipRectY,
float clipRectW,
float clipRectZ,
java.lang.String text,
java.lang.String textEnd) |
void |
renderText(ImDrawList drawList,
float size,
float posX,
float posY,
int col,
float clipRectX,
float clipRectY,
float clipRectW,
float clipRectZ,
java.lang.String text,
java.lang.String textEnd,
float wrapWidth) |
void |
renderText(ImDrawList drawList,
float size,
float posX,
float posY,
int col,
float clipRectX,
float clipRectY,
float clipRectW,
float clipRectZ,
java.lang.String text,
java.lang.String textEnd,
float wrapWidth,
boolean cpuFineClip) |
void |
setAscent(float ascent)
Ascent: distance from top to bottom of e.g.
|
void |
setDescent(float descent)
Ascent: distance from top to bottom of e.g.
|
void |
setDirtyLookupTables(boolean dirtyLookupTables) |
void |
setDotChar(int dotChar)
Character used for ellipsis rendering (if a single '...' character isn't found)
|
void |
setEllipsisChar(int ellipsisChar)
Character used for ellipsis rendering.
|
void |
setFallbackAdvanceX(float fallbackAdvanceX)
= FallbackGlyph.AdvanceX
|
void |
setMetricsTotalSurface(int metricsTotalSurface)
Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs)
|
void |
setScale(float scale)
Base font scale, multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
|
destroy
isNotValidPtr, isValidPtr
protected long create()
create
in class ImGuiStructDestroyable
public float getFallbackAdvanceX()
public void setFallbackAdvanceX(float fallbackAdvanceX)
public float getFontSize()
public ImFontGlyph getFallbackGlyph()
public short getConfigDataCount()
public short getFallbackChar()
public short getEllipsisChar()
public void setEllipsisChar(int ellipsisChar)
public short getDotChar()
public void setDotChar(int dotChar)
public boolean getDirtyLookupTables()
public void setDirtyLookupTables(boolean dirtyLookupTables)
public float getScale()
public void setScale(float scale)
public float getAscent()
public void setAscent(float ascent)
public float getDescent()
public void setDescent(float descent)
public int getMetricsTotalSurface()
public void setMetricsTotalSurface(int metricsTotalSurface)
public ImFontGlyph findGlyph(int c)
public ImFontGlyph findGlyphNoFallback(int c)
public float getCharAdvance(int c)
public boolean isLoaded()
public java.lang.String getDebugName()
public ImVec2 calcTextSizeA(float size, float maxWidth, float wrapWidth, java.lang.String text)
public void calcTextSizeA(ImVec2 dstImVec2, float size, float maxWidth, float wrapWidth, java.lang.String text)
public float calcTextSizeAX(float size, float maxWidth, float wrapWidth, java.lang.String text)
public float calcTextSizeAY(float size, float maxWidth, float wrapWidth, java.lang.String text)
public java.lang.String calcWordWrapPositionA(float scale, java.lang.String text, java.lang.String textEnd, float wrapWidth)
public void renderChar(ImDrawList drawList, float size, float posX, float posY, int col, int c)
public void renderText(ImDrawList drawList, float size, float posX, float posY, int col, float clipRectX, float clipRectY, float clipRectW, float clipRectZ, java.lang.String text, java.lang.String textEnd)
public void renderText(ImDrawList drawList, float size, float posX, float posY, int col, float clipRectX, float clipRectY, float clipRectW, float clipRectZ, java.lang.String text, java.lang.String textEnd, float wrapWidth)
public void renderText(ImDrawList drawList, float size, float posX, float posY, int col, float clipRectX, float clipRectY, float clipRectW, float clipRectZ, java.lang.String text, java.lang.String textEnd, float wrapWidth, boolean cpuFineClip)