struct ImGui::ImFontConfig

Overview

struct ImFontConfig

Included Modules

Defined in:

obj.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new : ImFontConfig #

[View source]

Instance Method Detail

def dst_font : ImFont #

[View source]
def dst_font=(dst_font : ImFont) #

[View source]
def ellipsis_char : ImWchar #

-1 Explicitly specify unicode codepoint of ellipsis character. When fonts are being merged first specified ellipsis will be used.


[View source]
def ellipsis_char=(ellipsis_char : ImWchar) #

[View source]
def font_builder_flags : UInt32 #

0 Settings for custom font builder. THIS IS BUILDER IMPLEMENTATION DEPENDENT. Leave as zero if unsure.


[View source]
def font_builder_flags=(font_builder_flags : UInt32) #

[View source]
def font_data : Pointer(Void) #

TTF/OTF data


[View source]
def font_data=(font_data : Pointer(Void)) #

[View source]
def font_data_owned_by_atlas : Bool #

true TTF/OTF data ownership taken by the container ImFontAtlas (will delete memory itself).


[View source]
def font_data_owned_by_atlas=(font_data_owned_by_atlas : Bool) #

[View source]
def font_data_size : Int32 #

TTF/OTF data size


[View source]
def font_data_size=(font_data_size : Int32) #

[View source]
def font_no : Int32 #

0 Index of font within TTF/OTF file


[View source]
def font_no=(font_no : Int32) #

[View source]
def glyph_extra_spacing : ImVec2 #

0, 0 Extra spacing (in pixels) between glyphs. Only X axis is supported for now.


[View source]
def glyph_extra_spacing=(glyph_extra_spacing : ImVec2) #

[View source]
def glyph_max_advance_x : Float32 #

FLT_MAX Maximum AdvanceX for glyphs


[View source]
def glyph_max_advance_x=(glyph_max_advance_x : Float32) #

[View source]
def glyph_min_advance_x : Float32 #

0 Minimum AdvanceX for glyphs, set Min to align font icons, set both Min/Max to enforce mono-space font


[View source]
def glyph_min_advance_x=(glyph_min_advance_x : Float32) #

[View source]
def glyph_offset : ImVec2 #

0, 0 Offset all glyphs from this font input.


[View source]
def glyph_offset=(glyph_offset : ImVec2) #

[View source]
def glyph_ranges : Pointer(ImWchar) #

NULL THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE. Pointer to a user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list).


[View source]
def glyph_ranges=(glyph_ranges : Pointer(ImWchar)) #

[View source]
def merge_mode : Bool #

false 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.


[View source]
def merge_mode=(merge_mode : Bool) #

[View source]
def name : Slice(LibC::Char) #

Name (strictly to ease debugging)


[View source]
def name=(name : Slice(LibC::Char)) #

[View source]
def oversample_h : Int32 #

2 Rasterize at higher quality for sub-pixel positioning. Note the difference between 2 and 3 is minimal. You can reduce this to 1 for large glyphs save memory. Read https://github.com/nothings/stb/blob/master/tests/oversample/README.md for details.


[View source]
def oversample_h=(oversample_h : Int32) #

[View source]
def oversample_v : Int32 #

1 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.


[View source]
def oversample_v=(oversample_v : Int32) #

[View source]
def pixel_snap_h : Bool #

false 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.


[View source]
def pixel_snap_h=(pixel_snap_h : Bool) #

[View source]
def rasterizer_multiply : Float32 #

1.0f Brighten (>1.0f) or darken (<1.0f) font output. Brightening small fonts may be a good workaround to make them more readable.


[View source]
def rasterizer_multiply=(rasterizer_multiply : Float32) #

[View source]
def size_pixels : Float32 #

Size in pixels for rasterizer (more or less maps to the resulting font height).


[View source]
def size_pixels=(size_pixels : Float32) #

[View source]
def to_unsafe : Pointer(T) #

[View source]