Open Suzuki-Re opened 3 months ago
Kinda related to the topic.
for i = 6, 64, 1 do
im.Attach(ctx, _G['Font_Andale_Mono_' .. i])
end
I guess you load 58 fonts because you want users to choose text font size in the layout editor, right? It's quite excessive and memory hog as cifillion said in the ReaImGui thread. If you want to manipulate font size, then im.DrawList_AddTextEx(draw_list, font, font_size, pos_x, pos_y, col_rgba, text, optional_wrap_widthIn, optional_cpu_fine_clip_rect_xIn, optional_cpu_fine_clip_rect_yIn, optional_cpu_fine_clip_rect_wIn, optional_cpu_fine_clip_rect_hIn) is better than im.Text in my opinion because it lets you to decide font_size, color, wrap etc. Maybe we can even add font option. I thought of replacing MyText(text, font, color, WrapPosX) function with AddTextEx to see if it works well, but I'm not sure about the position part so leave it as it is for now. What do you think?
Changing value font size in the layout editor crashes.