diff options
author | Casper Rogild Storm <2248455+casperstorm@users.noreply.github.com> | 2020-05-17 23:14:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-17 21:14:13 +0000 |
commit | ab1f173ccd20001aafe2f5b3268423861b0ecdfe (patch) | |
tree | d71c0990b1dd1fef80787a64fb553cf18393a983 /alacritty/src/event.rs | |
parent | 395fee2b01d0fe59f5502402e102f50ebfd88cd1 (diff) | |
download | r-alacritty-ab1f173ccd20001aafe2f5b3268423861b0ecdfe.tar.gz r-alacritty-ab1f173ccd20001aafe2f5b3268423861b0ecdfe.tar.bz2 r-alacritty-ab1f173ccd20001aafe2f5b3268423861b0ecdfe.zip |
Add subpixel anti-aliasing support on macOS 10.14+
Diffstat (limited to 'alacritty/src/event.rs')
-rw-r--r-- | alacritty/src/event.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs index 9a625a91..8ec2b839 100644 --- a/alacritty/src/event.rs +++ b/alacritty/src/event.rs @@ -22,7 +22,9 @@ use glutin::platform::unix::EventLoopWindowTargetExtUnix; use log::{debug, info, warn}; use serde_json as json; -use font::Size; +use font::{self, Size}; +#[cfg(target_os = "macos")] +use font::set_font_smoothing; use alacritty_terminal::clipboard::ClipboardType; use alacritty_terminal::config::Font; @@ -726,6 +728,10 @@ impl<N: Notify + OnResize> Processor<N> { } } + // Set subpixel anti-aliasing. + #[cfg(target_os = "macos")] + set_font_smoothing(config.font.use_thin_strokes()); + *processor.ctx.config = config; processor.ctx.terminal.dirty = true; |