Bug 198990 - Arabic letters are always displayed disjoined
Arabic letters are always displayed disjoined
Product: Fedora
Classification: Fedora
Component: pango (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Behdad Esfahbod
Depends On:
  Show dependency treegraph
Reported: 2006-07-15 07:47 EDT by Pavel Rosenboim
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-09-28 23:26:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
page as displayed in FC5 firefox (338.58 KB, image/png)
2006-07-15 07:47 EDT, Pavel Rosenboim
no flags Details
Same page as displayed (correctly) in firefox by mozilla.org (355.28 KB, image/png)
2006-07-15 07:49 EDT, Pavel Rosenboim
no flags Details
pmap <pid of firefox-bin> (20.92 KB, text/plain)
2006-08-03 10:41 EDT, Aaron VanDevender
no flags Details

  None (edit)
Description Pavel Rosenboim 2006-07-15 07:47:26 EDT
Description of problem:
Arabic letters in some fonts are not joined as they should. Firefox from
mozilla.org displays same pages correctly.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Open ar.wikipedia.org/wiki
Actual results:

Expected results:

Additional info:
Comment 1 Pavel Rosenboim 2006-07-15 07:47:26 EDT
Created attachment 132483 [details]
page as displayed in FC5 firefox
Comment 2 Pavel Rosenboim 2006-07-15 07:49:49 EDT
Created attachment 132484 [details]
Same page as displayed (correctly) in firefox by mozilla.org
Comment 3 Aaron VanDevender 2006-07-31 18:11:04 EDT
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)
Comment 4 Pavel Rosenboim 2006-08-01 01:46:35 EDT
You are probably right, other applications have same problem. I'll change the
Comment 5 Aaron VanDevender 2006-08-01 12:34:27 EDT
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?
Comment 6 Pavel Rosenboim 2006-08-01 14:30:56 EDT
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.
Comment 7 Pavel Rosenboim 2006-08-02 13:04:22 EDT
I rebuilt pango and cairo (requirement) on FC5, but it did't solve the problem
neither in firefox nor in other apps.
Comment 8 Behdad Esfahbod 2006-08-02 13:12:27 EDT
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).
Comment 9 Aaron VanDevender 2006-08-02 15:10:43 EDT
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?
Comment 10 Pavel Rosenboim 2006-08-02 15:23:12 EDT
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.
Comment 11 Behdad Esfahbod 2006-08-02 20:30:06 EDT
As I said, you should do "pmap `/sbin/pidof firefox-bin` and for example paste
the output here.
Comment 12 Aaron VanDevender 2006-08-03 10:41:15 EDT
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.
Comment 13 Behdad Esfahbod 2006-08-03 13:52:04 EDT
(In reply to comment #12)
> Created an attachment (id=133560) [edit]
> 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.
Comment 14 Aaron VanDevender 2006-08-04 01:37:03 EDT
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.
Comment 15 Behdad Esfahbod 2006-08-04 10:25:03 EDT
So, which package do those fonts belong to?  Is it Fedora Core java packages?
Comment 16 Aaron VanDevender 2006-08-04 10:42:24 EDT
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.
Comment 17 Behdad Esfahbod 2006-08-04 12:17:32 EDT
I cannot thik of any solution at this time either.  Blacklisting their fonts is
not going to help.
Comment 18 Liang Zhang 2007-09-28 04:22:26 EDT
The upstream bug:
Comment 19 Liang Zhang 2007-09-28 23:24:15 EDT
 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.

Note You need to log in before you can comment on or make changes to this bug.