From 4dc1b1e179a52030b12efb4103435038669ff877 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 25 Mar 2021 15:10:21 +0100 Subject: [PATCH] Fix `test_render_glyph` (but still leave it commented out for now) --- gpui/src/platform/mac/fonts.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gpui/src/platform/mac/fonts.rs b/gpui/src/platform/mac/fonts.rs index 80f005f3ba..bcf52f088e 100644 --- a/gpui/src/platform/mac/fonts.rs +++ b/gpui/src/platform/mac/fonts.rs @@ -350,10 +350,11 @@ mod tests { // let font_id = fonts.select_font(&font_ids, &Default::default()).unwrap(); // let glyph_id = fonts.glyph_for_char(font_id, 'G').unwrap(); - // for i in 0..2 { - // let variant = 0.5 * i as f32; + // const VARIANTS: usize = 1; + // for i in 0..VARIANTS { + // let variant = i as f32 / VARIANTS as f32; // let (bounds, bytes) = fonts - // .rasterize_glyph(font_id, 16.0, glyph_id, variant, 2.) + // .rasterize_glyph(font_id, 16.0, glyph_id, vec2f(variant, variant), 2.) // .unwrap(); // let name = format!("/Users/as-cii/Desktop/twog-{}.png", i);