Skip to content

Commit fb92047

Browse files
committed
Correct measurement of space
1 parent 0bba57b commit fb92047

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

richtext/richtext.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function M.create(text, font, settings)
7575

7676
-- measure width of a single space for current font
7777
if not space_widths[font] then
78-
space_widths[font] = gui.get_text_metrics(font, "_").width
78+
space_widths[font] = gui.get_text_metrics(font, " _").width - gui.get_text_metrics(font, "_").width
7979
end
8080

8181
-- get metrics of node

0 commit comments

Comments
 (0)