Adobe Fonts are white on white

Hi!

I have openSUSE Leap 15.2 installed with TDE desktop environment. I normally use Adobe fonts in gvim such as “Adobe Courier Medium”. At first it all worked fine. But today (not sure whether it is related) I installed a bunch of new packages and I’m not sure whether it is related to that but I noticed that all Adobe fonts that I was able to select in gvim are now white on white. Is there any way how I can troubleshoot this problem? I re-installed the following packages:


adobe-sourceserifpro-fonts-2.000-lp152.3.2.noarch
adobe-sourcecodepro-fonts-2.030-lp152.4.1.noarch
adobe-sourcesanspro-fonts-2.020-lp152.3.2.noarch

but it didn’t help.

These are the new packages that I installed today and that may have caused a conflict with the Adobe fonts:


The following 106 NEW packages are going to be installed:
  fontconfig-32bit glibc-32bit gnome-keyring-32bit gnome-keyring-pam-32bit krb5-32bit libacl1-32bit libargon2-1-32bit libattr1-32bit libaudit1-32bit libavahi-client3-32bit libavahi-common3-32bit libblkid1-32bit libbz2-1-32bit libcairo2-32bit libcap2-32bit libcom_err2-32bit libcrack2-32bit libcryptsetup12-32bit libcups2-32bit libdatrie1-32bit libdbus-1-3-32bit libdcerpc0-32bit libdcerpc-binding0-32bit libdevmapper1_03-32bit libexpat1-32bit libfam0-gamin-32bit libffi7-32bit libfreetype6-32bit libfribidi0-32bit libgcc_s1-32bit libgcrypt20-32bit libglib-2_0-0-32bit libGLU1-32bit libglvnd-32bit libgmp10-32bit libgnutls30-32bit libgobject-2_0-0-32bit libgpg-error0-32bit libgraphite2-3-32bit libharfbuzz0-32bit libhogweed4-32bit libidn11-32bit libidn2-0-32bit libjansson4-32bit libjson-c3-32bit libkeyutils1-32bit libldap-2_4-2-32bit libldb2-32bit liblz4-1-32bit liblzma5-32bit libndr0-32bit libndr-krb5pac0-32bit libndr-nbt0-32bit libndr-standard0-32bit libnetapi0-32bit libnettle6-32bit libnscd1-32bit libnsl2-32bit libopenssl1_1-32bit libp11-kit0-32bit libpango-1_0-0-32bit libpangox-1_0-0-32bit libpcre1-32bit libpixman-1-0-32bit libpng16-16-32bit libpopt0-32bit libsamba-credentials0-32bit libsamba-errors0-32bit libsamba-hostconfig0-32bit libsamba-passdb0-32bit libsamba-util0-32bit libsamdb0-32bit libsasl2-3-32bit libseccomp2-32bit libselinux1-32bit libsmbconf0-32bit libsmbldap2-32bit libstdc++6-32bit libsystemd0-32bit libtalloc2-32bit libtasn1-6-32bit libtdb1-32bit libtevent0-32bit libtevent-util0-32bit libthai0-32bit libtirpc3-32bit libudev1-32bit libunistring2-32bit libuuid1-32bit libverto1-32bit libwbclient0-32bit libX11-6-32bit libXau6-32bit libxcb1-32bit libxcb-render0-32bit libxcb-shm0-32bit libXext6-32bit libXft2-32bit libxml2-2-32bit libXrender1-32bit libz1-32bit nss-mdns-32bit pam-32bit samba-client-32bit samba-libs-32bit systemd-32bit


The following 10 NEW packages are going to be installed:
  gdk-pixbuf-query-loaders-32bit libatk-1_0-0-32bit libgdk_pixbuf-2_0-0-32bit libgio-2_0-0-32bit libgmodule-2_0-0-32bit libgthread-2_0-0-32bit libjbig2-32bit libjpeg8-32bit libmount1-32bit libtiff5-32bit


The following 24 NEW packages are going to be installed:
  alsa-oss-32bit alsa-plugins-pulse-32bit apulse apulse-32bit glibc-locale-base-32bit gtk2-engine-murrine-32bit gtk2-theming-engine-adwaita-32bit gtk2-tools-32bit libasound2-32bit libcanberra0-32bit libcanberra-gtk0-32bit libcanberra-gtk2-module-32bit libgtk-2_0-0-32bit libltdl7-32bit libogg0-32bit libvorbis0-32bit libvorbisfile3-32bit libXcomposite1-32bit libXcursor1-32bit libXdamage1-32bit libXfixes3-32bit libXi6-32bit libXinerama1-32bit libXrandr2-32bit

I then decided to uninstall:


The following 24 packages are going to be REMOVED:
  alsa-oss-32bit alsa-plugins-pulse-32bit apulse apulse-32bit glibc-locale-base-32bit
  gtk2-engine-murrine-32bit gtk2-theming-engine-adwaita-32bit gtk2-tools-32bit
  libasound2-32bit libcanberra0-32bit libcanberra-gtk0-32bit
  libcanberra-gtk2-module-32bit libgtk-2_0-0-32bit libltdl7-32bit libogg0-32bit
  libvorbis0-32bit libvorbisfile3-32bit libXcomposite1-32bit libXcursor1-32bit
  libXdamage1-32bit libXfixes3-32bit libXi6-32bit libXinerama1-32bit
  libXrandr2-32bit

to see whether I could get the Adobe fonts back, but it didn’t help. Any idea what package could have caused the problem or how I can best troubleshoot this? Any help would be appreciated.

Thanks!

PS: It may be more than just the Adobe fonts that have a problem: When I select Edit -> Select Font in gvim, there are 4 fonts between “Andale Mono Bold Italic” and “Bitstream Vera Sans” that are also white on white, can’t tell what they are since it’s white on white (besides 4 Adobe fonts that are also white on white).

Thanks!

On Leap 15.3, KDE Plasma GUI, also with Adobe OTF fonts available – changing the default font for Konsole to “Adobe Courier Normal” doesn’t trigger this behaviour.

  • Konsole colour scheme “Breeze” triggers white characters on a black background.

What happens if, you change the gVim colour scheme?

Does a new, fresh, never used before, user also display this issue?

  • If a new, fresh, user doesn’t display this issue, clean out the affected user’s ‘~/.cache’ directory – you can choose to not clean up the contents of the ‘~/.cache/mozilla’ directory because, Mozilla products normally take care of the cache contents …

[HR][/HR]UNIX® and UNIX®-like operating systems, such as Apple’s OS, BSD and, Linux, are [simultaneous] multi-user operating systems …

If a new, fresh, user doesn’t display this issue, clean out the affected user’s ‘~/.cache’ directory – you can choose to not clean up the contents of the ‘~/.cache/mozilla’ directory because, Mozilla products normally take care of the cache contents …

I haven’t tried yet to create a new user. I removed the contents of ~/.cache including the subfolder “fontconfig” but the fonts are still not back in gvim. Is there any other way to find out what could be wrong with the font installation?

Thanks!

I also tried to use a different theme other than Breeze, but it doesn’t fix it. Another thing I discovered is that all Adobe fonts are available in a non-GTK application. So this may be a GTK3 issue, maybe some CSS conflicts?

The following thread mentions that pango 1.44 could cause problems with fonts in GTK3:

https://www.reddit.com/r/Fedora/comments/dto1ta/fonts_issues/

I do have pango 1.44 installed:


/home/gianluca> rpm -qa | grep -i pango
libcogl-pango20-1.22.2-lp152.4.10.x86_64
typelib-1_0-Pango-1_0-1.44.7+11-lp152.1.4.x86_64
libpango-1_0-0-1.44.7+11-lp152.1.4.x86_64
libpango-1_0-0-32bit-1.44.7+11-lp152.1.4.x86_64
libpangox-1_0-0-32bit-0.0.2-lp152.4.2.x86_64
typelib-1_0-CoglPango-1_0-1.22.2-lp152.4.10.x86_64
libpangomm-1_4-1-2.42.0-lp152.1.4.x86_64

I did update a few packages a while ago. Is there a way to look at the update history and find out whether pango has been updated on my system? Has anyone else experienced GTK3 font problems and has pango 1.44 installed?

Thanks!

Using Yast software management, the menu for “Extras” includes “show history”. Personally, I prefer (as root) to use

less /var/log/zypp/history

Indeed, pango was updated:


2021-05-28 20:37:31|install|libpango-1_0-0|1.44.7+11-lp152.1.4|x86_64||openSUSE-Leap-15.2-1|7eac6477b961498b0c6cc52ebdca5efb9613013fe87763a4e147b6d252a3320d|
2021-05-28 20:38:10|install|libpangomm-1_4-1|2.42.0-lp152.1.4|x86_64||openSUSE-Leap-15.2-1|2e15173541d6d89649013c7831c5a2e6690d583a6fbcf1dc3a69c4be05e4f07f|
2021-05-28 20:56:31|install|typelib-1_0-Pango-1_0|1.44.7+11-lp152.1.4|x86_64||openSUSE-Leap-15.2-1|26ec737f1b37c0eee24a1ffd01c3a26e44a40a3686284fc6e82f1b92520e4b58|
2021-05-28 21:04:27|install|libcogl-pango20|1.22.2-lp152.4.10|x86_64||openSUSE-Leap-15.2-1|e09572b79d6f19f8e62ed1898d33ef2cda72b661c406915b0b3fd8f1c0fa172a|
2021-05-28 21:04:31|install|typelib-1_0-CoglPango-1_0|1.22.2-lp152.4.10|x86_64||openSUSE-Leap-15.2-1|75cd5fe4f27dfbdebcdefcd9a84929ae7412f8083ee845b93a324836b85d7aef|

But I don’t know what the previous version was. How can I find this out? And how easy would it be to revert to the previous version to see if this caused the issue? Should I then file a bug report?

Thanks!

Use the “Versions” tab in Yast Software Management. That will tell you what versions are in the repos, and allow you to install a particular version.

I solved the problem. First, I logged in remotely as root and started gvim. All the fonts were there and functional indicating that it was probably not related to the packages installed. I found that it was the file “.fonts.conf” in my home directory that was creating the problems:


/home/gianluca> cat .fonts.conf
<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <match target="font" >
  <edit mode="assign" name="rgba" >
   <const>none</const>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="hinting" >
   <bool>true</bool>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="hintstyle" >
   <const>hintfull</const>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="antialias" >
   <bool>true</bool>
  </edit>
 </match>
</fontconfig>

Once I removed “.fonts.conf” all fonts were back in gvim and functional. Any ideas which line in “.fonts.conf” above may be causing the problem?

Thanks!

I found that the problem is the antialias:


 <match target="font" >
  <edit mode="assign" name="antialias" >
   <bool>true</bool>
  </edit>
 </match>

If I set it to false:


   <bool>false</bool>

then I see the font, but I have no antialias. So the problem is not quite solved. If anyone has any advice on how to proceed, please let me know.

  > man 5 fonts-conf

please note that ~/.fonts.conf is deprecated now. it will not be read by default in the future version.


 > l /etc/fonts/
insgesamt 40
drwxr-xr-x   4 root root  4096 14. Jul 16:54 ./
drwxr-xr-x 145 root root 12288 23. Jul 14:22 ../
drwxr-xr-x   2 root root  4096 14. Jul 15:09 conf.avail/
drwxr-xr-x   2 root root  4096 14. Jul 15:00 conf.d/
-rw-r--r--   1 root root  5879 14. Jul 16:54 disabledfonts.xml
-rw-r--r--   1 root root  2408  1. Jun 2020  fonts.conf
-rw-r--r--   1 root root   152  1. Jun 2020  local.conf
 > 

Reading ‘/etc/fonts/fonts.conf’ points to some things which will change soon –


        <!-- the following element will be removed in the future -->
        <dir>~/.fonts</dir>


        <!-- the following element will be removed in the future -->
        <cachedir>~/.fontconfig</cachedir>

My guess is that, it’s possibly, currently, best to simply rely on “fc-cache --force --really-force” to maintain the behaviour of the system’s installed fonts – you’ll have to use “–verbose” to follow what this command is doing.

  • You need to execute it first from the user “root” to update the system-wide font caches.
  • Then, for each “normal” user, execute it once again to update each user’s private font caches.

[HR][/HR]Please note that, you’re attempting to use rgb sub-pixel ordering to improve the appearance of font glyphs on a LCD screen –

  • Your GUI is probably also doing this – KDE by means of a per user system setting – GNOME, don’t really know: possibly a default per user behaviour.
  • According to he man page, the correct setting is –

       <!--
            use rgb sub-pixel ordering to improve glyph appearance on
            LCD screens.  Changes affecting rendering, but not matching
            should always use target="font".
       -->
       <match target="font">
            <edit name="rgba" mode="assign"><const>rgb</const></edit>
       </match>

The constant assigned should be “rgb” rather than “none” …

  • But, why bother – the GUI you’re using is probably doing this anyway …