Round up font size to account for draw_image_rect not doing subpixel copying (#454)

macos-click-through
Lachlan Easton 4 years ago committed by GitHub
parent 68582e0551
commit 80f5dcee42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -62,7 +62,9 @@ impl Renderer {
let mut paint = Paint::new(colors::WHITE, None); let mut paint = Paint::new(colors::WHITE, None);
paint.set_anti_alias(false); paint.set_anti_alias(false);
let mut shaper = CachingShaper::new(); let mut shaper = CachingShaper::new();
let (font_width, font_height) = shaper.font_base_dimensions(); let (font_width_raw, font_height_raw) = shaper.font_base_dimensions();
let font_width = font_width_raw;
let font_height = font_height_raw.ceil();
let default_style = Arc::new(Style::new(Colors::new( let default_style = Arc::new(Style::new(Colors::new(
Some(colors::WHITE), Some(colors::WHITE),
Some(colors::BLACK), Some(colors::BLACK),

Loading…
Cancel
Save