mirror of
https://github.com/alacritty/alacritty.git
synced 2025-02-17 15:57:08 -05:00
Query DirectWrite for the rendering mode to use
This commit is contained in:
parent
9a159a7760
commit
1c05b3bb0c
2 changed files with 11 additions and 1 deletions
|
@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- Completions for `--class` and `-t` (short title)
|
- Completions for `--class` and `-t` (short title)
|
||||||
- Change the mouse cursor when hovering over the message bar and its close button
|
- Change the mouse cursor when hovering over the message bar and its close button
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- On Windows, query DirectWrite for recommended anti-aliasing settings
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- GUI programs launched by Alacritty starting in the background on X11
|
- GUI programs launched by Alacritty starting in the background on X11
|
||||||
|
|
|
@ -143,11 +143,17 @@ impl crate::Rasterize for DirectWriteRasterizer {
|
||||||
bidiLevel: 0,
|
bidiLevel: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let rendering_mode = font.get_recommended_rendering_mode_default_params(
|
||||||
|
glyph.size.as_f32_pts(),
|
||||||
|
self.device_pixel_ratio * (96.0 / 72.0),
|
||||||
|
dwrote::DWRITE_MEASURING_MODE_NATURAL
|
||||||
|
);
|
||||||
|
|
||||||
let glyph_analysis = GlyphRunAnalysis::create(
|
let glyph_analysis = GlyphRunAnalysis::create(
|
||||||
&glyph_run,
|
&glyph_run,
|
||||||
self.device_pixel_ratio * (96.0 / 72.0),
|
self.device_pixel_ratio * (96.0 / 72.0),
|
||||||
None,
|
None,
|
||||||
dwrote::DWRITE_RENDERING_MODE_NATURAL,
|
rendering_mode,
|
||||||
dwrote::DWRITE_MEASURING_MODE_NATURAL,
|
dwrote::DWRITE_MEASURING_MODE_NATURAL,
|
||||||
0.0,
|
0.0,
|
||||||
0.0,
|
0.0,
|
||||||
|
|
Loading…
Add table
Reference in a new issue