Poor default fonts in Firefox
freebsd at edvax.de
Wed Dec 27 16:45:31 UTC 2017
On Wed, 27 Dec 2017 16:09:34 -0000 (UTC), Christian Weisgerber wrote:
> You install a new FreeBSD machine with a graphics display, install
> the xorg and firefox ports on it, all default options, start browsing
> the web... and you see that some sites (e.g. http://www.bbc.com/news)
> are presented with pixelated fonts like something out of the 1990s.
> What do you do?
You install the recommended font packages. :-)
Yes, xorg itself comes with certain fonts, but thpse aren't
really suitable for web browsing. adding the webfonts package
improves visual presentation a lot.
> This affects approximately everybody who uses FreeBSD on a desktop
> or laptop, and it has for years. What's the standard solution, and
> why doesn't this work out of the box?
As nentioned, installing fonts is the solution. The reason
why they aren't there by default is that the web browsers
don't define fonts as a dependency. And don't just consider
the "everyone speaks and writes in English" mentality. If
you visit web pages that have japanese or chinese characters
and symbols, you'd additionally need zh-CJKUnifonts installed.
There is no automatish that does this - except you visit
web pages that download fonts from Google to be used.
By the way, the same applies to office suites. Installing
additional fonts, either via ports, or manually (TT fonts),
is often an improvement.
> The underlying problem is that certain popular font names, "Helvetica",
> "Times", "Courier", are mapped to ancient bitmap fonts by default, e.g.:
> $ fc-match Helvetica
> helvR12-ISO8859-1.pcf.gz: "Helvetica" "Regular"
Yes, this is the common fallback to at least allow the
presentation of the text, but the fonts chosen for this
purpose are usually "basic quality" (read: you can read
them, but they don't look that nice). And considering
the CJK problem again, there is no such mapping, so
what you see is just Klotz Klotz Klotz Klotz. :-)
> My personal solution for the last few years has been to pinch
> OpenBSD's etc/fonts/conf.avail/31-nonmst.conf file...
> ... that maps these font names to DejaVu Sans/Serif/Sans Mono.
> Still, that seems hackish and can hardly be expected from your
> average user.
This isn't needed as soon as the webfonts package has
been installed. And even the DejaVu fonts need to be
installed manually, if I remember correctly.
Depending on what you need, manually installing other
font packages is also suggest. Here is a little selection
from a typical desktop machine, used for web browsing,
office suites, and typesetting:
webfonts <---- important!
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions