MCPcopy Create free account
hub / github.com/crosire/reshade / calc_text_size

Function calc_text_size

source/imgui_code_editor.cpp:92–95  ·  view source on GitHub ↗

'ImGui::CalcTextSize' cancels out character spacing at the end, but we do not want that, hence the custom function

Source from the content-addressed store, hash-verified

90
91// 'ImGui::CalcTextSize' cancels out character spacing at the end, but we do not want that, hence the custom function
92static ImVec2 calc_text_size(const char *text, const char *text_end = nullptr)
93{
94 return ImGui::GetFont()->CalcTextSizeA(ImGui::GetFontSize(), FLT_MAX, -1.0f, text, text_end, nullptr);
95}
96
97reshade::imgui::code_editor::code_editor()
98{

Callers 1

renderMethod · 0.85

Calls 2

GetFontFunction · 0.85
GetFontSizeFunction · 0.85

Tested by

no test coverage detected