Theiling Online    Sitemap    Conlang Mailing List HQ   

TECH: IPA/Unicode on different browsers (Was: New Conlang: Terkunan)

From:Henrik Theiling <theiling@...>
Date:Sunday, March 4, 2007, 17:35
Hi!

T. A. McLeay writes:
> Henrik Theiling wrote: > > Jeffrey Jones writes: > >> ... > >> I downloaded and installed Thryomanes 1.1, but it doesn't help if the web page > >> selects a different font. > > > > Hmm. It could be that your browser has an option like 'Always use my > > fonts'. I use that too to view everything with DejaVu. > > > > It could also be that the browser is too old to display Unicode > > correctly. In this case, it will not show you IPA no matter what font > > you install. > > Internet Explorer will not show a character if the current font doesn’t > have one, even if the user has a font installed which does contain that > character. Presumably so it is bugwards compatible with old versions of > Windows that didn’t use Unicode.
*sigh*
> IIRC Wikipedia gets around this by using a CSS class that specifies all > known fonts that contain IPA characters in a special comment that every > browser apart from IE recognises as a comment, but that IE doesn’t. Not > abusing CSS *too* much...
Ah, an interesting ugly hack. I will search for the corresponding style sheet. Thanks for the hint! I found another thing that would be nice for my pages: to switch the Latin I use, since I use macrons (even on 'V') for long vowels, which requires Unicode, too. It would be nice to switch this to circumflexes on older browsers (i.e. V MACRO > U CIRCUMFLEX). So far I failed to display only ISO-8859-1 on browsers that support no Unicode, and display Unicode on those that do. Any CSS solution is welcome. I do not want to use JavaScript for such a hack unless *my* browser displays Unicode (i.e., displaying Unicode requires no JavaScript, since I disabled it). Heuristical solutions would be ok, though, as long as most Unicode-enabled people see IPA and most others don't. Basically, I have two problems: 1) I don't know how to find out whether my IPA and Latin will display correctly, 2) I don't know how to switch from Unicode to ISO-only when the page is loaded. Something I tried: <span class="cxs">:CXS:</span><span class="ipa" title=":IPA:"></span> This displays :CXS: in browsers without style sheets. Then I used a style sheet: .cxs { display: none; } .ipa:after { content: attr(title); } This makes :IPA: replace the :CXS: in CSS-enabled browsers. Works fine for my Galeon (Mozilla engine), Dillo, and probably Netscape 4.7x (disabled Javascript). Unfortunately, this hides the text completely for browsers that support CSS Version 1, but not CSS Version 2, which I read are most IE browsers. So this is not good. I could also implement a solution that displays CXS only on non-IE browsers by using some CSS hacks, but that would be too restrictive, too. **Henrik