RSS/Atom feed Twitter
Site is read-only, email is disabled

Characters became tofu after deleting fonts on Ubuntu

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

16644472a32.aee12307430624.... 05 Oct 18:24
  Characters became tofu after deleting fonts on Ubuntu Ken Moffat via gimp-user-list 05 Oct 18:24
   Characters became tofu after deleting fonts on Ubuntu dqwyy 06 Oct 03:19
Ken Moffat via gimp-user-list
2018-10-05 18:24:14 UTC (about 6 years ago)

Characters became tofu after deleting fonts on Ubuntu

On Fri, Oct 05, 2018 at 08:50:06PM +0800, dqwyy wrote:

Hi all.

I'm sorry that English is not my native language so I'm not good at it. Here is my problem.

I'm a new user on Ubuntu and I'm so excited that I can control my computer completely. Ubuntu, as a GNU/Linux OS is so free that I can customize it. I only use English, Chinese and Japanese so that I deleted all the fonts that I don't need. I think three fonts for English/western scripts are enough so I deleted all the fonts except Freesans, Freeserif and Freemono. I think one sans serif font, one serif font and one monospace font are enough. This looks really concise. I don't need to find a font on the long drop-down menu at Office software anymore.

Font problems are often hard to solve, I hope the words I use will be understandable.

Your logic for limiting the available fonts sounds sensible, but there are certain complications :

1. An application selects a font by using 'fontconfig'. The process can have sometimes unexpected results, because fontconfig may reject a font on the assumption that it lacks required characters for the specified language.

2. Fontconfig looks at files in /etc/fonts/conf.d/ for the rules. I have known some CJK fonts to add their own files there, causing a CJK Sans font to be used for Serif.

3. But in a default western layout, the fallback fonts are the DejaVu variants.

In gnome applications, I needed to add DejaVu fonts several years ago because of odd tofu - the reason was whitespace varieties (non-breaking spaces and similar) and DejaVu provided these.

The missing text uses a Sans font, at a small size.

So, I suggest that you try adding the DejaVu Sans font.

Things go well until I installed Gimp. I launched gimp after installing it and found nearly all the characters became "tofu" (some boxes). General speaking, this only happens when lacking of fonts. However, I already have fonts for Latin scripts. I also have CJK (Chinese, Japanese and Korean) fonts with basic Latin scripts included of course. So I think Gimp use the fonts which are deleted by me, and there are something wrong with the fallback, too. I don't know which fonts do it use and I tried reinstall the fonts named "Ubuntu" to my computer (I think that "Ubuntu" font is the default font of Ubuntu, isn't it?) but nothing changed and I still got tofu.

So could you please help me to solve this problem? Maybe I should reinstall all the fonts which are deleted by me? But I can't get those fonts unless I reinstall my OS. Well, this may be a weird problem because I think there is nobody but me to delete so many fonts on Ubuntu. XD

My OS version is Ubuntu 18.04.1 LTS, the gimp version is 2.10.

Here are some screenshots. Thank you very much. Screenshots:
[1. The tofu on gimp] https://i.imgur.com/PmMYVuv.png

A Sans font is being used for the titles, but all the smaller items, even the numbers, are tofu.

[2. My fonts setting] https://i.imgur.com/6u8SnXV.png

I see you are using Source Han Sans for titles, and a larger size of FreeMono for monospace (sensible, FreeMono is rather small).

I think that Source Han was incorporated into google's Noto fonts. It is a long time since I last looked at font details, but certainly for Noto the non-western fonts (e.g. their various CJK versions, also other writing systems) do not include the western characters.

Perhaps, try using a different font for 'Interface' (I am not familiar with this tool, but that looks a likely setting) - DejaVu Sans ought to work.

Possibly, your locale is affecting this. Which locale are you using ?

Other tools to use to try to work out what is happening:

fc-list | less

That should confirm which fonts are installed.

fc-match 'Font name' e.g. fc-match 'FreeMono'

fc-match -a 'Sans' | less That just lists all the Sans fonts

fc-match 'Sans' - for me, this reports "WenQuanYi Zen Hei" "Regular" but if I use LC_ALL=kr_KR fc-match 'Sans' I get DejaVu Sans

(I have a local configuration in /etc/fonts/local.conf which is probably doing that).

Maybe your Scaling Factor (1.25) is making the font too big to fit in the available space ?

[3. My font manager] https://i.imgur.com/undefined.png

Bad link!

Regards,
dqwyy
http://a.dqwyy.moe
October 5, 2018

All I can add is "Good Luck".

ĸen

Well grubbed , old mole!
dqwyy
2018-10-06 03:19:34 UTC (about 6 years ago)

Characters became tofu after deleting fonts on Ubuntu

---- On Sat, 06 Oct 2018 02:24:14 +0800 Ken Moffat via gimp-user-list wrote ----

3. But in a default western layout, the fallback fonts are the DejaVu variants. In gnome applications, I needed to add DejaVu fonts several years ago because of odd tofu - the reason was whitespace varieties (non-breaking spaces and similar) and DejaVu provided these. The missing text uses a Sans font, at a small size. So, I suggest that you try adding the DejaVu Sans font.

Thanks for your reply. The problem was solved before I tried to reinstall DejaVu fonts. In fact, I installed Gimp from Ubuntu Software at the first time and then met the problem. Then I tried to install it by `sudo apt install gimp` and got Gimp 2.8, an old version. The characters could be displayed well on this version but I still wanted to use the latest version, gimp 2.10. Then I went to the official website of Gimp and installed Gimp by using flatpak. After installation, I surprisingly found that the problem had been solved.

Screenshot: https://i.imgur.com/rCwW08H.png

The screenshot shows that Gimp is using the fonts Source Han Sans, which is set as the "interface fonts" by me. And when I change the fonts for the interface, the gimp changes, too. This is what I want. Obviously the gimp I downloaded from "Ubuntu Software" didn't use Source Han Sans. Maybe that one tried using DejaVu Sans but found nothing so displayed as tofu.

Possibly, your locale is affecting this. Which locale are you using ?

Well, I'm using en_US.UTF-8

I'm so happy that the problem was solved. Anyway, thanks for telling me so many knowledge and commands about fonts. That also helps me a lot since I'm a newbie in Linux.

Regards, dqwyy