Skip to content

Showing different icons instead of ligatures #16

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

Closed
robinsrk opened this issue Jun 20, 2021 · 8 comments
Closed

Showing different icons instead of ligatures #16

robinsrk opened this issue Jun 20, 2021 · 8 comments

Comments

@robinsrk
Copy link

robinsrk commented Jun 20, 2021

When turning on fira code mode, it is showing random icons instead of showing ligatures. attaching some screenshot with and without fira code mode.

with fira code mode
image

without fira code mode
image

@jming422
Copy link
Owner

Looks like a font other than Fira Code Symbol is being used to display the ligature glyphs.

If you haven't already, install the Fira Code Symbol font to your system with M-x fira-code-mode-install-fonts RET.

If you've already done that or if doing so doesn't fix the issue, you can try M-x fira-code-mode--setup RET. If that solves your problem, then add it to your config and you should be good to go.

If not, I'm not sure exactly how to solve the issue, but putting your point over one of the symbols and typing M-x describe-char to get more info would be a good place to start.

@robinsrk
Copy link
Author

Looks like a font other than Fira Code Symbol is being used to display the ligature glyphs.

If you haven't already, install the Fira Code Symbol font to your system with M-x fira-code-mode-install-fonts RET.

If you've already done that or if doing so doesn't fix the issue, you can try M-x fira-code-mode--setup RET. If that solves your problem, then add it to your config and you should be good to go.

If not, I'm not sure exactly how to solve the issue, but putting your point over one of the symbols and typing M-x describe-char to get more info would be a good place to start.

I have checked it with fira code font also, same problem, and tried fira-code-mode-install-fonts. but no luck. And there is no option for 'fira-code-mode--setup', can't run that.
ok i will try to see with 'describe-char' to find any issue

@robinsrk
Copy link
Author

robinsrk commented Jun 21, 2021

Looks like a font other than Fira Code Symbol is being used to display the ligature glyphs.

If you haven't already, install the Fira Code Symbol font to your system with M-x fira-code-mode-install-fonts RET.

If you've already done that or if doing so doesn't fix the issue, you can try M-x fira-code-mode--setup RET. If that solves your problem, then add it to your config and you should be good to go.

If not, I'm not sure exactly how to solve the issue, but putting your point over one of the symbols and typing M-x describe-char to get more info would be a good place to start.

This is the output of describe-char

` position: 277 of 756 (37%), column: 21
character: : (displayed as :) (codepoint 58, #o72, #x3a)
charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x3A
script: latin
syntax: . which means: punctuation
category: .:Base, a:ASCII, l:Latin, r:Roman
to input: type "C-x 8 RET 3a" or "C-x 8 RET COLON"
buffer code: #x3A
file code: #x3A (encoded by coding system undecided-unix)
display: by this font (glyph code)
ftcrhb:-H&Co-Operator Mono-light-normal-normal--17----m-0-iso10646-1 (#x1D)

Character code properties: customize what to show
name: COLON
general-category: Po (Punctuation, Other)
decomposition: (58) (':')

There is an overlay here:
From 254 to 279
face hl-line
priority -50
window nil

There are text properties here:
fontified t
prettify-symbols-end 278
prettify-symbols-start 277
`

@jming422
Copy link
Owner

And there is no option for 'fira-code-mode--setup', can't run that.

Sorry about that, I forgot that function isn't available via M-x. If you've already got the package loaded, you can run it with M-: (fira-code-mode--setup) RET. If it works for you I'll probably release an update which autoloads that function.

@robinsrk
Copy link
Author

And there is no option for 'fira-code-mode--setup', can't run that.

Sorry about that, I forgot that function isn't available via M-x. If you've already got the package loaded, you can run it with M-: (fira-code-mode--setup) RET. If it works for you I'll probably release an update which autoloads that function.

Tried with M-: fira-code-mode--setup but no luck, it shows an error. Am i missing something?
image

@jming422
Copy link
Owner

jming422 commented Jun 21, 2021

With M-: you're entering elisp, so the parentheses are required - M-: fira-code-mode--setup RET won't work, but M-: (fira-code-mode--setup) RET should so long as fira-code-mode.el has already been loaded

@robinsrk
Copy link
Author

With M-: you're entering elisp, so the parentheses are required - M-: fira-code-mode--setup RET won't work, but M-: (fira-code-mode--setup) RET should so long as fira-code-mode.el has already been loaded

Yea thanks it worked. but as soon as i restart emacs, it again shows those symbols. so please push an update fixing thins bug

@jming422
Copy link
Owner

Yea thanks it worked.

Hurray, I'm glad!

but as soon as i restart emacs, it again shows those symbols.

Like I mentioned above:

If that solves your problem, then add it to your config and you should be good to go.

You need to add (fira-code-mode--setup) to your configuration after fira-code-mode has been loaded. If you use use-package, then this would go in your :config block.

so please push an update fixing thins bug

I will most likely push an update which documents this situation in the README and autoloads the setup function so it can be run with M-x, but this is only an issue in relatively rare cases where your system has a font which clashes on the area of Unicode space used by Fira Code Symbol. On my system and many others', this step is not necessary, and in fact causes some conflicts with other packages such as all-the-icons. So I won't enable calling this function by default, but I will make it easier and more obvious that people with certain fonts installed to their system need to add this to their config.

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

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy