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

FEATURE REQUEST: Nerd Font Icon compatibility #22

Open
GR3YH4TT3R93 opened this issue Aug 11, 2023 · 24 comments · Fixed by #26
Open

FEATURE REQUEST: Nerd Font Icon compatibility #22

GR3YH4TT3R93 opened this issue Aug 11, 2023 · 24 comments · Fixed by #26
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@GR3YH4TT3R93
Copy link

Currently, nerd font icons show up as boxes instead of the correct icon

How to reproduce:

  1. make acodeX-server open a zsh shell instead of bash (.acodex-server/index.js, change "bash" to "zsh")
  2. install oh-my-zsh
  3. install Powerlevel10k theme
  4. restart termux or reload shell
  5. enable icons in p10k configuration
  6. open terminal in Acode
  7. icons will show as boxes

Sorry if this isn't the right place to report this, I'm just not sure if this is an AcodeX limitation or an Acode limitation but I figured I'd start with the plugin and report to Acode if it's not a plugin specific issue

@bajrangCoder bajrangCoder added the enhancement New feature or request label Aug 19, 2023
@bajrangCoder
Copy link
Owner

I have found a way to achieve it: by loading the required font by the theme.
Soon, I will provide an option to do so.

@bajrangCoder bajrangCoder self-assigned this Aug 29, 2023
@bajrangCoder
Copy link
Owner

This issue is patched in v2.1.0.
Check it out!

@GR3YH4TT3R93
Copy link
Author

GR3YH4TT3R93 commented Aug 29, 2023

Great work! Although for some reason it doesn't preserve on save for some reason. It keeps reverting to Sapphire and erasing settings no matter what theme I choose.

@bajrangCoder
Copy link
Owner

bajrangCoder commented Aug 29, 2023

Ok, Got it!
Soon it will be patched.

Also make sure to review AcodeX on acode plugin store

@bajrangCoder bajrangCoder linked a pull request Aug 29, 2023 that will close this issue
@GR3YH4TT3R93
Copy link
Author

I don't get what's going on.

If I set the font, it works for that session but as soon as I close the app and reopen it, it's back to the previous font.

How to reproduce:

In termux:
cd (ensure in home directory)
mkdir GitHub
cd GitHub
mkdir Backup
cd Backup
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/FiraCode.zip
(Extract zip)
touch FiraCode.css
(replicate FiraCode.css found here: https://github.com/GR3YH4TT3R93/dotfiles/tree/main/GitHub/Backup/FiraCode.css)

In Acode:
Open terminal (ensure icons aren't working)
Close terminal
Open settings >> plugins >> AcodeX >> settings
Select Custom Font Style Sheet >> FiraCode.css
Clear Font Family
Add 'Fira Code' (with single quotes)
Open terminal (ensure icons are working)
Close app
Open app
Open terminal
No icons again, settings reverted to original

Where am I going wrong?

@GR3YH4TT3R93
Copy link
Author

And I'm sorry if this isn't the place and you'd like me to open another issue, but logo-ls icons still don't work

@bajrangCoder
Copy link
Owner

bajrangCoder commented Aug 29, 2023

Sorry for inconvenience! It's because i haven't published the patched version but Now update your AcodeX and try it.

If there is any issue let me know

@bajrangCoder bajrangCoder reopened this Aug 29, 2023
@GR3YH4TT3R93
Copy link
Author

Much better! It's now remembering font across restarts but logo-ls still doesn't work for some reason. The icons work correctly in termux so sadly,I don't think it's a font specific issue.

Thanks for the fast turnaround on the fix though! Awesome work as usual!

@bajrangCoder
Copy link
Owner

bajrangCoder commented Aug 30, 2023

Much better! It's now remembering font across restarts but logo-ls still doesn't work for some reason. The icons work correctly in termux so sadly,I don't think it's a font specific issue.

Thanks for the fast turnaround on the fix though! Awesome work as usual!

Don't be sad!
It can be fix. I have seen your custom font css file (https://github.com/GR3YH4TT3R93/dotfiles/blob/main/GitHub/Backup/FiraCode.css) there are some issues:

  1. you have given same name to all font, give it like that : FiraCode Regular etc.. according it's corresponding font file and
  2. in AcodeX font family Settings provide all font names without Single inverted comma as well as also separate your all font with Comma so AcodeX will load all.
    For eg: FiraCode Light, FiraCode Regular , and so on..

Restart Acode after setting custom font family

@bajrangCoder
Copy link
Owner

bajrangCoder commented Aug 30, 2023

It will definitely work because I also tried it
Here is my custom font css file:
https://dpaste.org/DMQn7

And in my AcodeX > Settings>Font Family, I have written: MesloLGS NF Regular, MesloLGS NF Bold, MesloLGS NF Italic, MesloLGS NF Bold Italic

Note: Also makes sure to all font file , provided my theme.

@GR3YH4TT3R93
Copy link
Author

Icons in the command prompt were/are working even with my bad config but logo-ls icons still don't work even with the config you provided.

How to reproduce:
apt install logo-ls
logo-ls
logo-ls -lah .

See attached photo for details

@bajrangCoder
Copy link
Owner

bajrangCoder commented Aug 30, 2023

Ok , I haven't tested! Let me test it.

Edit:
It's working for me (because i have loaded nerd font)
See 👇
Screenshot_20230830-133602_1

It's not working on your device because you have loaded simple fira code font which doesn't contains icon , and you will need icon here.
So you will need to load any font from here (you can download fira code nerd icon )
https://github.com/ryanoasis/nerd-fonts#patched-fonts

@GR3YH4TT3R93
Copy link
Author

I know for a fact I'm using nerd fonts... Source: https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/FiraCode.zip found here: https://www.nerdfonts.com/font-downloads

@GR3YH4TT3R93
Copy link
Author

Using your config with meslo and meslo fonts sourced from Powerlevel10k recommended source: https://github.com/romkatv/powerlevel10k/blob/master/font.md
Screenshot_2023-08-30-09-38-22-63_a2cf8efcdd42a8e6f7906303f104fb67

@bajrangCoder
Copy link
Owner

is your font file and custom css file is in same folder?
and have given names of loaded custom font file in acodex font family settings?

@bajrangCoder bajrangCoder added the help wanted Extra attention is needed label Sep 26, 2023
@bajrangCoder
Copy link
Owner

bajrangCoder commented Oct 22, 2023

Are you on Android 13?

Edit: check out latest update

@tharindu899
Copy link

you have css file give me bro

@bajrangCoder
Copy link
Owner

you have css file give me bro

Which css file?

@tharindu899
Copy link

tharindu899 commented Mar 27, 2024

FiraCode css file
my zsh icon not show

@tharindu899
Copy link

Ok , I haven't tested! Let me test it.

Edit: It's working for me (because i have loaded nerd font) See 👇 Screenshot_20230830-133602_1

It's not working on your device because you have loaded simple fira code font which doesn't contains icon , and you will need icon here. So you will need to load any font from here (you can download fira code nerd icon ) https://github.com/ryanoasis/nerd-fonts#patched-fonts

like this

@bajrangCoder
Copy link
Owner

FiraCode css file my zsh icon not show

FiraCode nerd font file is built in inside AcodeX , just select them from Acodex settings> Font Family

@bajrangCoder
Copy link
Owner

Ok , I haven't tested! Let me test it.
Edit: It's working for me (because i have loaded nerd font) See 👇 Screenshot_20230830-133602_1
It's not working on your device because you have loaded simple fira code font which doesn't contains icon , and you will need icon here. So you will need to load any font from here (you can download fira code nerd icon ) https://github.com/ryanoasis/nerd-fonts#patched-fonts

like this

Check out this: https://github.com/bajrangCoder/acode-plugin-acodex?tab=readme-ov-file#custom-fonts

@tharindu899
Copy link

Screenshot_20240328_094722_com foxdebug acodefree
icon not woeking bro

@bajrangCoder
Copy link
Owner

I guess that's because FiraCode nerd font doesn't contains that icons, try Meslo font from Acodex settings (As meslo have a lots of nerd icon, hopefully that will work)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants