phibr0 / obsidian-emoji-shortcodes

Emoji Shortcodes - Obsidian Plugin | Adds Support for Emoji Shortcodes to Obsidian
MIT License
185 stars 16 forks source link

Keyboard symbols/ALT codes instead of emojis? #41

Open cathyjhu opened 2 years ago

cathyjhu commented 2 years ago

I realized that for a few emojis, the usual emoji is replaced by the keyboard symbol (Windows ALT codes?). I included screenshots below, and the original emojis I was looking for are ❤️ and ☔️:

Screen Shot 2022-11-12 at 9 30 52 PM Screen Shot 2022-11-12 at 9 31 00 PM

taneltm commented 1 year ago

Looks like the font that's loaded by Obsidian doesn't include some of the emojis. I made a CSS snippet to fix those kinds of issues for me:

@font-face {
  font-family: 'Noto Color Emoji';
  src: url(https://rawcdn.githack.com/googlefonts/noto-emoji/9a5261d871451f9b5183c93483cbd68ed916b1e9/fonts/NotoColorEmoji.ttf);
}

:root {
  --default-font: -apple-system, BlinkMacSystemFont, Segoe UI,
      Helvetica, Arial, sans-serif, Apple Color Emoji,
      Noto Color Emoji;
  --editor-font: 'Hack Nerd Font', 'Source Code Pro',
      ui-monospace, SFMono-Regular, SF Mono, Menlo,
      Consolas, Liberation Mono, monospace;
}

Without that snippet, I do have the heart and umbrella emojis, but the heart is gray instead of red and some of the newer emojis like :anatomical_heart: are just squares.

I made that snippet over a year ago, so I don't know if there are any side-effects.

The plugin itself is fine.