Skip to content

Commit

Permalink
add x_Shift
Browse files Browse the repository at this point in the history
  • Loading branch information
cospectrum committed Oct 19, 2024
1 parent 3d4b962 commit 62d5737
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/drawing/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ mod proptests {
font.as_scaled(scale).h_side_bearing(font.glyph_id(first_char));
if first_x_bearing < 0.0 {
let x_shift = first_x_bearing.abs().ceil() as i32;
Rect::at(x - x_shift, y).of_size(text_w, text_h)
Rect::at(x - x_shift, y).of_size(text_w + x_shift as u32, text_h)
} else {
Rect::at(x, y).of_size(text_w, text_h)
}
Expand Down

0 comments on commit 62d5737

Please sign in to comment.