acode-plugin-acodex icon indicating copy to clipboard operation
acode-plugin-acodex copied to clipboard

FEATURE REQUEST: Nerd Font Icon compatibility

Open GR3YH4TT3R93 opened this issue 2 years ago • 24 comments

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

GR3YH4TT3R93 avatar Aug 11 '23 01:08 GR3YH4TT3R93

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 avatar Aug 25 '23 02:08 bajrangCoder

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

bajrangCoder avatar Aug 29 '23 00:08 bajrangCoder

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.

GR3YH4TT3R93 avatar Aug 29 '23 13:08 GR3YH4TT3R93

Ok, Got it! Soon it will be patched.

Also make sure to review AcodeX on acode plugin store

bajrangCoder avatar Aug 29 '23 15:08 bajrangCoder

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 avatar Aug 29 '23 17:08 GR3YH4TT3R93

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

GR3YH4TT3R93 avatar Aug 29 '23 17:08 GR3YH4TT3R93

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 avatar Aug 29 '23 23:08 bajrangCoder

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!

GR3YH4TT3R93 avatar Aug 30 '23 00:08 GR3YH4TT3R93

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 avatar Aug 30 '23 00:08 bajrangCoder

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.

bajrangCoder avatar Aug 30 '23 00:08 bajrangCoder

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

GR3YH4TT3R93 avatar Aug 30 '23 06:08 GR3YH4TT3R93

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

bajrangCoder avatar Aug 30 '23 07:08 bajrangCoder

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 avatar Aug 30 '23 13:08 GR3YH4TT3R93

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

GR3YH4TT3R93 avatar Aug 30 '23 13:08 GR3YH4TT3R93

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 avatar Aug 30 '23 14:08 bajrangCoder

Are you on Android 13?

Edit: check out latest update

bajrangCoder avatar Oct 22 '23 02:10 bajrangCoder

you have css file give me bro

tharindu899 avatar Mar 26 '24 17:03 tharindu899

you have css file give me bro

Which css file?

bajrangCoder avatar Mar 26 '24 23:03 bajrangCoder

FiraCode css file my zsh icon not show

tharindu899 avatar Mar 27 '24 05:03 tharindu899

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

tharindu899 avatar Mar 27 '24 05:03 tharindu899

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 avatar Mar 27 '24 05:03 bajrangCoder

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

bajrangCoder avatar Mar 27 '24 05:03 bajrangCoder

Screenshot_20240328_094722_com foxdebug acodefree icon not woeking bro

tharindu899 avatar Mar 28 '24 04:03 tharindu899

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)

bajrangCoder avatar Mar 28 '24 04:03 bajrangCoder