Gentoo Archives: gentoo-user

From: "»Q«" <boxcars@×××.net>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: Browsers not seeing symbol font
Date: Mon, 06 Apr 2009 02:15:56
Message-Id: 20090405211208.1e4a1d92@bellgrove.remarqs.net
In Reply to: Re: [gentoo-user] Browsers not seeing symbol font by Kevin O'Gorman
1 On Wed, 25 Mar 2009 23:35:41 -0700
2 "Kevin O'Gorman" <kogorman@×××××.com> wrote:
3
4 > > After a bit of Googling, it seems the accepted solution is to use
5 > > HTML entities for those symbols and not try to use the raw
6 > > characters as you are attempting to do.
7 > >
8 > > http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
9 > >
10 > > Does that contain all of the symbols you need? If there are any
11 > > others, you should be able to use the unicode versions.
12 >
13 > Sigh. My stuff is not for a mass audience. I can expect them to
14 > install a font,
15 > and I'd really not like to be fooling with entities that much --
16 > composition is laborious. It's really annoying to me to have a font
17 > on my own system that is inacessable through browser features that
18 > were apparently designed to allow just that.
19 >
20 > And Unicode is a complete mystery to me. I see stuff come in and
21 > display as it should, but as an author it's just something I've never
22 > used. How do you compose such stuff on a standard US-English
23 > keyboard and system?
24 >
25 > I'll do what I have to do, but only when I'm convinced it's the best
26 > alternative.
27
28 An easier alternative (IMO) would be to serve the pages with
29 charset="UTF-8" and compose them as Unicode pages. This way you can
30 just use the raw UTF-8 characters without having to look up entity
31 names. Example: <http://remarqs.net/misc/pi.htm>. To do it that way,
32 you'll need to edit the pages with a UTF-8-capable editor and save
33 them with that encoding, natch.
34
35 The issue you were up against, trying to use a font specification to
36 change one character into another one, just won't work with html. When
37 a browser encounters a character, it should first check to see if it
38 can use the specified font(s) to render it; if it can't be rendered
39 using the specified font(s), the browser must look for a font that
40 contains a glyph for the character and use that font instead.
41
42 In the case where the the specified font is Symbol, there's no glyph
43 for a 'p' in that font, so the browser must use some other font
44 whenever it encounters a 'p'. What it must *not* do is change a 'p' to
45 a 'π'.
46
47 IE has always been broken in this way, and the old Netscape browsers
48 were as well. At the start of the Mozilla project, they did away with
49 this bug. IIRC, before Firefox 3, there was a hackaround to
50 re-introduce the bug by editing some Firefox files, but it's no
51 longer possible to trick Firefox into substituting one character for
52 another. (I don't believe WebKit/KHTML browsers or Opera can be tricked
53 into it either, but I'm not sure.)
54
55 --
56 »Q«
57 Kleeneness is next to Gödelness.