Fonts and symbols

(moved to Unsupported software, for I found out it’s not a system font problem)

Not sure if this piece is supported or not… I just noticed that the font+oh-my-posh theme mix I use seems broken. At first I thought it was something to do with kitty, but the same happens on Konsole.

Just to be easier to show, this is how the theme was supposed to appear:


(from Themes | Oh My Posh)

This is how it shows (Konsole on foreground, kitty on background):

I must say I never delved too deep on the workings of fonts on Linux, I mainly just used oh-my-posh’s font install command to do it, and it used to work nicely.

I thought maybe installing the “symbols only” would fix this, but no luck:

└─Δ paru nerd fonts symbols     
4 aur/nerd-fonts-fontconfig 1.0.1-3 [+2 ~0.07]
    Fontconfig for Nerd Fonts Symbols
3 extra/ttf-nerd-fonts-symbols-mono 3.0.2-2 [986.98KiB 1.81MiB] (nerd-fonts)
    High number of extra glyphs from popular 'iconic fonts' (monospace)
2 extra/ttf-nerd-fonts-symbols-common 3.0.2-2 [0B 41.98KiB] [Instalado]
    High number of extra glyphs from popular 'iconic fonts' (common files)
1 extra/ttf-nerd-fonts-symbols 3.0.2-2 [0B 1.80MiB] [Instalado] (nerd-fonts)
    High number of extra glyphs from popular 'iconic fonts'
:: Pacotes a instalar (ex: 1 2 3, 1-3):

Install the nerd font version of whatever font you are using in your terminal.

oh-my-posh font install DaddyTimeMono is part of my “set things up script”, and it does just that.

I believe the code points of the icons in starship.toml are old and have been dropped. Use nerdfix to replace them with newer code points.

Download nerdfix from either chaotic-aur or GitHub - loichyan/nerdfix: 🔣 nerdfix helps you to find/fix obsolete Nerd Font icons in your project. use cargo to install and build it locally. Then,

nerdfix fix ~/starship.toml

You can read more about it’s options using,

nerdfix --help

Edit: Sorry just noticed that I mentioned starship out of habit. Please find the config file for oh-my-posh that contains all your icons and use nerdfix on that instead.

not sure that’ll help much in this case. From what I understand, that fixes characters themselves, and not references to them.

For example, in the tokyo.omp.json theme file, I have:

10   │           "template": "\u250f[<#ffffff>\ueb99</> {{ .UserName }} from <#ffffff>\uf108</> {{ .HostName }}]",

which outputs:

┏[ johnny from ﲾ johnny-g55590] 

or, better in graphic:

image

and that should be like this:

image

but you see, the theme file doesn’t use the symbol itself, but a reference to it, \uf108 instead of the monitor symbol.

When I first started using, I used to make a copy on my own git repo of the theme file… but then once I noticed a fix, so now when I set things up, I always grab a new from the original repo - https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/tokyo.omp.json

–edit

Also… f108 doesn’t seem to have changed?

is that ttf-daddytime-mono-nerd ?

Assuming that is the problem, I’d brute force my way with something like this
linux - How to convert \uXXXX unicode to UTF-8 using console tools in *nix - Stack Overflow nerdfix and then back again to unicode references if desired.

But, I really do not know, given

I hope it’s not a waste of time :man_shrugging:

I’d wager they have the same content, but I haven’t tried that package.

└─Δ paru ttf daddytime
1 extra/ttf-daddytime-mono-nerd 3.0.2-1 [1.58MiB 5.44MiB] (nerd-fonts)
    Patched font Daddy Time Mono from nerd fonts library
:: Pacotes a instalar (ex: 1 2 3, 1-3):

hm… says here it’s a patched version. I wonder if it’ll overwrite the current one, or what?

you know the funny thing? that idea sent me down a shallow rabbit hole where I ended up remembering about echo -e, so I tried echo -e '\uf108' and guess what?

Kitty:
image

on Konsole I had to first call bash, because fish.
image

so the font works. there’s something else broken in there, then… guess I’m taking this to Jan (oh-my-posh dev)

–edit
ahhh I managed to printf on fish =p
image

–edit 2
how bananas is this?


(for those who don’t know - I had already loaded oh-my-posh on the shell startup script .zshrc, and then ran the command, manually, again)

–edit 3
definitely not terminal related.

(Konsole fish just dislikes it anyway)

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.