bajrangCoder / acode-plugin-acodex

AcodeX is a plugin for the Acode app that adds terminal support, making coding more productive and efficient.
https://acode.app/plugin/bajrangcoder.acodex
MIT License
110 stars 18 forks source link

FEATURE REQUEST: Nerd Font Icon compatibility #22

Open GR3YH4TT3R93 opened 11 months ago

GR3YH4TT3R93 commented 11 months ago

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 commented 10 months ago

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 commented 10 months ago

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

GR3YH4TT3R93 commented 10 months ago

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 commented 10 months ago

Ok, Got it! Soon it will be patched.

Also make sure to review AcodeX on acode plugin store

GR3YH4TT3R93 commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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

GR3YH4TT3R93 commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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 commented 8 months ago

Are you on Android 13?

Edit: check out latest update

tharindu899 commented 3 months ago

you have css file give me bro

bajrangCoder commented 3 months ago

you have css file give me bro

Which css file?

tharindu899 commented 3 months ago

FiraCode css file my zsh icon not show

tharindu899 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

Screenshot_20240328_094722_com foxdebug acodefree icon not woeking bro

bajrangCoder commented 3 months ago

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)