Skip to content

Commit 44b871f

Browse files
committed
fix float precision bug in text box rendering
1 parent 7d4f6b8 commit 44b871f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/prawn/text/formatted/line_wrap.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def add_fragment_to_line(fragment)
101101
@document.width_of(segment, kerning: @kerning)
102102
end
103103

104-
if @accumulated_width + segment_width <= @width
104+
if @accumulated_width + segment_width <= @width + 0.00001
105105
@accumulated_width += segment_width
106106
shy = soft_hyphen(segment.encoding)
107107
if segment[-1] == shy

0 commit comments

Comments
 (0)