Bug#1023828: fontconfig: Manual fontconfig reconfigure to avoid helvetica bitmap font.

Raúl Sánchez Siles rsanchezs at k-lagan.com
Thu Nov 10 18:29:47 GMT 2022


Package: fontconfig
Version: 2.13.1-4.2
Severity: normal

Dear Maintainer,

TLDR: I needed to manually run dpkg-reconfigure to properly be able to print a github page 
from firefox

I run into trouble when I tried printing from firefox a github page. After some investigation I 
discovered that font-family was resolved to helvetica and that helvetica was a bitmap font in 
my bullseye system (upgraded from buster long time ago).

Before the dpkg-reconfigure, fc-match resolved like this:

```
$ fc-match -s helvetica
helvR12-ISO8859-1.pcf.gz: "Helvetica" "Regular"
helvR12.pcf.gz: "Helvetica" "Regular"
NimbusSans-Regular.otf: "Nimbus Sans" "Regular"
n019003l.pfb: "Nimbus Sans L" "Regular"
texgyreheros-regular.otf: "TeX Gyre Heros" "Regular"
LiberationSans-Regular.ttf: "Liberation Sans" "Regular"
...
```

After this I manually run `sudo dpkg-reconfigure fontconfig fontconfig-config` and I 
remember one of the options was related to bitmap fonts. These are the debconf values 
now:

Name: fontconfig/enable_bitmaps
Template: fontconfig/enable_bitmaps
Value: false
Owners: fontconfig-config
Flags: seen

Name: fontconfig/hinting_style
Template: fontconfig/hinting_style
Value: hintslight
Owners: fontconfig-config
Flags: seen

Name: fontconfig/hinting_type
Template: fontconfig/hinting_type
Value: Native
Owners: fontconfig-config
Flags: seen

Name: fontconfig/subpixel_rendering
Template: fontconfig/subpixel_rendering
Value: Automatic
Owners: fontconfig-config
Flags: seen

After this, fc-match resolves like this:
```
$ fc-match -s helvetica                             
NimbusSans-Regular.otf: "Nimbus Sans" "Regular"
n019003l.pfb: "Nimbus Sans L" "Regular"
texgyreheros-regular.otf: "TeX Gyre Heros" "Regular"
LiberationSans-Regular.ttf: "Liberation Sans" "Regular"
LiberationSans-Regular.ttf: "Liberation Sans" "Regular"
DejaVuSans.ttf: "DejaVu Sans" "Book"
DejaVuSans-Bold.ttf: "DejaVu Sans" "Bold"
...
```

Now firefox resolves its font-family `font-family: -apple-system,BlinkMacSystemFont,"Segoe 
UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";` to sans-serif and printing 
to PDF is nice and readable.

I had to learn some things to get to this conclusion and I hope this bug report can make life 
easier for anyone facing a similar problem. I wonder if it is possible to include some kind of fix 
in fontconfig packages in order to avoid the problem.

After taking a look at current reported bugs I found that the following may be related:
* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=783609[1] 
* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776801[2] 

Unfortunately I found these after having solved the problem so I cannot point to them 
directly. If you agree I can merge all these.

Note: On my other laptop running sid, I have not found this problem.

Regards,

-- System Information:
Debian Release: 11.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: armel, i386, arm64

Kernel: Linux 5.19.0-0.deb11.2-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages fontconfig depends on:
ii  fontconfig-config  2.13.1-4.2
ii  libc6              2.31-13+deb11u5
ii  libfontconfig1     2.13.1-4.2
ii  libfreetype6       2.10.4+dfsg-1+deb11u1

fontconfig recommends no packages.

fontconfig suggests no packages.

-- no debconf information
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-freedesktop-maintainers/attachments/20221110/a5800c75/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <http://alioth-lists.debian.net/pipermail/pkg-freedesktop-maintainers/attachments/20221110/a5800c75/attachment.sig>


More information about the Pkg-freedesktop-maintainers mailing list