question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inconsistent Emoji when sans-serif is Noto Sans CJK/Source Han Sans

See original GitHub issue

Bug report:

  • Operating system and version: All system in concept, especially Linux distros that with Chinese support
  • Browser and version: All browsers that can set font for sans-serif
  • Reduced test case: https://jsbin.com/gobared/

Steps:

  1. Set browser default sans-serif to Noto Sans CJK/Source Han Sans, which is commonly used as Chinese/Japanese/Korean font in Linux distros.
  2. Open a site with Emoji that built with Bootstrap

Screenshot: 圖片

Suggested fix: Put Emoji fonts in front of text fonts like

$font-family-sans-serif:
  // Safari for OS X and iOS (San Francisco)
  -apple-system,
  // Chrome < 56 for OS X (San Francisco)
  BlinkMacSystemFont,
  // Emoji fonts
  "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji",
  // Windows
  "Segoe UI",
  // Android
  "Roboto",
  // Basic web fallback
  "Helvetica Neue", Arial, "Noto Sans"
  , sans-serif !default;

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
patrickhlaukecommented, Nov 19, 2020

@XhmikosR i think this is slightly different aspect. #31960 warns about unicode chars being replaced by emoji that then can’t be styled colour-wise, while this issue highlights that in some cases the emoji fonts are not kicking in, if i understand it correctly … i.e. the opposite issue of what #31960 describes.

would reshuffling the order in which the fonts are called have any other adverse effects? if not, i’d say go for the suggested fix here (though to clarify, i assume this is just about moving the emoji fonts and not duplicating it like in the above code block?)

0reactions
ffooddcommented, Jan 14, 2021

Agreed, and even in that case it’d only need some font-family love for this specific situation. I’d say: let’s try simply moving sans-serif after emoji fonts.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found