diff --git a/deny.toml b/deny.toml index d62f5a4..8552094 100644 --- a/deny.toml +++ b/deny.toml @@ -179,7 +179,7 @@ registries = [ # https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html [bans] # Lint level for when multiple versions of the same crate are detected -multiple-versions = "warn" +multiple-versions = "deny" # Lint level for when a crate version requirement is `*` wildcards = "allow" # The graph highlighting used when creating dotgraphs for crates diff --git a/src/font/fallback/mod.rs b/src/font/fallback/mod.rs index 4cf4382..845cf5d 100644 --- a/src/font/fallback/mod.rs +++ b/src/font/fallback/mod.rs @@ -130,10 +130,14 @@ impl<'a> Iterator for FontFallbackIter<'a> { } // Set a monospace fallback if Monospace family is not found if self.default_families[self.default_i - 1] == &Family::Monospace - && self.font_system.db().face(*id).map(|f| f.monospaced) == Some(true) && monospace_fallback.is_none() { - monospace_fallback = Some(id); + if let Some(face_info) = self.font_system.db().face(*id) { + // Don't use emoji fonts as Monospace + if face_info.monospaced && !face_info.post_script_name.contains("Emoji") { + monospace_fallback = Some(id); + } + } } } // If default family is Monospace fallback to first monospaced font diff --git a/src/shape.rs b/src/shape.rs index e4e5f99..cfc9da0 100644 --- a/src/shape.rs +++ b/src/shape.rs @@ -345,6 +345,7 @@ fn shape_skip( .map(|(i, codepoint)| { let glyph_id = charmap.map(codepoint); let x_advance = glyph_metrics.advance_width(glyph_id); + let attrs = attrs_list.get_span(i); ShapeGlyph { start: i,