summaryrefslogtreecommitdiff
path: root/font
diff options
context:
space:
mode:
authorAlex <the.decryptor@gmail.com>2019-07-14 20:53:04 +1000
committerChristian Duerr <chrisduerr@users.noreply.github.com>2019-07-14 10:53:04 +0000
commit1c05b3bb0cfe29ddaa349906a7359f4b65e78f19 (patch)
treed6700b640af6bcb6730184b9b6daf4b5f82d7800 /font
parent9a159a77604e0354f1176b02ff700bc11da19c86 (diff)
downloadalacritty-1c05b3bb0cfe29ddaa349906a7359f4b65e78f19.tar.gz
alacritty-1c05b3bb0cfe29ddaa349906a7359f4b65e78f19.zip
Query DirectWrite for the rendering mode to use
Diffstat (limited to 'font')
-rw-r--r--font/src/directwrite/mod.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/font/src/directwrite/mod.rs b/font/src/directwrite/mod.rs
index 0284b397..32b3570d 100644
--- a/font/src/directwrite/mod.rs
+++ b/font/src/directwrite/mod.rs
@@ -143,11 +143,17 @@ impl crate::Rasterize for DirectWriteRasterizer {
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(
&glyph_run,
self.device_pixel_ratio * (96.0 / 72.0),
None,
- dwrote::DWRITE_RENDERING_MODE_NATURAL,
+ rendering_mode,
dwrote::DWRITE_MEASURING_MODE_NATURAL,
0.0,
0.0,