From c6d9221ee42b2838ca07b79df710d3d224e1c52a Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 8 May 2023 16:20:05 +0200 Subject: Round paragraph position until we implement subpixel glyph positioning --- wgpu/src/text.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'wgpu/src/text.rs') diff --git a/wgpu/src/text.rs b/wgpu/src/text.rs index ff68772d..cf9fbad3 100644 --- a/wgpu/src/text.rs +++ b/wgpu/src/text.rs @@ -133,10 +133,14 @@ impl Pipeline { alignment::Vertical::Bottom => y - total_height, }; + // TODO: Subpixel glyph positioning + let left = left.round() as i32; + let top = top.round() as i32; + glyphon::TextArea { buffer, - left: left as i32, - top: top as i32, + left, + top, bounds, default_color: { let [r, g, b, a] = section.color.into_linear(); -- cgit