diff --git a/src/config.rs b/src/config.rs index df3c348ec..d017ad307 100644 --- a/src/config.rs +++ b/src/config.rs @@ -195,6 +195,12 @@ impl TextStyle { } fn add_fallback(&mut self) { + #[cfg(target_os = "macos")] + self.font.push(FontAttributes { + family: "Apple Color Emoji".into(), + bold: None, + italic: None, + }); #[cfg(target_os = "macos")] self.font.push(FontAttributes { family: "Apple Symbols".into(), diff --git a/src/font/ftfont.rs b/src/font/ftfont.rs index 120e77afc..18ccc98ff 100644 --- a/src/font/ftfont.rs +++ b/src/font/ftfont.rs @@ -83,7 +83,7 @@ impl FreeTypeFontImpl { #[cfg(debug_assertions)] text: codepoint.to_string(), cluster: 0, - num_cells: 1, + num_cells: unicode_width::UnicodeWidthChar::width(codepoint).unwrap_or(1) as u8, font_idx: 0, glyph_pos, x_advance: (metrics.horiAdvance as f64 / 64.0).into(),