summaryrefslogtreecommitdiffstats
path: root/font
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2019-04-14 15:37:58 +0000
committerGitHub <noreply@github.com>2019-04-14 15:37:58 +0000
commit5174f9b27488902e7862aeb470aa0f0375c95e46 (patch)
treebc22c88820e15a0bf1379bbfa371404c9706802b /font
parentaac62ce5acd2ef4d05a54bc13b7cf30c30f129b2 (diff)
Fix duplicate resize events
If a resize event is identical to the current size, it is no longer propagated but the resize is discarded immediately. To further prevent resizes when not necessary, the list of monitors is enumerated and the DPR of the first display is assumed to be the target DPR. This allows spawning a window with dimensions when the config has columns and lines specified and the window only needs to be resized if the estimated DPR is not correct. Fixes #1825. Fixes #204.
Diffstat (limited to 'font')
-rw-r--r--font/src/rusttype/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/font/src/rusttype/mod.rs b/font/src/rusttype/mod.rs
index fc69d6e9..74a5baa5 100644
--- a/font/src/rusttype/mod.rs
+++ b/font/src/rusttype/mod.rs
@@ -77,7 +77,7 @@ impl crate::Rasterize for RustTypeRasterizer {
FontCollection::from_bytes(
system_fonts::get(&fp.build()).ok_or_else(|| Error::MissingFont(desc.clone()))?.0,
)
- .and_then(|fc| fc.into_font())
+ .and_then(FontCollection::into_font)
.map_err(|_| Error::UnsupportedFont)?,
);
Ok(FontKey { token: (self.fonts.len() - 1) as u16 })