gh0stzk / dotfiles

BSPWM environment with 18 themes. With a theme selector to change on the fly.
GNU General Public License v3.0
2.89k stars 211 forks source link

[BUG] Font problem with CJK (HIragana in Japanese and Korean) #332

Open CesarCruzUtec opened 16 hours ago

CesarCruzUtec commented 16 hours ago

Checklist before submitting an issue

Description of the bug

I recently encountered an issue with displaying Japanese and Korean characters in my terminal. After downloading some music files with Japanese characters in their filenames, I noticed that:

I have not installed any additional fonts on my system, aside from those set in my dotfiles. I am using the default themes for both Alacritty and Kitty. After some research, I suspect the issue might be related to the JetBrains NerdFont, as it doesn't explicitly mention support for Japanese or Korean characters on its official page. However, it does seem to display some Japanese characters (like Katakana and Kanji), which adds to the confusion.

Reproducing the issue

  1. Use JetBrains NerdFont as the terminal font in either Alacritty or Kitty.
  2. Display text containing a mix of Japanese characters (Katakana, Kanji, and Hiragana) and Korean alphabet. hiragana katakana kanji korean
  3. Notice that only Katakana and Kanji characters display, while Hiragana and Korean characters do not.

image

Expected behaviour

All Japanese characters (Kanji, Katakana, Hiragana) and Korean characters (Hangul) should be displayed correctly.

Additional context

No response

System information

gh0stzk commented 15 hours ago

I'm pretty sure it's the lack of support for the characters you mention in the jetbrainsmono nerd font. You can check this by installing the font-manager package sudo pacman -S font-manager and searching the jetbrainsmono nerd font for the available characters.

Searching the nerdfonts page https://www.nerdfonts.com/font-downloads find this: D2CodingLigature NerdFont apparently supports korean.

you need to download and put in ~/.local/share/fonts then modify ~/.config/alacritty/fonts.toml to make it your default font.

Additionally you can install the package noto-fonts-cjk sudo pacman -S noto-fonts-cjk for global support in your system.

And yes, it is a problem with the font and its lack of support for the characters you need, I can't do much in that case.

Even if the jetbrains nerd font had support and it still doesn't show up in alacritty or kitty, it would also be a terminal problem, maybe you could check it by installing another terminal like tilix, or something else, and set the font to jetbrainsmono nerd font , and see if it shows the characters or not.