Skip to content

Commit 46b8cbf

Browse files
committed
[api] Fix split_text_to_fit measurement for cases when word wrap is enabled and we have only single word.
1 parent 728c6ef commit 46b8cbf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/bl/api/extra/draw/draw.bl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ split_text_to_fit :: fn (text: string_view, font: *Font, fit_to: f32, split_by_w
683683
if num == 0 { return "", text; }
684684
if num == text.len { return text, ""; }
685685

686-
return slice_range(text, 0, num), slice_range(text, num+1, text.len);
686+
return slice_range(text, 0, num), slice_range(text, num, text.len);
687687
}
688688

689689
set_scissor :: fn (position_x: f32, position_y: f32, width: f32, height: f32) {

0 commit comments

Comments
 (0)