This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 220145 - (firefox) Pango breaks MathML
(firefox) Pango breaks MathML
Status: CLOSED INSUFFICIENT_DATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: firefox (Show other bugs)
4.4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Christopher Aillon
http://www.mozilla.org/projects/mathm...
firefox3INSUFFICIENT_DATAmassClosing
: Desktop
Depends On: mathml
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-19 03:01 EST by A S Alam
Modified: 2013-07-02 20:42 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-09 09:55:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
screenshot for math (108.30 KB, image/png)
2006-12-19 03:01 EST, A S Alam
no flags Details
image of firefox-1.5.0.8 (102.79 KB, image/png)
2006-12-20 04:34 EST, A S Alam
no flags Details

  None (edit)
Description A S Alam 2006-12-19 03:01:15 EST
+++ This bug was initially created as a clone of Bug #150393 +++

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107
Firefox/1.0

Description of problem:
Install the recommended fonts for MathML
(http://www.mozilla.org/projects/mathml/fonts/)

Compare display with firefox 1.0.1 installed as suggested in
http://fedoranews.org/tchung/firefox

Version-Release number of selected component (if applicable):
firefox-1.0.1-1.3.1, firefox-1.0.1-1.3.2

How reproducible:
Always

Steps to Reproduce:
1. Install the recommended fonts for MathML
(http://www.mozilla.org/projects/mathml/fonts/)
2. Access http://www.mozilla.org/projects/mathml/demo/texvsmml.xhtml or some
other MathML test page


  

Actual Results:  Alignement all wrong

Expected Results:  Compare display with firefox 1.0.1 installed as suggested in
http://fedoranews.org/tchung/firefox

Additional info:

Local fonts for MathML include
Acrobat Reader PS fonts
Mathematica 4.1 tt
LaTeX fonts

This font set works for Mozilla and other Firefox releases. Additional details
if requested.

-- Additional comment from Palhoto@math.ist.utl.pt on 2005-03-24 04:46 EST --
Now it is also present on mozilla-1.7.6-1.3.2 under FC3

It is _not_ present in 
http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7.6/contrib/mozilla-i686-pc-linux-gnu-1.7.6-gtk2+xft.tar.gz

So it seems to be introduced by Fedora packaging

-- Additional comment from Palhoto@math.ist.utl.pt on 2005-03-24 05:11 EST --
I have changed severity to high as this potentially messes up any MathML site
accessed from Fedora.

Screenshots are available at

the good:
http://www.math.ist.utl.pt/~jmatos/CapturaEcra-13.png

the ugly (the latest mozilla-1.7.6-1.3.2):
http://www.math.ist.utl.pt/~jmatos/CapturaEcra-14.png


-- Additional comment from thompsma@jilau1.colorado.edu on 2005-03-28 14:54 EST --
This seems to be due to Pango, as is assumed do to the timing, since it was
enabled default around the beginning of March.  If you run:

> MOZ_DISABLE_PANGO=1 firefox

you can view all the MathML sites correctly (albeit with that annoying Symbol
dialog, i.e., #133709).  A ye olde post here:

http://mail.gnome.org/archives/gtk-i18n-list/2003-February/msg00042.html

seems to say that Pango and MathML (Mango?) don't play nicely.  Another out
there says that Blizzard was working on a corrolary to this problem:

http://lists.gnu.org/archive/html/lilypond-devel/2004-05/msg00084.html

So, I guess you can't have both worlds right now.  I suppose a "Disable Pango if
you want to read math" statement is needed in rather BOLD letters at Moz/Firefox
Fedora pages/release notes.

-- Additional comment from Palhoto@math.ist.utl.pt on 2005-03-28 19:02 EST --
(In reply to comment #3)
> 
> So, I guess you can't have both worlds right now.  I suppose a "Disable Pango if
> you want to read math" statement is needed in rather BOLD letters at Moz/Firefox
> Fedora pages/release notes.

This is an update to a release (FC3) for which MathML support existed so release
notes wouldn't make much sense. Breaking upstream features in an update does not
seem a good policy anyway...

From the point of view someone writing MathML pages this situation is a total
mess. It would be acceptable, but a pain, if one could detect from "Mozilla/5.0
(X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050323 Fedora/1.7.6-1.3.2" that
"This Mozilla MathML rendering has been broken for the sake of pango by your
Linux distribution. Get a copy from mozilla.org". Come on: one can do something
similar with IE with or without MathPlayer but not with Mozilla/Firefox with or
without MathML support?!

If the maintainer ever reads please consider (from the SPEC file I gather it was
not intentional):
-- reinstating MathML support in an update for FC3;
-- making lack of MathML support for FC4 or FC5 and later detectable by dynamic
pages;

or get pango vs. MathML fixed!

-- Additional comment from wtogami@redhat.com on 2005-03-28 19:23 EST --
*** Bug 150398 has been marked as a duplicate of this bug. ***

-- Additional comment from wtogami@redhat.com on 2005-03-28 19:26 EST --
ouch...

-- Additional comment from caillon@redhat.com on 2005-03-28 23:38 EST --
Blizzard!

-- Additional comment from rdieter@math.unl.edu on 2005-09-22 10:49 EST --
Appears to be (kinda) fixed in recent firefox errata, as it seems to enable
pango for only Indic locales.

-- Additional comment from wtogami@redhat.com on 2005-09-22 15:39 EST --
Not sure what you are seeing, but according to caillon this hasn't changed.  You
are either using the RHEL builds or built by someone else.  In any case
disabling pango is not an option for future Fedora, this and other pango firefox
bugs must eventually be fixed.

-- Additional comment from rdieter@math.unl.edu on 2005-09-22 15:41 EST --
Sorry Warren, you're right, I'm on RHEL4.  I guess I kinda assumed (my bad) that
the FC and RHEL builds were the same (or similar) in this respect.

-- Additional comment from thompsma@jilau1.colorado.edu on 2006-03-16 16:33 EST --
Folks, I recently upgraded my FC4 box to Firefox 1.5.  This is the Tummy.com
rebuild for FC4 and for whatever reason, the problem seems to be fixed.  I don't
want to change the status until I have FC5 running, but maybe a FC5beta/Rawhide
runner can check this?

Of course, Bug 133709 is *still* unresolved.  I really, really get annoyed by
that Symbol dialog.

-- Additional comment from jmatos@math.ist.utl.pt on 2006-03-17 06:52 EST --
The problem will only be solved if indic locales and mathml coexist. The
previous poster should check the status of the PANGO lines in (presumably)
/usr/bin/firefox and give a URL for the tummy.com SRPM.

-- Additional comment from thompsma@jilau1.colorado.edu on 2006-03-17 09:41 EST --
Welp, you're right.  The RPM was built off the instructions here: 

https://www.redhat.com/archives/fedora-devel-list/2005-November/msg01244.html

and what do they say to do: remove the Pango/Cairo bits.  Aw nuts, I was hoping
all was well.  Oh well, I guess I'm on the other side of the Mango mess now,
good math, bad languages.  And, of course, it works with some sites that just go
nuts with Fx 1.07 (Iron Sudoku, say).

-- Additional comment from mattdm@mattdm.org on 2006-07-10 19:20 EST --
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.

Thank you!


-- Additional comment from jmatos@math.ist.utl.pt on 2006-07-10 19:31 EST --
The bug is present in FC5. It is not a security issue. I seem to be unable to
change fc3 -> fc5 although I was the original poster.

-- Additional comment from rdieter@math.unl.edu on 2006-07-10 19:58 EST --
retargetting fc5.

-- Additional comment from besfahbo@redhat.com on 2006-08-03 21:07 EST --
Ok, assigning to myself.

There are two issues here:

  1) very wrong spacing
  2) math font is not selected

attaching a patch for the first, with before/after shots.

-- Additional comment from besfahbo@redhat.com on 2006-08-03 21:12 EST --
Created an attachment (id=133599)
Torture test before


-- Additional comment from besfahbo@redhat.com on 2006-08-03 21:14 EST --
Created an attachment (id=133600)
Torture test after


-- Additional comment from besfahbo@redhat.com on 2006-08-03 21:16 EST --
Created an attachment (id=133601)
Spacing patch

After figuring out what's going on, the patch was quite obvious and simple...

-- Additional comment from mclasen@redhat.com on 2006-08-04 09:38 EST --
Nice patch! Just remove the printfs

-- Additional comment from caillon@redhat.com on 2006-08-04 11:33 EST --
They're commented out, but if you think they are useful enough, feel free to
wrap them all in #ifdef MOZ_DEBUG_PANGO and be sure to #undef MOZ_DEBUG_PANGO at
the start of the file.

-- Additional comment from mclasen@redhat.com on 2006-08-04 11:40 EST --
Ah, I had overlooked the comments around the first one

-- Additional comment from besfahbo@redhat.com on 2006-08-04 17:01 EST --
Created an attachment (id=133665)
new patch

A *much* nicer patch to the same effect.  Poor Pango defines all these macros
and functions that firefox doesn't use...

-- Additional comment from besfahbo@redhat.com on 2006-08-22 20:24 EST --
Created an attachment (id=134685)
committed patch

This is the patch that should hit rawhide pretty soon.

-- Additional comment from besfahbo@redhat.com on 2006-08-22 21:53 EST --
Compared to the previous patch, the on in comment 25 uses logical width instead
of ink width.  That's the expected behavior.  It also has a little optimization,
dropping an strlen.

The rest of the MathML was not working simply because Pango was refusing to
choose font/shaper for Private Use characters.  That was a one-line fix.  With
that, it only was not rendering the THIN SPACE character.  That's this bug:

  http://bugzilla.gnome.org/show_bug.cgi?id=145275

I also worked around it by making Pango choose font/shaper for space characters
too.  All this is in Pango 1.14.1 that is in Rawhide already.

With these, I get Pango render the MathML Torture Test exactly like the Xft
backend.  I even changed Pango to use a fixed 96 dpi resolution and got an image
that had only 14 pixel differences with the Xft one, and those are minimal
antialiasing differencing for the letter Pi.  (Attaching all in a minute)  

-- Additional comment from besfahbo@redhat.com on 2006-08-22 22:26 EST --
Created an attachment (id=134687)
Torture test Xft rendering


-- Additional comment from besfahbo@redhat.com on 2006-08-22 22:54 EST --
Created an attachment (id=134688)
Torture test with the patch and Pango 1.4.2, at 96dpi


-- Additional comment from besfahbo@redhat.com on 2006-08-23 15:26 EST --
Ok, filed a few bugs upstream.

Attaching the pango-mathml patch:
https://bugzilla.mozilla.org/show_bug.cgi?id=349904

The no-pangoxft patch that I added to devel:
https://bugzilla.mozilla.org/show_bug.cgi?id=349906

The jagged brackets you see in the screenshots (not specific to Pango):
https://bugzilla.mozilla.org/show_bug.cgi?id=349907



-- Additional comment from besfahbo@redhat.com on 2006-08-26 00:47 EST --
Remove "Pango breaks MathML" from about.xhtml
https://bugzilla.mozilla.org/show_bug.cgi?id=350266

--------------------
Tested with 
firefox-1.5.0.9-0.1.el4
Problem still exist after install latest Math font as mention on
http://www.mozilla.org/projects/mathml/fonts/

attaching screenshot after udating this version
Comment 1 A S Alam 2006-12-19 03:01:16 EST
Created attachment 143981 [details]
screenshot for math
Comment 4 A S Alam 2006-12-20 04:34:59 EST
Created attachment 144081 [details]
image of firefox-1.5.0.8
Comment 5 Matěj Cepl 2008-02-08 15:42:13 EST
Since this bugzilla report was filed, we have seriously upgraded Gecko-related
packages, which may have resolved this issue. Users who have experienced this
problem are encouraged to upgrade their system to the latest version of their
distribution available.

Please, confirm to us that this bug is reproducible on the latest upgrade of the
supported distribution (that's RHEL, or Fedora 7, 8, and Rawhide).

Setting the bug to NEEDINFO. If I won't get confirmation of reproducability in
30 days, the bug will be closed as INSUFFICIENT_DATA.

[This is mass-changing of bugs which seem to be too old and irrelevant anymore;
we are sorry, if this bug should not be incldued.]
Comment 6 Matěj Cepl 2008-04-09 09:55:30 EDT
Since there are insufficient details provided in this report for us to
investigate the issue further, and we have not received feedback to the
information we have requested above, we will assume the problem was not
reproducible, or has been fixed in one of the updates we have released for the
reporter's distribution.

Users who have experienced this problem are encouraged to upgrade to the latest
update of their distribution, and if this issue turns out to still be
reproducible in the latest update, please reopen this bug with additional
information.

Closing as INSUFFICIENT_DATA.

[This is a mass-closing request, if you think that this bug shouldn't be closed,
please, reopen with additional information.]

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