Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Revert "gpui: Add dynamic padding to prevent glyph clipping in text rendering on macOS (#45957)" (#46906)
Marshall Bowersadf2fec2e0f8
diff --git a/crates/gpui/src/platform/mac/text_system.rs b/crates/gpui/src/platform/mac/text_system.rsindex df0e1433e0e..c72271f24fe 100644--- a/crates/gpui/src/platform/mac/text_system.rs+++ b/crates/gpui/src/platform/mac/text_system.rs@@ -356,22 +356,16 @@ impl MacTextSystemState {fn raster_bounds(&self, params: &RenderGlyphParams) -> Result<Bounds<DevicePixels>> {let font = &self.fonts[params.font_id.0];- let mut bounds: Bounds<DevicePixels> = font+ let scale = Transform2F::from_scale(params.scale_factor);+ Ok(font.raster_bounds(params.glyph_id.0,params.font_size.into(),- Transform2F::from_scale(params.scale_factor),+ scale,HintingOptions::None,font_kit::canvas::RasterizationOptions::GrayscaleAa,)?- .into();-- // Adjust the x position to account for the scale factor to avoid glyph clipped.- let x_offset = DevicePixels(bounds.origin.x.0 / params.scale_factor as i32);- bounds.origin.x -= x_offset;- bounds.size.width += x_offset;-- Ok(bounds)+ .into())}fn rasterize_glyph(