mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-25 14:05:41 -05:00
Fix render issues on macOS (#845)
Parts of neighboring glyphs in the atlas were being rendered incorrectly. The issue is resolved by aligning cells to the pixel grid. This behavior was achieved previously by first applying integer truncation before casting to a float. Fixes #844.
This commit is contained in:
parent
d3151dfbf9
commit
5ac42bb13b
1 changed files with 2 additions and 2 deletions
|
@ -247,8 +247,8 @@ impl Display {
|
|||
});
|
||||
|
||||
let metrics = cache.font_metrics();
|
||||
self.size_info.cell_width = (metrics.average_advance + config.font().offset().x as f64) as f32;
|
||||
self.size_info.cell_height = (metrics.line_height + config.font().offset().y as f64) as f32;
|
||||
self.size_info.cell_width = ((metrics.average_advance + config.font().offset().x as f64) as f32).floor();
|
||||
self.size_info.cell_height = ((metrics.line_height + config.font().offset().y as f64) as f32).floor();
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
Loading…
Reference in a new issue