After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 481195 - Arabic letters are always displayed disjoined
Arabic letters are always displayed disjoined
Status: RESOLVED WONTFIX
Product: pango
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2007-09-28 08:14 UTC by LingNing Zhang
Modified: 2007-09-28 23:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description LingNing Zhang 2007-09-28 08:14:16 UTC
Please describe the problem:
https://bugzilla.redhat.com/show_bug.cgi?id=198990

Opened by Pavel Rosenboim (pavel1r@gmail.com)  	 on 2006-07-15 07:47 EST  	[reply]  	   Private

Description of problem:
Arabic letters in some fonts are not joined as they should. Firefox 1.5.0.4 from
mozilla.org displays same pages correctly.

Version-Release number of selected component (if applicable):
firefox-1.5.0.4-1.2.fc5

How reproducible:
Always

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


Expected results:


Additional info:


Comment #1 From Pavel Rosenboim (pavel1r@gmail.com) 	on 2006-07-15 07:47 EST 	[reply] 	Private

Created an attachment (id=132483) [edit]
page as displayed in FC5 firefox


Comment #2 From Pavel Rosenboim (pavel1r@gmail.com) 	on 2006-07-15 07:49 EST 	[reply] 	Private

Created an attachment (id=132484) [edit]
Same page as displayed (correctly) in firefox by mozilla.org


Comment #3 From Aaron VanDevender (sig@netdot.net) 	on 2006-07-31 18:11 EST 	[reply] 	Private

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 From Pavel Rosenboim (pavel1r@gmail.com) 	on 2006-08-01 01:46 EST 	[reply] 	Private

You are probably right, other applications have same problem. I'll change the
component.


Comment #5 From Aaron VanDevender (sig@netdot.net) 	on 2006-08-01 12:34 EST 	[reply] 	Private

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 From Pavel Rosenboim (pavel1r@gmail.com) 	on 2006-08-01 14:30 EST 	[reply] 	Private

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 From Pavel Rosenboim (pavel1r@gmail.com) 	on 2006-08-02 13:04 EST 	[reply] 	Private

I rebuilt pango and cairo (requirement) on FC5, but it did't solve the problem
neither in firefox nor in other apps.


Comment #8 From Behdad Esfahbod (besfahbo@redhat.com) 	on 2006-08-02 13:12 EST 	[reply] 	Private

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 From Aaron VanDevender (sig@netdot.net) 	on 2006-08-02 15:10 EST 	[reply] 	Private

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
broken?

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 From Pavel Rosenboim (pavel1r@gmail.com) 	on 2006-08-02 15:23 EST 	[reply] 	Private

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 From Behdad Esfahbod (besfahbo@redhat.com) 	on 2006-08-02 20:30 EST 	[reply] 	Private

As I said, you should do "pmap `/sbin/pidof firefox-bin` and for example paste
the output here.


Comment #12 From Aaron VanDevender (sig@netdot.net) 	on 2006-08-03 10:41 EST 	[reply] 	Private

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.


Comment #13 From Behdad Esfahbod (besfahbo@redhat.com) 	on 2006-08-03 13:52 EST 	[reply] 	Private

(In reply to comment #12)
> Created an attachment (id=133560) [edit] [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.

/usr/share/fonts/chinese/TrueType/uming.ttf
/usr/share/fonts/java/LucidaTypewriterRegular.ttf
/usr/share/fonts/bitmap-fonts/9x15.pcf
/usr/share/fonts/java/LucidaSansRegular.ttf
/usr/share/fonts/java/LucidaSansDemiBold.ttf

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 From Aaron VanDevender (sig@netdot.net) 	on 2006-08-04 01:37 EST 	[reply] 	Private

It seems the java fonts were the key. The japanese and chinese fonts weren't
causing problems, but I had to remove:
/usr/share/fonts/java/LucidaBrightRegular.ttf
/usr/share/fonts/java/LucidaSansRegular.ttf
/usr/share/fonts/java/LucidaTypewriterRegular.ttf
/usr/share/fonts/java/LucidaSansDemiBold.ttf
/usr/share/fonts/java/LucidaTypewriterBold.ttf
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 From Behdad Esfahbod (besfahbo@redhat.com) 	on 2006-08-04 10:25 EST 	[reply] 	Private

So, which package do those fonts belong to?  Is it Fedora Core java packages?


Comment #16 From Aaron VanDevender (sig@netdot.net) 	on 2006-08-04 10:42 EST 	[reply] 	Private

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 From Behdad Esfahbod (besfahbo@redhat.com) 	on 2006-08-04 12:17 EST 	[reply] 	Private

I cannot thik of any solution at this time either.  Blacklisting their fonts is
not going to help.



Steps to reproduce:



Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Behdad Esfahbod 2007-09-28 23:42:15 UTC
Uninstall broken fonts, or blacklist its arabic range in fontconfig.