Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file-icons font causing issues with one glyph #319

Open
bhrgunatha opened this issue May 19, 2022 · 1 comment
Open

file-icons font causing issues with one glyph #319

bhrgunatha opened this issue May 19, 2022 · 1 comment

Comments

@bhrgunatha
Copy link

bhrgunatha commented May 19, 2022

Arch Linux - fully up-to-date
Emacs 29.0.50 (but I get the same in 28.1)
all-the-icons - 20220427.1911 (from melpa)

This is a weird one and has taken me a long time to discover the culprit.

When I visit Get Emoji all emojis are displayed using my system installed emoji font JoyPixels - 6.6.

Except for one.

U+1F441 - 👁 is rendered from the file-icons.ttf font installed by all-the-icons at $HOME/.local/share/fonts/

This happens in Firefox 100 and Chromium 101.

Partial page Screenshot - Firefox
Partial page Screenshot - Chromium

LibreOffice apps Writer and Calc both display correctly using the system emoji font.
Copy/paste that bottom line of Gestures and Body Parts emoji from GetEmoji.com into emacs:
Emacs partial screenshot
U+1F441 isn't even getting rendered in emacs.

If I move file-icons.ttf somewhere else, the JoyPixels font is used (as I think it always should be).

mv $HOME/.local/share/fonts/file-icons.ttf $HOME/stash  

Here are the results:

I'm scratching my head over this.

Why would one single glyph cause these problems?
More importantly how can we fix it so file-icons doesn't stomp over the system emoji font.

@bhrgunatha
Copy link
Author

bhrgunatha commented May 20, 2022

After some more digging:

I can insert the correct character in emacs (29 ftw!)
C-x 8 e i
b - body
b - body parts
o - the 👁️ emoji

Next to that I copy/paste the weird character from the web page - 👁

Highlight the correct emoji

M-x describe-char

             position: 1 of 6 (0%), column: 0
            character: 👁 (displayed as 👁) (codepoint 128065, #o372101, #x1f441)
              charset: unicode (Unicode (ISO10646))
code point in charset: 0x1F441
               script: symbol
               syntax: w 	which means: word
             category: .:Base
             to input: type "C-x 8 RET 1f441" or "C-x 8 RET EYE"
          buffer code: #xF0 #x9F #x91 #x81
            file code: #xF0 #x9F #x91 #x81 (encoded by coding system utf-8-unix)
              display: composed to form "👁️" (see below)

Composed with the following character(s) "️" using this font:
  ftcrhb:-GOOG-JoyPixels-regular-normal-normal-*-21-*-*-*-*-0-iso10646-1
by these glyphs:
  [0 1 128065 557 25 0 25 20 6 nil]
with these character(s):
  ️ (#xfe0f) VARIATION SELECTOR-16

Character code properties: customize what to show
  name: EYE
  general-category: So (Symbol, Other)
  decomposition: (128065) ('👁')

There are 2 overlays here:
 From 1 to 5
  face                 hl-line
  priority             -50
  window               #<window 25 on *text*>
 From 1 to 3
  face                 region
  priority             (nil . 100)
  window               #<window 25 on *text*>

[back]

highlight the bad character - M-x describe-char

             position: 3 of 6 (33%), column: 1
            character: 👁 (displayed as 👁) (codepoint 128065, #o372101, #x1f441)
              charset: unicode (Unicode (ISO10646))
code point in charset: 0x1F441
               script: symbol
               syntax: w 	which means: word
             category: .:Base
             to input: type "C-x 8 RET 1f441" or "C-x 8 RET EYE"
          buffer code: #xF0 #x9F #x91 #x81
            file code: #xF0 #x9F #x91 #x81 (encoded by coding system utf-8-unix)
              display: by this font (glyph code):
    x:-monotype-arial unicode ms-medium-r-normal--21-152-100-100-p-208-gb18030.2000-0 (#x9439CF39)

Character code properties: customize what to show
  name: EYE
  general-category: So (Symbol, Other)
  decomposition: (128065) ('👁')

There are 2 overlays here:
 From 1 to 7
  face                 hl-line
  priority             -50
  window               #<window 25 on *text*>
 From 3 to 4
  face                 region
  priority             (nil . 100)
  window               #<window 25 on *text*>

[back]

I've no idea what is causing the composition (when the correct glyph is displayed) nor why file-icons.ttf triggers this strange behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant