Re: [Gimp-user] 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.
[1. The tofu on gimp]

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

[2. My fonts setting]

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]

Bad link!
dqwyy <me dqwyy moe>
October 5, 2018

All I can add is "Good Luck".

                      Well grubbed , old mole!

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]