Red Hat Bugzilla – Bug 198990
Arabic letters are always displayed disjoined
Last modified: 2007-11-30 17:11:37 EST
Description of problem:
Arabic letters in some fonts are not joined as they should. Firefox 18.104.22.168 from
mozilla.org displays same pages correctly.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Open ar.wikipedia.org/wiki
Created attachment 132483 [details]
page as displayed in FC5 firefox
Created attachment 132484 [details]
Same page as displayed (correctly) in firefox by mozilla.org
I believe this is really a pango bug, rather than a firefox bug. gedit shows the
same behavior. (gedit-2.14.3-1, pango-1.12.3-1)
You are probably right, other applications have same problem. I'll change the
Shaping of Arabic words can be forced in Firefox by placing the arabic text in a
span which has a style with the attribute: "font-variant: small-caps"
I have no idea why this works, but perhaps it causes pango to switch font
families, to one for which word shaping has been activated. The "small-caps"
arabic script looks like a different font, in addition to being shaped.
This in a refression in FC5. I believe may have been introduced by pango 1.12.3,
since it wasn't present when FC5 was released with 1.12.0, however I can't check
this sice you can't revert to 1.12.0 without breaking about a dozen other deps
(cairo, gtk2, ...). Anybody know if this bug is present in the FC6 test releases?
No, firefox and other apps I tried are fine in FC6 test1 with current
development updates. I'll try to rebuild its pango for FC5 and see if it is better.
I rebuilt pango and cairo (requirement) on FC5, but it did't solve the problem
neither in firefox nor in other apps.
Yes, this is the most annoying problem with Fedora for me too.
There are a few points here, all adding up and causig what you see:
1) Lack of good Arabic fonts AND existance of some fonts (Japanese I guess) in
Fedora that include broken Arabic section. Most probably Arabic glyphs but no
OpenType tables for them.
2) Fedora's Firefox has Pango enabled.
3) Pango doesn't render Arabic fonts without OpenType tables correctly, and we
don't see enough reason to fix that.
4) There was this other bug in Pango+Firefox that justified Arabic text was
not shaped. That is probably fixed by now, but you /may/ be hitting that too.
So, solutions as I see:
1) Include proper Arabic fonts in Fedora. That probably happens in the FC7
timeframe by adopting the FarsiWeb fonts.
2) Chop Arabic glyphs from any other font in Fedora.
3) Fontconfig also is going to add support for blacklisting certain glyphs in
fonts. This can be done instead or in excess of 2).
4) Make Pango render Arabic fonts without OpenType tables. We have a bug open
about it but I don't see myself doing that anytime soon. Not for FC6 definitely.
So, what you can do is to test and figure out which fonts you are using (try
pmap on the firefox process and see which fonts it's got open), and whether your
firefox is using Pango (check the firefox About).
I tried removing Japanese fonts by doing rpm -e fonts-japapnese and restarting
xfs, but that didn't seem to change anything. Not only are the Arabic words
still not shaped, but Japanese text still displays. Is there a way I can
determine which fonts are advertising the Arabic section, and therefor might be
Also, it seems like all of the conditions that you list (bad and broken fonts,
pango and OpenType, justification) have been long standing, and yet shaping
worked for me not too long ago, with a fresh install of FC5. What has changed
between now and then to break it?
I don't have and never had japanese-fonts installed, but still see the problem.
Also, FC6 test handles Arabic correctly with default setup. The only difference
with font setup between my FC5 and FC6 installations is that I copied windows
fonts to FC5 but not FC6.
As I said, you should do "pmap `/sbin/pidof firefox-bin` and for example paste
the output here.
Created attachment 133560 [details]
pmap <pid of firefox-bin>
Output of pmap on the firefox process. pango-arabic-fc.so is included, but none
of the Kacst fonts are.
(In reply to comment #12)
> Created an attachment (id=133560) 
> pmap <pid of firefox-bin>
> Output of pmap on the firefox process. pango-arabic-fc.so is included, but none
> of the Kacst fonts are.
I suspect the chinese-fonts (uming), but won't be surprised if its the java
ones. Remove them one by one and see which one makes the rendering change.
It seems the java fonts were the key. The japanese and chinese fonts weren't
causing problems, but I had to remove:
in order to get it to display ar.wikipedia.org
The one glitch was that the arabic characters in the title bar were never
shaped. However, the site was usable, and the words in the pages were shaped if
I removed the above fonts.
So, which package do those fonts belong to? Is it Fedora Core java packages?
They are not from a core package. They're from Sun's JRE. I built the RPMS from
the jpackage.org .spec files. See: http://www.fedorafaq.org/#java
So since these fonts are distributed by Sun, there is probably little we can do
about them. Removing them works around most of the Arabic problem, but I don't
know how the JRE will respond to missing fonts.
Would it help if Sun included OpenType tables with their fonts? Can we verify
that this is in fact the problem?
In the long term I guess we'll need one of your other solutions 1-4, but for now
this seems to work.
I cannot thik of any solution at this time either. Blacklisting their fonts is
not going to help.
The upstream bug:
Comment #1 from Behdad Esfahbod (pango developer, points: 23)
2007-09-28 23:42 UTC [reply]
Uninstall broken fonts, or blacklist its arabic range in fontconfig.