Package imgui
Class ImFontConfig
java.lang.Object
imgui.binding.ImGuiStruct
imgui.binding.ImGuiStructDestroyable
imgui.ImFontConfig
-
Field Summary
Fields inherited from class imgui.binding.ImGuiStruct
ptr -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFontLoaderFlags(int flags) Settings for custom font loader.protected longcreate()shortExplicitly specify unicode codepoint of ellipsis character.byte[]TTF/OTF databooleanTTF/OTF data ownership taken by the container ImFontAtlas (will delete memory itself).intTTF/OTF data sizeintSettings for custom font loader.intIndex of font within TTF/OTF fileshort[]Exclude ranges (list of Unicode range pairs, zero-terminated) from this font source when merging multiple fonts -- useful to avoid one font's glyphs masking another's.floatExtra spacing (in pixels) between glyphs (added to glyph AdvanceX).floatMaximum AdvanceX for glyphsfloatMinimum AdvanceX for glyphs, set Min to align font icons, set both Min/Max to enforce mono-space fontOffset all glyphs from this font input.voidgetGlyphOffset(ImVec2 dst) Offset all glyphs from this font input.floatOffset all glyphs from this font input.floatOffset all glyphs from this font input.short[]Pointer to a user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list).booleanMerge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g.intRasterize at higher quality for sub-pixel positioning.intRasterize at higher quality for sub-pixel positioning.booleanAlign every glyph to pixel boundary.floatDPI scale for rasterization, not altering other font metrics: make it easy to swap between e.g.floatBrighten (>1.0f) or darken (<1.0f) font output.floatSize in pixels for rasterizer (more or less maps to the resulting font height).booleanhasFontLoaderFlags(int flags) Settings for custom font loader.voidremoveFontLoaderFlags(int flags) Settings for custom font loader.voidsetDstFont(ImFont value) voidsetEllipsisChar(short value) Explicitly specify unicode codepoint of ellipsis character.voidsetFontData(byte[] fontData) TTF/OTF datavoidsetFontDataOwnedByAtlas(boolean value) TTF/OTF data ownership taken by the container ImFontAtlas (will delete memory itself).voidsetFontDataSize(int value) TTF/OTF data sizevoidsetFontLoaderFlags(int value) Settings for custom font loader.voidsetFontNo(int value) Index of font within TTF/OTF filevoidsetGlyphExcludeRanges(short[] glyphExcludeRanges) Exclude ranges (list of Unicode range pairs, zero-terminated) from this font source when merging multiple fonts.voidsetGlyphExtraAdvanceX(float value) Extra spacing (in pixels) between glyphs (added to glyph AdvanceX).voidsetGlyphMaxAdvanceX(float value) Maximum AdvanceX for glyphsvoidsetGlyphMinAdvanceX(float value) Minimum AdvanceX for glyphs, set Min to align font icons, set both Min/Max to enforce mono-space fontvoidsetGlyphOffset(float valueX, float valueY) Offset all glyphs from this font input.voidsetGlyphOffset(ImVec2 value) Offset all glyphs from this font input.voidsetGlyphRanges(short[] glyphRanges) Pointer to a user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list).voidsetMergeMode(boolean value) Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g.voidName (strictly to ease debugging)voidsetOversampleH(int value) Rasterize at higher quality for sub-pixel positioning.voidsetOversampleV(int value) Rasterize at higher quality for sub-pixel positioning.voidsetPixelSnapH(boolean value) Align every glyph to pixel boundary.voidsetRasterizerDensity(float value) DPI scale for rasterization, not altering other font metrics: make it easy to swap between e.g.voidsetRasterizerMultiply(float value) Brighten (>1.0f) or darken (<1.0f) font output.voidsetSizePixels(float value) Size in pixels for rasterizer (more or less maps to the resulting font height).Methods inherited from class imgui.binding.ImGuiStructDestroyable
destroyMethods inherited from class imgui.binding.ImGuiStruct
isNotValidPtr, isValidPtr
-
Constructor Details
-
ImFontConfig
public ImFontConfig()
-
-
Method Details
-
create
protected long create()- Specified by:
createin classImGuiStructDestroyable
-
getFontData
public byte[] getFontData()TTF/OTF data -
setFontData
public void setFontData(byte[] fontData) TTF/OTF data -
getFontDataSize
public int getFontDataSize()TTF/OTF data size -
setFontDataSize
public void setFontDataSize(int value) TTF/OTF data size -
getFontDataOwnedByAtlas
public boolean getFontDataOwnedByAtlas()TTF/OTF data ownership taken by the container ImFontAtlas (will delete memory itself). -
setFontDataOwnedByAtlas
public void setFontDataOwnedByAtlas(boolean value) TTF/OTF data ownership taken by the container ImFontAtlas (will delete memory itself). -
getFontNo
public int getFontNo()Index of font within TTF/OTF file -
setFontNo
public void setFontNo(int value) Index of font within TTF/OTF file -
getSizePixels
public float getSizePixels()Size in pixels for rasterizer (more or less maps to the resulting font height). -
setSizePixels
public void setSizePixels(float value) Size in pixels for rasterizer (more or less maps to the resulting font height). -
getOversampleH
public int getOversampleH()Rasterize at higher quality for sub-pixel positioning. Note the difference between 2 and 3 is minimal so you can reduce this to 2 to save memory. Read https://github.com/nothings/stb/blob/master/tests/oversample/README.md for details. -
setOversampleH
public void setOversampleH(int value) Rasterize at higher quality for sub-pixel positioning. Note the difference between 2 and 3 is minimal so you can reduce this to 2 to save memory. Read https://github.com/nothings/stb/blob/master/tests/oversample/README.md for details. -
getOversampleV
public int getOversampleV()Rasterize at higher quality for sub-pixel positioning. This is not really useful as we don't use sub-pixel positions on the Y axis. -
setOversampleV
public void setOversampleV(int value) Rasterize at higher quality for sub-pixel positioning. This is not really useful as we don't use sub-pixel positions on the Y axis. -
getPixelSnapH
public boolean getPixelSnapH()Align every glyph to pixel boundary. Useful e.g. if you are merging a non-pixel aligned font with the default font. If enabled, you can set OversampleH/V to 1. -
setPixelSnapH
public void setPixelSnapH(boolean value) Align every glyph to pixel boundary. Useful e.g. if you are merging a non-pixel aligned font with the default font. If enabled, you can set OversampleH/V to 1. -
getGlyphExtraAdvanceX
public float getGlyphExtraAdvanceX()Extra spacing (in pixels) between glyphs (added to glyph AdvanceX). Since imgui 1.92 this is a scalar X-only value; the previousGlyphExtraSpacingImVec2 was removed as largely obsolete. -
setGlyphExtraAdvanceX
public void setGlyphExtraAdvanceX(float value) Extra spacing (in pixels) between glyphs (added to glyph AdvanceX). Since imgui 1.92 this is a scalar X-only value; the previousGlyphExtraSpacingImVec2 was removed as largely obsolete. -
getGlyphOffset
Offset all glyphs from this font input. -
getGlyphOffsetX
public float getGlyphOffsetX()Offset all glyphs from this font input. -
getGlyphOffsetY
public float getGlyphOffsetY()Offset all glyphs from this font input. -
getGlyphOffset
Offset all glyphs from this font input. -
setGlyphOffset
Offset all glyphs from this font input. -
setGlyphOffset
public void setGlyphOffset(float valueX, float valueY) Offset all glyphs from this font input. -
getGlyphRanges
public short[] getGlyphRanges()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. -
setGlyphRanges
public void setGlyphRanges(short[] 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. -
getGlyphExcludeRanges
public short[] getGlyphExcludeRanges()Exclude ranges (list of Unicode range pairs, zero-terminated) from this font source when merging multiple fonts -- useful to avoid one font's glyphs masking another's. New in imgui 1.92. THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE. -
setGlyphExcludeRanges
public void setGlyphExcludeRanges(short[] glyphExcludeRanges) Exclude ranges (list of Unicode range pairs, zero-terminated) from this font source when merging multiple fonts. New in imgui 1.92. THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE. -
getGlyphMinAdvanceX
public float getGlyphMinAdvanceX()Minimum AdvanceX for glyphs, set Min to align font icons, set both Min/Max to enforce mono-space font -
setGlyphMinAdvanceX
public void setGlyphMinAdvanceX(float value) Minimum AdvanceX for glyphs, set Min to align font icons, set both Min/Max to enforce mono-space font -
getGlyphMaxAdvanceX
public float getGlyphMaxAdvanceX()Maximum AdvanceX for glyphs -
setGlyphMaxAdvanceX
public void setGlyphMaxAdvanceX(float value) Maximum AdvanceX for glyphs -
getMergeMode
public boolean getMergeMode()Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. ASCII font + icons + Japanese glyphs). You may want to use GlyphOffset.y when merge font of different heights. -
setMergeMode
public void setMergeMode(boolean value) Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. ASCII font + icons + Japanese glyphs). You may want to use GlyphOffset.y when merge font of different heights. -
getFontLoaderFlags
public int getFontLoaderFlags()Settings for custom font loader. THIS IS LOADER IMPLEMENTATION DEPENDENT. Leave as zero if unsure. (Renamed fromFontBuilderFlagsin imgui 1.92.) -
setFontLoaderFlags
public void setFontLoaderFlags(int value) Settings for custom font loader. THIS IS LOADER IMPLEMENTATION DEPENDENT. Leave as zero if unsure. (Renamed fromFontBuilderFlagsin imgui 1.92.) -
addFontLoaderFlags
public void addFontLoaderFlags(int flags) Settings for custom font loader. THIS IS LOADER IMPLEMENTATION DEPENDENT. Leave as zero if unsure. (Renamed fromFontBuilderFlagsin imgui 1.92.) -
removeFontLoaderFlags
public void removeFontLoaderFlags(int flags) Settings for custom font loader. THIS IS LOADER IMPLEMENTATION DEPENDENT. Leave as zero if unsure. (Renamed fromFontBuilderFlagsin imgui 1.92.) -
hasFontLoaderFlags
public boolean hasFontLoaderFlags(int flags) Settings for custom font loader. THIS IS LOADER IMPLEMENTATION DEPENDENT. Leave as zero if unsure. (Renamed fromFontBuilderFlagsin imgui 1.92.) -
getRasterizerMultiply
public float getRasterizerMultiply()Brighten (>1.0f) or darken (<1.0f) font output. Brightening small fonts may be a good workaround to make them more readable. -
setRasterizerMultiply
public void setRasterizerMultiply(float value) Brighten (>1.0f) or darken (<1.0f) font output. Brightening small fonts may be a good workaround to make them more readable. -
getRasterizerDensity
public float getRasterizerDensity()DPI scale for rasterization, not altering other font metrics: make it easy to swap between e.g. a 100% and a 400% fonts for a zooming display. IMPORTANT: If you increase this it is expected that you increase font scale accordingly, otherwise quality may look lowered. -
setRasterizerDensity
public void setRasterizerDensity(float value) DPI scale for rasterization, not altering other font metrics: make it easy to swap between e.g. a 100% and a 400% fonts for a zooming display. IMPORTANT: If you increase this it is expected that you increase font scale accordingly, otherwise quality may look lowered. -
getEllipsisChar
public short getEllipsisChar()Explicitly specify unicode codepoint of ellipsis character. When fonts are being merged first specified ellipsis will be used. -
setEllipsisChar
public void setEllipsisChar(short value) Explicitly specify unicode codepoint of ellipsis character. When fonts are being merged first specified ellipsis will be used. -
setName
Name (strictly to ease debugging) -
getDstFont
-
setDstFont
-