[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How Firefox shows characters missing in font
From: |
David De La Harpe Golden |
Subject: |
Re: How Firefox shows characters missing in font |
Date: |
Sat, 04 Jul 2009 15:21:16 +0100 |
User-agent: |
Mozilla-Thunderbird 2.0.0.22 (X11/20090701) |
Lennart Borgman wrote:
We discussed how to show characters missing in a font a while ago.
Here is an example of how Firefox handles it. It shows four hex digits
in a square.
Note that the SIL Unicode BMP fallback font (consisting of a bunch of
squares with numbers in) is AFAIK free. The apple one with an icon per
script is gratis, but I dunno about its license.
http://scripts.sil.org/CMS/scripts/page.php?site_id=nrsi&item_id=UnicodeBMPFallbackFont
http://www.unicode.org/policies/lastresortfont_eula.html
http://en.wikipedia.org/wiki/Fallback_fon
Trouble is, if you install the SIL fallback font as an ordinary font,
it seems to sometimes "win" in emacs (and possibly elsewhere) when
it shouldn't. And of course emacs doesn't _know_ it's a fallback.
If fallback fonts are supported, they'd need to be special cased in the
emacs code or OS code or both, and emacs IMO would best expose that some
glyphs are supplied are known fallbacks, not real glyphs. i.e. C-u C-x
= 's "display:" should say "no font available, using fallback font
(glyph code) ...", not "by this font (glyph code) ..." without
indicating it was a fallback choice.
I guess on MacOSX specifically the LastResort font is already
special-cased if you use native apis, but I have no idea what emacs on
ns makes of it.
Fallback fonts are of course only one approach to achieve the effect
(with the advantage users who prefer a per-script style could use drop
in a font with the per-script style of fallback glyph instead of the
numbers-in-boxes style as they saw fit) - alternatively, the hex values
could be drawn into the boxes at the emacs or toolkit level like the
boxes currently are, I think firefox uses that approach rather than a
fallback font.
Actually, emacs could of course allow options where it (a) draws empty
boxes as current, (b) draws in hex digits itself, or (c) allows use of a
user-defined/system-supplied special fallback font, of course. Someone
"just" needs to write the code to do all that...