Round paragraph position until we implement subpixel glyph positioning

This commit is contained in:
Héctor Ramón Jiménez 2023-05-08 16:20:05 +02:00
parent 180cb073bd
commit c6d9221ee4
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
2 changed files with 12 additions and 5 deletions

View file

@ -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();