Fontconfig warning: remove 'blank' configuration
In the log:
Fontconfig warning: line 145: blank doesn't take any effect anymore. please remove it from your fonts.conf
Quickly skimming fontconfig's changelog one finds:
commit 46b2c62faa64250eec3981ee816e91a9a3dee857 Author: Akira TAGOH akira@tagoh.org Date: Wed Jun 17 16:29:08 2015 +0900
Add a warning for blank in fonts.conf and remove the unnecessary code for parsing blanks
src/fcxml.c | 7 +++++++ 1 file changed, 7 insertions(+)
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- morgan moved from tor-browser#22787 (moved)
moved from tor-browser#22787 (moved)
- cypherpunks added component::applications/tor browser in Legacy / Trac owner::tbb-team in Legacy / Trac parent::18097 in Legacy / Trac priority::medium in Legacy / Trac severity::normal in Legacy / Trac status::new in Legacy / Trac tbb-fingerprinting-fonts in Legacy / Trac type::defect in Legacy / Trac labels
- Developer
I guess we can't remove that part of
fonts.conf
, though, until all distros we support have updated to a more recentfontconfig
?Trac:
Cc: N/A to dcf - Contributor
Here is the upstream commit (2015-06-17): https://cgit.freedesktop.org/fontconfig/commit/?id=46b2c62faa64250eec3981ee816e91a9a3dee857
But before that (2015-02-17), they had removed
<blank></blank>
from the default fonts.conf and made the blanks be hardcoded in the library: https://cgit.freedesktop.org/fontconfig/commit/?id=d6a5cc665a1d7e91332944353e92c83ad114368c https://bugs.freedesktop.org/show_bug.cgi?id=79956I am sure that when I set up fonts.conf for Tor Browser initially, I cargo-culted most of the config from somewhere, including the
<blank>
section. I don't really know what it does.According to fonts.dtd, the
<blank>
section is optional, so I would guess that we can remove it without causing crashes on old versions of fontconfig.But we may have to deal with this as a new fingerprinting vector (whether we remove the
<blank>
or not). If we are using the system fontconfig, and the system fontconfig has a built-in set of blanks that varies across systems (it looks like they update it with new Unicode versions), and it's possible for a web page to detect the difference, then it could be used for fingerprinting.The set of built-in blanks isn't even under version control, because they have a makefile that fetches a list from unicode.org at build time :( So it's likely to be whatever randomly happened to be there when someone built a release.
To test, we could repurpose the fontfp code and replace the list of code points with the unicode.org list. !https://repo.eecs.berkeley.edu/git-anon/users/fifield/fontfp.git
Trac:
Keywords: N/A deleted, tbb-fingerprinting added Collapse replies - Maintainer
Is it of any consequence?
I think there isn't any consequence for those who have a "recent enough" version of fontconfig.
https://cgit.freedesktop.org/fontconfig/commit/?id=d6a5cc665a1d7e91332944353e92c83ad114368c
This commit was included in Fontconfig 2.11.93, released at the beginning of March 2015.
Probably all the distributions we want to support have a more recent version (the very old version of Debian we use to build with high compatibility was released in 2017...).
If we wanted to be extra careful, we could measure the blanks from the list in our
fontconfig.conf
, with and without the section in the file (they should match). - Maintainer
If we wanted to be extra careful, we could measure the blanks from the list in our
fontconfig.conf
, with and without the section in the file (they should match).I wrote a very quick test: test.html.
Be careful, that you might need to run it twice, because Firefox looks up for characters in an async way, and some might be rendered as a tofu initially.
So, removing the
blank
s doesn't seem to change anything (at least after refreshing), but I didn't take into account this part:According to fonts.dtd, the
<blank>
section is optional, so I would guess that we can remove it without causing crashes on old versions of fontconfig.But we may have to deal with this as a new fingerprinting vector (whether we remove the
<blank>
or not). If we are using the system fontconfig, and the system fontconfig has a built-in set of blanks that varies across systems (it looks like they update it with new Unicode versions), and it's possible for a web page to detect the difference, then it could be used for fingerprinting.The set of built-in blanks isn't even under version control, because they have a makefile that fetches a list from unicode.org at build time :( So it's likely to be whatever randomly happened to be there when someone built a release.
So, I dug up another bit, and found 8f4c4d278d013f6cc69ba7d7bf0f8aed11398dfb.
FontConfig completely removed this feature in 2017. That could also explain why I am measuring different sizes and seeing some tofus (I expected to see everything with the same size as a space).
So, I think that for this issue we can indeed drop our blank configuration (2017 is more recent than 2015, but I think we can still do it).
As for providing FontConfig on our own, it would have some advantages, but we'd also like not being dependent on it (tor-browser#41799 (closed)), and have the first line of defense inside the browser.
Anyway, I think we could open a new issue for that.
- Developer
Interesting. Seems to be worth investigating further.
Trac:
Keywords: tbb-fingerprinting deleted, tbb-fingerprinting-fonts added
Severity: Minor to Normal - Developer
Trac:
Parent: N/A to legacy/trac#18097 (moved) - Developer
Nowadays we have systems where we get
line 85: unknown element "blank"
messages. Resolved legacy/trac#28198 (moved) as a duplicate.Trac:
Cc: dcf to dcf, traumschule - Georg Koppen mentioned in issue legacy/trac#28198 (moved)
mentioned in issue legacy/trac#28198 (moved)
- Trac moved from legacy/trac#22787 (moved)
moved from legacy/trac#22787 (moved)
- Trac added Fingerprinting label and removed 1 deleted label
added Fingerprinting label and removed 1 deleted label
Too many warning messages in journalctl due to the same issue, This is an e.g:
+ echo 'May 30 12:19:37 host qubes.StartApp+janondisttorbrowser-dom0[5637]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 12:19:38 host qubes.StartApp+janondisttorbrowser-dom0[5637]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 12:19:38 host qubes.StartApp+janondisttorbrowser-dom0[5637]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 12:19:39 host qubes.StartApp+janondisttorbrowser-dom0[5637]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 12:19:39 host qubes.StartApp+janondisttorbrowser-dom0[5637]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 12:19:39 host qubes.StartApp+janondisttorbrowser-dom0[5637]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 12:19:57 host qubes.StartApp+janondisttorbrowser-dom0[5637]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 12:25:35 host qubes.StartApp+janondisttorbrowser-dom0[5637]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:08:30 host qubes.StartApp+janondisttorbrowser-dom0[5637]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:08:30 host qubes.StartApp+janondisttorbrowser-dom0[5637]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:09:30 host qubes.StartApp+janondisttorbrowser-dom0[7098]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:09:30 host qubes.StartApp+janondisttorbrowser-dom0[7098]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:09:30 host qubes.StartApp+janondisttorbrowser-dom0[7098]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:09:31 host qubes.StartApp+janondisttorbrowser-dom0[7098]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:09:32 host qubes.StartApp+janondisttorbrowser-dom0[7098]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:09:32 host qubes.StartApp+janondisttorbrowser-dom0[7098]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:09:36 host qubes.StartApp+janondisttorbrowser-dom0[7098]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:11:32 host qubes.StartApp+janondisttorbrowser-dom0[7098]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:11:36 host qubes.StartApp+janondisttorbrowser-dom0[7098]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:14:14 host qubes.StartApp+janondisttorbrowser-dom0[7098]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:14:18 host qubes.StartApp+janondisttorbrowser-dom0[7098]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:14:20 host qubes.StartApp+janondisttorbrowser-dom0[7098]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:14:26 host qubes.StartApp+janondisttorbrowser-dom0[7098]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:15:47 host qubes.StartApp+janondisttorbrowser-dom0[7098]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:47:48 host qubes.StartApp+janondisttorbrowser-dom0[8073]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:47:48 host qubes.StartApp+janondisttorbrowser-dom0[8073]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:47:49 host qubes.StartApp+janondisttorbrowser-dom0[8073]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:47:50 host qubes.StartApp+janondisttorbrowser-dom0[8073]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:47:50 host qubes.StartApp+janondisttorbrowser-dom0[8073]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:47:50 host qubes.StartApp+janondisttorbrowser-dom0[8073]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:47:52 host qubes.StartApp+janondisttorbrowser-dom0[8073]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:49:00 host qubes.StartApp+janondisttorbrowser-dom0[8073]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br + IFS= + read -r line + echo 'May 30 20:49:27 host qubes.StartApp+janondisttorbrowser-dom0[8073]: Fontconfig warning: "/home/user/.tb/tor-browser/Browser/TorBrowser/Data/fontconfig/fonts.conf", line 85: unknown element "blank"<br />' + tee -a /tmp/tmp.Z9hSQqbni1/journalctl_warn.txt_br
- morgan changed milestone to %Sponsor 131 - Phase 3 - Major ESR 102 Migration
changed milestone to %Sponsor 131 - Phase 3 - Major ESR 102 Migration
- Gaba added Sponsor 131 label
added Sponsor 131 label