Merge pull request #77 from sebnow/fix-macos-emoji-font

Fix conditional for MacOS emoji font
macos-click-through
Keith Simmons 5 years ago committed by GitHub
commit c2e93ff04f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -18,7 +18,7 @@ const WIDE_BOLD_FONT: &'static str = "NotoSansMonoCJKjp-Bold.otf";
const SYSTEM_EMOJI_FONT: &str = "Segoe UI Emoji"; const SYSTEM_EMOJI_FONT: &str = "Segoe UI Emoji";
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
const SYSTEM_EMOJI_FONT: &str = "Apple COlor Emoji"; const SYSTEM_EMOJI_FONT: &str = "Apple Color Emoji";
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
const SYSTEM_EMOJI_FONT: &str = "Noto Color Emoji"; const SYSTEM_EMOJI_FONT: &str = "Noto Color Emoji";
@ -84,7 +84,7 @@ fn build_collection_by_font_name(font_name: Option<&str>, bold: bool, italic: bo
collection.add_family(FontFamily::new_from_font(font)); collection.add_family(FontFamily::new_from_font(font));
} }
if cfg!(not(macos)) { if cfg!(not(target_os = "macos")) {
let emoji_data = Asset::get(EMOJI_FONT).expect("Failed to read emoji font data"); let emoji_data = Asset::get(EMOJI_FONT).expect("Failed to read emoji font data");
let emoji_font = Font::from_bytes(emoji_data.to_vec().into(), 0).expect("Failed to parse emoji font data"); let emoji_font = Font::from_bytes(emoji_data.to_vec().into(), 0).expect("Failed to parse emoji font data");
collection.add_family(FontFamily::new_from_font(emoji_font)); collection.add_family(FontFamily::new_from_font(emoji_font));

Loading…
Cancel
Save