Truncate Y coordinate in LayoutGlyph::physical

This commit is contained in:
Héctor Ramón Jiménez 2023-06-20 06:39:06 +02:00
parent eb09cf0259
commit c3cd24dc97
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
2 changed files with 2 additions and 2 deletions

View file

@ -23,7 +23,7 @@ impl CacheKey {
pos: (f32, f32),
) -> (Self, i32, i32) {
let (x, x_bin) = SubpixelBin::new(pos.0);
let (y, y_bin) = SubpixelBin::new(pos.1.trunc());
let (y, y_bin) = SubpixelBin::new(pos.1);
(
Self {
font_id,

View file

@ -72,7 +72,7 @@ impl LayoutGlyph {
self.font_size * scale,
(
(self.x + x_offset) * scale + offset.0,
(self.y - y_offset) * scale + offset.1,
((self.y - y_offset) * scale + offset.1).trunc(), // Hinting in Y axis
),
);