Page MenuHomePhabricator

IPA is displayed inconsistently in different browsers
Closed, InvalidPublic

Description

I tried reading the article [[Holam]] in the English Wikipedia in different browsers on Windows XP anonymously. This article uses the template {{IPA}}, which displays the text in it as class="IPA".

Class IPA tries to set font-family to "Charis SIL", "Doulos SIL", Gentium, GentiumAlt, "DejaVu Sans", Code2000, "TITUS Cyberbit Basic", "Arial Unicode MS", "Lucida Sans Unicode", "Chrysanthi Unicode". I have Charis, Doulos, Gentium, DejaVu Sans, Code2000, Arial Unicode MS and Lucida Sans Unicode installed. This, however, doesn't work consistently in all browsers. Here are the results that i see:

  • Firefox 3.6.7 - The font is not Charis, but probably Arial or Arial Unicode. The display is partly faulty: the character 'ɡ' after the character 'ˈ', for example in 'ʔesˈɡoʁ", looks like a Greek gamma (this doesn't happen on Windows Vista).
  • Firefox 4 beta 1 - Similar to Firefox 3.6.7, but even worse: The character 'ɡ' looks like it's taken from a completely different font.
  • Windows Internet Explorer 8 - Seems to display IPA correctly using Charis.
  • Opera 10.53 - Doesn't have the "ˈɡ" problem, but the font is not Charis.
  • Google Chrome 5 - Like Opera 10.53.
  • Safari 4.0.5 - The font is not Charis. The 'ɡ' is displayed like in Firefox 4 beta 1, as if it is taken from a different font, but there's no "ˈɡ" problem.

In my vector.css i defined this: ".IPA { font-family: Charis SIL !important; }". If i log in using my username Amire80, i see IPA correctly in the Charis font in all browsers except Opera, which still doesn't show IPA as Charis. Anonymous users, obviously, don't have this fix and most of them probably don't know that they see incorrect characters.

It is possible, of course, that the problem is with browsers and with Windows XP, but it will take time until all browsers are fixed and the font display of Windows XP is probably not going to be fixed, even though the OS will probably stay popular for a few more years. Is it possible to fix Wikipedia's CSS to make IPA look better despite these bugs?


Version: unspecified
Severity: normal

Details

Reference
bz24516

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:05 PM
bzimport set Reference to bz24516.
bzimport added a subscriber: Unknown Object (MLST).

Thinking about this again... This is because Windows doesn't have good routines to fallback to other fonts when the default font doesn't contain the glyph needed to render a character. The current .IPA class solves this for IE, but specifically NOT for other browsers, because these browsers also work on other platforms that do not have this problem. Linux has fontconfig, Mac OS has CoreText and Windows sucks :D

So this should be a Windows specific CSS hack, and not an IE specific hack as it is now.

But this is not part of the main software at all, so it doesn't belong in bugzilla.

  1. If you acknowledge that a problem exists, why are you marking it as "invalid"? Windows sucks, but it's still the most popular system.
  1. If it can be fixed as a Windows specific CSS hack - which was my intention in the first place - where can this be reported if not here?

1: Because the problem is not in MediaWiki, it is in the English Wikipedia

2: I'm doing it now.

Changes deployed. Make sure to bypass all your browser caches and try again. (Only works with Javascript enabled, because of javascripted Operating System detection.

Excellent! Thank you! You could have marked it as fixed for all i care.