1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-18 13:55:23 -05:00

Fix font rendering regression on macOS

This fixes a regression introduced in
77f2d6e853.

Fixes #3809.
This commit is contained in:
Jade Michael Thornton 2020-06-04 15:24:09 -05:00 committed by GitHub
parent e6475c6753
commit 1e32e5a515
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -45,6 +45,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Paste from some apps on Wayland - Paste from some apps on Wayland
- Slow startup with Nvidia binary drivers on some X11 systems - Slow startup with Nvidia binary drivers on some X11 systems
- Display not scrolling when printing new lines while scrolled in history - Display not scrolling when printing new lines while scrolled in history
- Regression in font rendering on macOS
## 0.4.3 ## 0.4.3

View file

@ -515,8 +515,12 @@ impl Font {
kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host, kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host,
); );
let is_colored = self.is_colored();
// Set background color for graphics context. // Set background color for graphics context.
cg_context.set_rgb_fill_color(0.0, 0.0, 0.0, 0.0); let bg_a = if is_colored { 0.0 } else { 1.0 };
cg_context.set_rgb_fill_color(0.0, 0.0, 0.0, bg_a);
let context_rect = CGRect::new( let context_rect = CGRect::new(
&CGPoint::new(0.0, 0.0), &CGPoint::new(0.0, 0.0),
&CGSize::new(f64::from(rasterized_width), f64::from(rasterized_height)), &CGSize::new(f64::from(rasterized_width), f64::from(rasterized_height)),
@ -550,7 +554,7 @@ impl Font {
let rasterized_pixels = cg_context.data().to_vec(); let rasterized_pixels = cg_context.data().to_vec();
let buf = if self.is_colored() { let buf = if is_colored {
BitmapBuffer::RGBA(byte_order::extract_rgba(&rasterized_pixels)) BitmapBuffer::RGBA(byte_order::extract_rgba(&rasterized_pixels))
} else { } else {
BitmapBuffer::RGB(byte_order::extract_rgb(&rasterized_pixels)) BitmapBuffer::RGB(byte_order::extract_rgb(&rasterized_pixels))