The default bug view has changed. See this FAQ.

mathml rendering is worse on MacOS X after adding Mathematica fonts in 1.3b and later

RESOLVED FIXED

Status

()

Core
MathML
--
major
RESOLVED FIXED
14 years ago
10 years ago

People

(Reporter: Daniel Jamous, Assigned: rbs)

Tracking

({fixed1.8})

Trunk
PowerPC
Mac OS X
fixed1.8
Points:
---
Bug Flags:
blocking1.8b5 +

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(3 attachments)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.3b) Gecko/20030212
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.3b) Gecko/20030212

See screenshot at:

http://web.mit.edu/jamous/www/mathml/mozilla1.3b.gif

on MathML torture test (see URL above), tests 5, 8, 13, 16, 18, 19, 21, and 22
are broken.

This problem has happened in all the Mozilla versions since 1.3 beta.

Reproducible: Always

Steps to Reproduce:
1. get Mozilla version 1.3 beta or any version later
2. go to the MathML torture test at:
http://www.mozilla.org/projects/mathml/demo/texvsmml.xhtml


Actual Results:  
screenshot at:

http://web.mit.edu/jamous/www/mathml/mozilla1.3b.gif

Expected Results:  
give a MathML rendering at least as good as the ones obtained with versions 1.3a
and earlier -- see following screenshot with Mozilla 1.3a:

http://web.mit.edu/jamous/www/mathml/mozilla1.3a.gif

This bug showed up between versions

1.3 alpha and 1.3 beta.
(Assignee)

Comment 1

14 years ago
1.3a was Dec 13 2002, and 1.3b was Feb 10 2003.

Here are the checkins in gfx/src/mac between 1.3a and 1.3b:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=mozilla%2Fgfx%2Fsrc%2Fmac&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=12%2F13%2F2002&maxdate=02%2F10%2F2003&cvsroot=%2Fcvsroot

Observation: Nothing appears to me as suspicious with respect to math fonts.

Here are the checkins in layout/mathml between 1.3a and 1.3b:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=mozilla%2Flayout%2Fmathml&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=12%2F13%2F2002&maxdate=02%2F10%2F2003&cvsroot=%2Fcvsroot

Observation: Nothing appears to me as suspicious with respect to math fonts,
except perhaps bug 191529 -- but this was cross-platform.

Here are all the checkins between 1.3a and 1.3b:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=MozillaTinderboxAll&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2002-12-13+08%3A00&maxdate=2003-02-10+10%3A00&cvsroot=%2Fcvsroot

Observation: There is the complete list of checkins... but nothing hits at the
face as the culprit. I wonder however if it isn't an upshot of alecf's "mac/unix
side of fix for bug 188251".

Cc:ing some mac folks build their own debug builds of mozilla. Help to further
narrow the problem will be appreciated.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 2

14 years ago
> Cc:ing some mac folks build their own debug builds of mozilla.
                       ^
                      who
(Assignee)

Updated

13 years ago
Summary: mathml rendering is worse after adding Mathematica fonts in versions 1.3b and later → mathml rendering is worse on MacOS X after adding Mathematica fonts in 1.3b and later
(Assignee)

Comment 3

13 years ago
Daniel, is the bug still there with the latest nightly build? I am curious if
the patch for bug 120401 has had any unexpected effect here.
(Reporter)

Comment 4

13 years ago
(In reply to comment #3)
> Daniel, is the bug still there with the latest nightly build? I am curious if
> the patch for bug 120401 has had any unexpected effect here.

Hi Roger, yes the bug is still there unfortunately (both on 1.8a and 1.7.2).

Comment 5

12 years ago
*** Bug 257977 has been marked as a duplicate of this bug. ***

Comment 6

12 years ago
Bug is even worse with recent 1.8b2 nightlies. Square-root sign sometimes
completely disappears (in expressions where you have
<msqrt>...<mfrac>...</mfrac>...</msqrt>). Here's a page where you can see both
badly-rendered and disappearing square-root signs:

  http://golem.ph.utexas.edu/~distler/blog/archives/000522.html

If I get the chance, I'll prepare a reduction.

Comment 7

12 years ago
I'm now using Firefox 1.5b.
Comparison of "Contents/MacOS/res/fonts/" between Firefox and Mozilla v1.3a
shows that the file "fontEncoding.properties" is missing in Firefox.
I simply copied that from Mozilla v1.3a. Then my Firefox renders the "Torture
Test" page as fine as Mozilla v1.3a.
Did something go wrong in the "packaging" process?
(Assignee)

Comment 8

12 years ago
> Did something go wrong in the "packaging" process?

Good catch... I can't believe that all this pain that was placed on MathML Mac
users was due to a poor packaging. It can be very damaging (and elusive too),
indeed. See also bug 228992 on non-Mac platforms.
(Assignee)

Comment 9

12 years ago
Make that bug 228922 instead.
(Assignee)

Comment 10

12 years ago
Created attachment 197388 [details] [diff] [review]
tentative patch
Attachment #197388 - Flags: superreview?(sfraser_bugs)
Attachment #197388 - Flags: review?(sfraser_bugs)
(Assignee)

Comment 11

12 years ago
Mac folks, I hope you guys can realise the *urgency* of this patch and give it a
try (I cannot test it it myself since I don't have a Mac build environment). It
 will be (and has been) ridiculous to miss out on Firefox 1.5 due to a mere
packaging issue.

Also important, watch out in bug 190307 too. I hope such an omission doesn't
come back to bite us ever again in Camino as well.
Flags: blocking1.8b5?

Comment 12

12 years ago
I can partially confirm YAMASHITA Makoto's experience.

I installed latest nightly firefox binary (Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:
1.9a1) Gecko/20050925 Firefox/1.6a1), copied the file "fontEncoding.properties" from mozilla 1.2.1 
(the 1.3 alpha binary seemed to be missing?) into the appropriate location, ran the font installer as per 
http://www.mozilla.org/projects/mathml/fonts/, and bingo, the torture test looks much better. e.g. 
square root signs are rendered decently.

However, still some problems: I get a popup message about missing fonts (CMSY10, CMEX10, Symbol), 
and some of the tests don't look great, e.g. #19 and #22 the braces are hugely cropped, all the minus 
signs are missing in #9, generally speaking the italicised lowercase greek letters look weird, and 
sometimes whole rows go missing if I scroll too fast.

I subsequently tried installing the truetype computer modern fonts (copied them into my ~/Library/
Fonts folder), and lots of things got broken... now it only complains that "Symbol" is missing, but all the 
vertical bars are broken (rendered as little boxes) e.g. in #14, #24, and all the spacing is starting to 
look like "HTML equations".

Please excuse me for not having any idea how this whole fonts thing works. I hope this info is helpful.

Comment 13

12 years ago
Looks like bsmedberg broke this.

Updated

12 years ago
Attachment #197388 - Flags: superreview?(sfraser_bugs)
Attachment #197388 - Flags: superreview+
Attachment #197388 - Flags: review?(sfraser_bugs)
Attachment #197388 - Flags: review+

Updated

12 years ago
Flags: blocking1.8b5? → blocking1.8b5+

Comment 14

12 years ago
Created attachment 197497 [details]
rendering with patch and FF build from 9/26/05

Here is a jpeg of the mathml torture test on a build of Firefox from 9/26/05
with the "tentative patch" applied. Looks better, but not perfect. See the
black boxes in row 13.
(Assignee)

Comment 15

12 years ago
Checked-in.

Josh, did you install the fonts at http://www.mozilla.org/projects/mathml/fonts/ ?

This bug was about the worse rendering due to Mathematica fonts. There is a
"sister" bug about the worse rendering due to TeX fonts. That's bug 161137. I am
adding a dependency for ease of cross-link between the two.
Blocks: 161137
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED

Comment 16

12 years ago
When I did my test, I had not installed any fonts that did not come with Mac OS X.

Comment 17

12 years ago
Looks like this didn't get landed on the branch. rbs - can you do that?
(Assignee)

Comment 18

12 years ago
Comment on attachment 197388 [details] [diff] [review]
tentative patch

Asking approval for the 1.8 branch.
Attachment #197388 - Flags: approval1.8b5?

Updated

12 years ago
Attachment #197388 - Flags: review+

Updated

12 years ago
Attachment #197388 - Flags: approval1.8b5? → approval1.8b5+
(Assignee)

Comment 19

12 years ago
Checked in the 1.8 branch.
Keywords: fixed1.8
(Assignee)

Comment 20

12 years ago
I got a feedback saying that fontEnconding.properties wasn't copied in the
res/font directory:

"It is in the gfx/src/mac directory (which is where the patched gfxmac.pkg file
is), just the default build command [make -f client.mk] doesn't link it to the
dist/ build directory.  That is why I'm assuming I'm building it wrong."

Any helpful clues?

Comment 21

12 years ago
I can't build Firefox on my own so this may be irrelevant, but
gfx/src/gtk/Makefile.in and gfx/src/windows/Makefile.in have lines like
libs:: fontEncoding.properties
	$(INSTALL) $^ $(DIST)/bin/res/fonts

install:: fontEncoding.properties
	$(INSTALL) $^ $(DESTDIR)$(mozappdir)/res/fonts
that gfx/src/mac/Makefile.in does not have. Corresponding location in
gfx/src/mac/Makefile.in is around the line 117?

Comment 22

12 years ago
yeah, that's it. I'll upload a patch
(Assignee)

Comment 23

12 years ago
Created attachment 198107 [details] [diff] [review]
fix Makefile.in
Attachment #198107 - Flags: superreview?(sfraser_bugs)
Attachment #198107 - Flags: review?(sfraser_bugs)
Attachment #198107 - Flags: approval1.8b5?
(Assignee)

Comment 24

12 years ago
jshin, as I was poking around, I noted that fontNameMap.properties isn't
packaged too on Windows...

Comment 25

12 years ago
Thanks. I filed bug 310654 for that

Updated

12 years ago
Attachment #198107 - Flags: superreview?(sfraser_bugs)
Attachment #198107 - Flags: superreview+
Attachment #198107 - Flags: review?(sfraser_bugs)
Attachment #198107 - Flags: review+

Comment 26

12 years ago
Comment on attachment 198107 [details] [diff] [review]
fix Makefile.in

please get this in ASAP. Thanks.
Attachment #198107 - Flags: approval1.8b5? → approval1.8b5+

Comment 27

12 years ago
landed on the trunk and 1.8 branch

Comment 28

12 years ago
With Firefox Beta 2 this seems to be working, but I still get the missing fonts (CMSY10, CMEX10, Symbol) 
dialog, which is strange since everything is displayed nicely (from what I can tell). Is this a different bug?
(Assignee)

Comment 29

12 years ago
> which is strange since everything is displayed nicely

It is not strange because just like the letter "a" can be found in several
fonts, so too can the glyphs from the missing fonts found in the Mathematica
fonts. So, no worries. You are not missing anything (on the Mac). You can get
rid of that dialog with a pref.

The issue is subjective. Since beauty is in the eye of the beholder, some people
_prefer_ (and expect...) the look & feel of TeX fonts. Others prefer Mathematica
fonts. Others Don't Care and want things to Just Work (tm). While those leaving
on the bleeding edge are eagerly awaiting the STIX fonts (www.stixfonts.org). 

Here are screenshots of a same page rendered with different stretchy font
settings. These will give you a precise idea why it is academical/subjective,
but still itchy enough for some people to insist on one or the other, just like
one person might prefer Times while another prefers Verdana. That's life.

Default screenshot (if you have all of the fonts...)
http://bugzilla.mozilla.org/showattachment.cgi?attach_id=63751

Mathematica screenshot (if you set the pref to use Mathematica fonts...)
http://bugzilla.mozilla.org/showattachment.cgi?attach_id=63770

TeX screenshot (if you set the pref to use TeX fonts...)
http://bugzilla.mozilla.org/showattachment.cgi?attach_id=63771

For how to set the pref, see the section "Customize the fonts used for stretchy
characters" at http://www.mozilla.org/projects/mathml/fonts/

--------
BTW, there has been a follow-up to fixup the Mac/Mathematica experience and
avoid holes in stretchy characters under certain font sizes. I just fixed that
in bug 311046.

-------
Another BTW. I got a feedback from a happy user asking to pass this message along:

<quote>
You have made my day! There is now at least one cross-platform web browser that
supports MathML.

Please pass on my thanks for all those involved in resolving the problem [this
bug 228804].

Best wishes,

Ian Ferris
Food and Environmental Protection Section
Joint FAO/IAEA Division of Nuclear Techniques in Food and Agriculture
P.O.Box 100, Wagramer Strasse 5
A-1400 Vienna, Austria, European Union

WWW: http://eLearning.iaea.org/ATutor/
     http://www-infocris.iaea.org/
     http://www-naweb.iaea.org/nafa/index.html
</quote>

Comment 30

12 years ago
I am fully convinced yet...

I have an issue with the following saved html:
  http://klein.activemath.org/~paul/tmp/mathml-bothered-by-activemath-css/sin1x_with_activemath_css.xhtml

On Linux, it's showing fine on both firefox 1.5-beta-2 and 1.0.2: one indeed sees a case definition.

On MacOSX, it's showing wrong on firefox 1.5-beta-2: the case definition is showing a kind of enormous blank which is covering much of the rest of the text...

I have the following fonts: Math fonts for Mathematica 4.0 (I wanted 4.1 or 4.2 but they are only available as .exe installers and cabextract can't extract them so I am limited to what MIT installer provides, version 4.0).
As well, I have cmex10.ttf, cmmi10.tff, cmr10.ttf, and cmsy10.ttf.

Another glitch I noted is that some round brackets are turned into "implies" and absolute-values are made as white-black-bordered-rectangles.

I could provide screen shots.

paul
(Assignee)

Comment 31

12 years ago
Just to be sure, try this pref to keep TeX fonts out of the way because they cause problems on the Mac (c.f. bug 161137):

user_pref("font.mathfont-family", "Math1, Math2, Math4");

Also try a latest nightly build that has the fix of bug 311046 (Firefox 1.5b2 suffers from this bug).
(Assignee)

Comment 32

12 years ago
Even safer (on the Mac). To stay clear of bug 161137, which remains mysterious so far, you might as well not install the TeX fonts at all.

But if you absolutely need them for other Mac applications (such as OzTeX or Textures), you should therefore stop them from messing the MathML by removing the TeX font names from the "font-family" property of the "math" element in mathml.css, in addition to setting the font.mathfont-family pref above... 

The "font-family" CSS declaration is for normal (i.e., non stretchy) situations whereas the font.mathfont-family pref is for stretchy characters. So the big picture here is to exclude TeX fonts from all situations (no re-compilation is involved and so it can be advertised to end-users if it works). Let me know if it works indeed.

Comment 33

12 years ago
Well, indeed, the nightly of today fixes the issues that appeared there with the case-definition mtable.

I still see some issues with the brackets being turned into Rightarrow, Leftarrow and the overall impression that the font used in MathML is slightly lower than the font used in the rest of the text. This with or without the line prefs.js.

I'll have to report back on this.

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