Font display problem

Hello, it’s a fresh Leap 15.2 install with XFCE and when choosing some fonts for the system, which are perfectly displayed in the preview zone, they display as square with character hex number inside when selected.
See attached picture, with for example Adobe Helvetica font.
Any idea how to correct this problem ?

Oups, I can’t post attached pictures !?

Regards,
Cyril

Hi,

To post images, you first need to publish the images on an Internet presence (server or service). Some choose a pastebin like https:/paste.opensuse.org… Or their own Cloud storage with public permissions set for the image like Dropbox, Google Drive, etc. I personally just create a Wiki page (see my signature), when you do so on the first page you create there is an “upload image” link in the navigational pane on the left edge of the page (you don’t have to display on the page, just upload the image). Once the image has been uploaded to an Internet Service, you use the link to that image in the Forum’s “Insert Image.”

I guess the question is whether you used the right tool for your fonts,
But assuming you did, then does the problem happen with any other font sets?

TSU

Thank you :slight_smile:

I use the integrated XFCE tool to choose the system font. Here are the picture :

Font selection work and rendering in the preview zone works (thus the font is here and works !) :

https://en.opensuse.org/images/f/f5/Font_selection.png

But when I click on “OK”, everything is displayed with squares :

https://en.opensuse.org/images/f/f7/Font_rendering.png

That’s crazy because it’s a fresh installation !
Some fonts works in the preview zone but are squares when selected, some fonts are displayed as square in the preview zone but works in the system if activated.

I don’t understand what can be the problem :\

This is bitmap PCF font. Xfce is largely based on Gnome components and is using pango for font rendering; pango stopped supporting bitmap fonts in version 1.44.

The font I want to use comes from file /usr/share/fonts/truetype/Adobe-Helvetica-Regular.otb and package xorg-x11-fonts-converted, it seems to be true type and not PCF font ?

The font is working in the preview zone, which is also rendered by pango probably ?

https://en.opensuse.org/images/1/16/Rendering_zone.png

Also, on my own computer I use tumbleweed, pango is 1.48, and this same font works correctly :open_mouth:

You may want to use this font, but what font is used depends on actual pattern application is using.

bor@10:~> fc-match ":family=Adobe Helvetica:weight=Medium" file
:file=/usr/share/fonts/truetype/Adobe-Helvetica-Regular.otb
bor@10:~> fc-match ":family=Adobe Helvetica:weight=Medium:style=Regular" file
:file=/usr/share/fonts/75dpi/helvR12-ISO8859-1.pcf.gz
bor@10:~> 

The font is working in the preview zone, which is also rendered by pango probably ?

I do not know. Check Xfce sources? But what I see matches exactly the problem I mentioned.

Also, on my own computer I use tumbleweed, pango is 1.48, and this same font works correctly

May be you do not have matching bitmap fonts or font selection rules changed or you are using different application. I have no way to answer what happens on your computer - it is up to you to debug it, you have all the needed information to do it. When I select the same font as you do under Settings - Appearance - Fonts in Xfce on Leap 15.2 I observe the same issue as you and I know that the reason is bitmap font for ASCII character range. This answers your original question.

It could be this change actually

Overview of changes in 1.45.4
=============================
...
- fc: Always reject unsupported font formats
...

which simply ignores PCF fonts as far as I understand.

You can “fix” it under older pango (in 15.2) using e.g. the following fonts.conf snippet:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- $XDG_CONFIG_HOME/fontconfig/fonts.conf for per-user font configuration -->
<fontconfig>


<selectfont>
    <rejectfont>
        <pattern>
            <patelt name="fontformat">
                <string>PCF</string>
            </patelt>
        </pattern>
    </rejectfont>
</selectfont>


</fontconfig>

But honestly, default Noto font looks much better than Adobe Helvetica … :slight_smile:

Of course this will disable PCF everywhere, for any program that is using fontconfig; it is up to you to decide whether this is OK.

Hello,

I removed Leap 15.2 and switched this computer to tumbleweed, the same font (Adobe Helvetica) works like a charm now. I think it’s not a pango version problem because it is 1.48 now, I think there is a bug somewhere in Leap 15.2

Why I want to use this font is because I use it for years, it’s the only font I found which displays perfectly clear characters without anti-aliasing. On small font, other font and even Noto font needs anti-aliasing and it’s ugly for my eyes, it appears like blurry.

Example, with helvetica :

https://en.opensuse.org/images/a/a2/No_antialiasing.png

And with Noto :

https://en.opensuse.org/images/0/08/Antialiasing.png

Depending on your screen maybe the difference is subtle, my for my eyes the difference is huge, it’s clear versus blurry :slight_smile:

What about Arial?

https://software.opensuse.org/package/webcore-fonts
https://software.opensuse.org/package/webcore-fonts-vista

Thank you for your proposition :slight_smile:

I installed these 2 packages, only the “calibri” font is clear without anti-aliasing, but is less beautiful than Adobe Helvetica :slight_smile:
All other font need anti-aliasing to be usable, but in this case appear blurry to my eyes :\