MCPcopy Create free account
hub / github.com/cpichard/usdtweak / MeasureText

Function MeasureText

src/texteditor/TextEditorWidget.cpp:74–78  ·  view source on GitHub ↗

Unrounded text measurement. ImGui::CalcTextSize CEILS the width to whole pixels (imgui.cpp "Round" block) — accumulating it per token makes the rendered glyph positions drift right of the measured caret/selection positions by ~1px per token. ImFont::CalcTextSizeA returns the exact sum of glyph advances, identical to what AddText renders.

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

LineWidthToFunction · 0.85
DrawTextEditorViewFunction · 0.85

Calls 1

CalcTextSizeAMethod · 0.80

Tested by

no test coverage detected