Default fonts in Firefox

Ming Hua minghua-list at sbcglobal.net
Thu Sep 29 01:33:43 CDT 2005


On Wed, Sep 28, 2005 at 11:43:48AM +0100, Ian Jackson wrote:
> Ming Hua writes ("Re: Default fonts in Firefox"):
> > Is this by any chance the same problem as Debian bug #299697 [1]?
> 
> It does seem to be closely related.  But I have a few obvious and
> perhaps-stupid questions.

I am by no means an expert on fontconfig, and it is indeed a complicated
piece of software, so I'll talk about what I know.

> As I understand it, fontconfig supply fonts for many purposes, besides
> the display of web pages.  Some of these purposes, including
> typesetting and printing, demand that the font actually used has the
> same metrics as the one the document author intended.

My understanding is that fontconfig receive requests from applications
for a font name (sans, Times, Bitstream Vera Sans Mono, etc.) and
returns a font file
(/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMono.ttf, for
example).  The application that asks for the font, however, is usually
not the end-user application.  I believe for display purpose, it's
libxft that asks for the font.  For printing purpose, I don't know.

> Webpages are not one of these purposes.  A website is not entitled to
> expect that the user's system will have any particular font (or a
> reasonable-looking font with particular metrics).

I would argue it is somehow entitiled to.  After all, Microsoft released
some of its fonts with no charge for exactly this reason.  There are
lots of websites that are designed with some certain fonts, and if you
change the fonts, they are going to look very ugly, such as wraped
lines, image covered texts, etc.  Granted, this is bad web design, and
I've said I would see them as broken websites.  But the reality is that
many websites do so, and HTML allow them to specify the fonts they want,
and since certain fonts are installed on every Windows machine, they
look good on most computers.

> So the font resolution algorithm needs to be different for the case
> when the metrics have to be right (printing etc.) and for the case
> where it is more important to be pretty (web pages).
> 
> Does fontconfig support that distinction ?  If not, then both problems
> cannot be solved correctly with the same fontconfig configuration.

Not that I know of.  And I agree with you that both problems can't be
solved.  However I would argue the display problem is more important, as
people printing documents should know what fonts they are using, and
thery are ways for documents to embed fonts that it uses.  But this is
just my personal opinion.

Ming
2005.09.29



More information about the ubuntu-devel mailing list