mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -04:00
Fix occasional jittery vertical positioning of glyphs
This commit is contained in:
@@ -92,6 +92,9 @@ impl FontImpl {
|
|||||||
// let height_in_pixels = v.ascent - v.descent + v.line_gap;
|
// let height_in_pixels = v.ascent - v.descent + v.line_gap;
|
||||||
// let height_in_points = height_in_pixels / pixels_per_point;
|
// let height_in_points = height_in_pixels / pixels_per_point;
|
||||||
|
|
||||||
|
// Round to closest pixel:
|
||||||
|
let y_offset = (y_offset * pixels_per_point).round() / pixels_per_point;
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
rusttype_font,
|
rusttype_font,
|
||||||
scale_in_pixels,
|
scale_in_pixels,
|
||||||
|
|||||||
Reference in New Issue
Block a user