Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Dec 2017 19:14:45 +0000
From:      Ken Moffat <zarniwhoop@ntlworld.com>
To:        Polytropon <freebsd@edvax.de>
Cc:        Christian Weisgerber <naddy@mips.inka.de>, freebsd-questions@freebsd.org
Subject:   Re: Poor default fonts in Firefox
Message-ID:  <20171227191445.GA11759@milliways.localdomain>
In-Reply-To: <20171227174525.cc1e9047.freebsd@edvax.de>
References:  <slrnp47hdu.189a.naddy@lorvorc.mips.inka.de> <20171227174525.cc1e9047.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Dec 27, 2017 at 05:45:25PM +0100, Polytropon wrote:
> 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.
> 

Actually, the choice of *which* fonts to use is a very personal
matter.  Apart from stylistic differences on certain letters (e.g.
different forms of lowercase 'a', different angles for the bar on
lowercase 'e', different shapes for lowercase 'g', and the
distinctness of digit '1' and letter 'l') there are individual
opinions on how well a particular font looks.

> 
[...]
>  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.

In fact, the situation with japanese, simplified chinese, and
traditional chinese is *complex* : some codepoints are used in all
three writing systems but with different shapes.

Also, fontconfig makes default choices of what to prefer.

> 
> > My personal solution for the last few years has been to pinch
> > OpenBSD's etc/fonts/conf.avail/31-nonmst.conf file...
> > https://cvsweb.openbsd.org/cgi-bin/cvsweb/xenocara/dist/fontconfig/conf.d/31-nonmst.conf?rev=1.1&content-type=text/x-cvsweb-markup
> > ... 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.
> 
For anybody who uses fontconfig, tuning it to match your personal
preferences is the right thing to do.  I got rid of legacy fonts
(bitmap, Type1) from my (linux) systems several years ago, and now
use only TTF and OTF fonts.

But I like to be able to render anything I'm _likely_ to find when
I'm following random links in wikipedia, so I try to cover all
*current* writing systems I'm likely to encounter.  And, pretending
to be a good person, I try to share that knowledge. So:

I have a website detailing TTF and OTF fonts (with libre licenses,
and ignoring fonts that only cover historical writing systems) at
http://www.zarniwhoop.uk/ttf-otf-notes.html - on first viewing, it
might look overwhelming / useless, but IFF you have a PDF viewer you
can follow the link 'Files of dummy text to compare fonts' to
compare lorem ipsum style dummy text in various writing systems and
styles : having too many fonts slows down choosing font(s) when
writing an office document.  The PDF viewer in firefox should be
fine for looking at these files.

Similarly, each font listed in my tables has links for PDFs to show
what glyphs it contains (there might be occasional omissions here,
fontconfig can be a cruel mistress), and to show what languages it
supports (see within 'My Current Process' for *which* languages I
use to test coverage of latin and cyrillic alphabets).

Fontconfig knows about some substitutes for fonts in the latin
alphabet (typographers often consider that Arial is a poor
alternative to Helvetica, some people prefer variations for Times
or Times New Roman).  I've put examples of some of these at
http://www.zarniwhoop.uk/files/PDF-substitutes/

> 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:
> 
[...]

> font-adobe
> font-adobe

I guess you have both 100dpi and 75dpi - do you use both ?  I'm
asking because because I never found a reason to use the 75dpi
version, even when I installed the legacy fonts.

> font-bitstream

Vera ?  DejaVu is a superset of it.  Where my links say that DejaVu
will be the fallback, Vera will be used if that is installed.

And if you can bear to look at something oriented to linux users (I
think everything in these two pages should work on any 'nix system,
although probably not on OSX) I maintain pages in BLFS on:

Tuning Fontconfig -
http://www.linuxfromscratch.org/blfs/view/svn/x/tuning-fontconfig.html
In particular, if you have a multiuser system this details users
with a personal fonts.conf, how fontconfig chooses a font, and
options for hinting and antialiasing (the details of that have
changed in recent years), and how to prevent fontconfig using bitmap
fonts. Also, preferring certain CJK fonts (that part depends on the
language in which the web page claims to be written and is intended
to show HOWTO prefer certain fonts, not as a "do this" example).

TTF and OTF Fonts (a general overview) -
http://www.linuxfromscratch.org/blfs/view/svn/x/TTF-and-OTF-fonts.html

Those links are to the current versions, I think there have been one
or two changes since BLFS's last release.

Hope somebody finds this useful.

ĸen
-- 
Truth, in front of her huge walk-in wardrobe, selected black leather
boots with stiletto heels for such a barefaced truth.
                                     - Unseen Academicals



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171227191445.GA11759>