inching towards sane emoji rendering with glutin frontend

This commit is contained in:
Wez Furlong committed 2019-02-20 17:44:35 -08:00
1 parent e976f1872a
commit b0f7a9d797
2 files changed
+7 -1

No files matched your search

+6
View File
@@ -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(),
+1 -1
View File
@@ -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(),