# Nerd-Fonts Glyphs and Ligatures Not Working



## Lord_Devi (Mar 30, 2021)

I can't seem to get font glyphs or ligatures displaying correctly in X on my new FreeBSD install.

I've installed nerd-fonts 2.1.0, and have tried "JetBrainsMono Nerd Font", as well as "Fira Code Nerd Font" but neither seem to work.

Am I missing a step?  On Archlinux, it is pretty much install and go.


----------



## matt_k (Mar 30, 2021)

Hello,

are the aforementioned fonts present in your `fc-list`?
If not, you may need to update the `fc-cache`


----------



## Lord_Devi (Mar 30, 2021)

Thank you matt_k.

Yes I see them all under fc-list.  I was able to add them to alacritty, and to chrome, and firefox as well it seems.

It just seems like the glyph and ligature components of the fonts aren't working.  Only the standard non-nerd part of the font kinda thing. =/


----------



## matt_k (Mar 30, 2021)

uhm, nothing comes to my mind at the moment, but did you go according to the handbook?


----------



## Lord_Devi (Mar 30, 2021)

Thank you for offering your advice though matt_k, it is really appreciated. =)

I did follow the handbook though, and everything _should_ be working as far as I can tell.  It just.. isn't.  It is like the "JetBrains Mono" font is loaded, not the "JetBrains Mono Nerd" font.


----------



## Alexander88207 (Mar 30, 2021)

Lord_Devi said:


> I can't seem to get font glyphs or ligatures displaying correctly in X.



I guess you have already tried another desktop environments or window managers as well?


----------



## T-Daemon (Mar 31, 2021)

Lord_Devi said:


> I can't seem to get font glyphs or ligatures displaying correctly in X





Lord_Devi said:


> It just seems like the glyph and ligature components of the fonts aren't working.


If you are on 12.2 set the locale environment of the login shell to UTF-8.

System wide, login classes method (append to the default class `charset` and `lang`, pay attention to end the `umask` line with a `\`):

/etc/login.conf

```
default:\
    ....
    :umask=022:\
    :charset=UTF-8:\
    :lang=C.UTF-8:
```
Afterwards run `cap_mkdb /etc/login.conf`, log out, log in to take effect. login.conf(5) cap_mkdb(1)

For other methods see in handbook chapter








						Chapter 24. Localization - i18n/L10n Usage and Setup
					

FreeBSD supports localization into many languages, allowing users to view, input, or process data in non-English languages




					docs.freebsd.org


----------



## Lord_Devi (Mar 31, 2021)

> I guess you have already tried another desktop environments or window managers as well?



I did try tackling this from the software side actually.  And that was it.  I found the problem.

Thanks very much Alexander for checkin on the problem with me.  I appreciate it.

The problem WAS the software, not the fonts or the font engine.

I was testing for ligatures using alacritty and emacs.  Emacs had been configured to use Ligatures on my Linux machine already. And alacritty had to be compiled from git, using the branch with ligature support.

After I custom compiled alacritty with that ligature support, I was able to verify that the font was working as intended.  It is the tools I was trying to ues the ligatures inside of that were the issue.  They just didn't have that harfbuzz support or whatever it is called.

Really wish Kitty was ported over to FreeBSD! lol.


----------



## Deleted member 30996 (Mar 31, 2021)

I'm getting ready write a Tutorial on How to make an ASCII image using games/cowsay and graphics/gimp with your own fonts added by root transfer using x11-fm from the usr account into usr/local/share/gimp/font and invoking `#rehash`.

The new fonts will be available for use by Gimp the next time opened without any other steps involved.


----------



## Alexander88207 (Mar 31, 2021)

Lord_Devi said:


> Really wish Kitty was ported over to FreeBSD! lol.








						233010 – [new port] x11/kitty: Cross-platform, fast, feature full, GPU based terminal emulator
					






					bugs.freebsd.org


----------

