Skip to content

Instantly share code, notes, and snippets.

@euclio
Created January 22, 2020 15:19
Show Gist options
  • Save euclio/79c7d5a08d62e572924b0ebd157b12e3 to your computer and use it in GitHub Desktop.
Save euclio/79c7d5a08d62e572924b0ebd157b12e3 to your computer and use it in GitHub Desktop.
Patch to disable anti-aliasing in alacritty on MacOS
diff --git a/font/src/darwin/mod.rs b/font/src/darwin/mod.rs
index b9266a8..551f5e5 100644
--- a/font/src/darwin/mod.rs
+++ b/font/src/darwin/mod.rs
@@ -501,14 +501,14 @@ impl Font {
cg_context.set_font_smoothing_style(16);
}
- cg_context.set_allows_font_smoothing(true);
- cg_context.set_should_smooth_fonts(true);
- cg_context.set_allows_font_subpixel_quantization(true);
- cg_context.set_should_subpixel_quantize_fonts(true);
- cg_context.set_allows_font_subpixel_positioning(true);
- cg_context.set_should_subpixel_position_fonts(true);
- cg_context.set_allows_antialiasing(true);
- cg_context.set_should_antialias(true);
+ cg_context.set_allows_font_smoothing(false);
+ cg_context.set_should_smooth_fonts(false);
+ cg_context.set_allows_font_subpixel_quantization(false);
+ cg_context.set_should_subpixel_quantize_fonts(false);
+ cg_context.set_allows_font_subpixel_positioning(false);
+ cg_context.set_should_subpixel_position_fonts(false);
+ cg_context.set_allows_antialiasing(false);
+ cg_context.set_should_antialias(false);
// Set fill color to white for drawing the glyph
cg_context.set_rgb_fill_color(1.0, 1.0, 1.0, 1.0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment