Skip to content

Commit

Permalink
Fixing text metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
ecton committed Dec 1, 2024
1 parent db5a474 commit 1a96d37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
to ensure proper subpixel alignment.
- Plotters integration text drawing now honors anchor positioning, rotation, and
properly sets the line height based.
- `MeasuredText`'s metrics are now more accurate. The wrong value for the
baseline was being used, leading to slightly incorrect measurements.

## v0.11.0 (2024-09-14)

Expand Down
2 changes: 1 addition & 1 deletion src/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ pub(crate) fn map_each_glyph(
blit,
glyph,
(run.line_top / metrics.line_height).round().cast::<usize>(),
relative_to.y,
Px::from(run.line_y),
Px::from(run.line_w.ceil()),
kludgine,
);
Expand Down

0 comments on commit 1a96d37

Please sign in to comment.