Re: Determining font for a given Unicode codepoint

Andrew Cunningham wrote:

> John, would the use of fontconfig on Linux imply that a user could
> control or optimise fallback fonts for Firefox?

Yes, fontconfig is an example of a platform API that's used by user
agents. But it's an exception in that it's customizable in many ways
that normal platform font API's are not.

> Although one issue is the support of languages and scripts not
> supported by system APIs. One of the tasks waiting in my to do list
> is to find a cross browser,  cross platform solutions to displaying
> characters in envirnoments that content could be in any language and
> the site/service has no language tailoring,  eg Facebook,  Twitter,
> Google,  etc.

The key problem here is one of performance. A user agent cannot take
an unlimited amount of time to figure out which font is the best match
for characters in a given script.  Ideally the system would decide
that using data that is cached efficiently but in practice that's
rarely done adequately. So user agents employ all sorts of tricks to
try to match font with characters as quickly as possible.

> And interestingly having the Last Resort font installed on my Ubuntu
> box, and using Firefox to access gmail tends to have interesting
> effects. Font fallback mechanisms like to select the Last Resort
> font for some elements in the GMail UI.

That sounds like a bug, not intended functionality. Please file a bug!

> To the non-initiated font fall back can appear to be random or
> chaotic.

As is all magic. We still live in a world where an author expects a
fontlist containing "arial,helvetica,sans-serif" to cover all scripts
on the planet.

Regards,

John Daggett

Received on Friday, 7 March 2014 07:16:53 UTC