Instructions in http://www.mozilla.org/projects/mathml/fonts/ Miss the Point

RESOLVED WORKSFORME

Status

Developer Documentation
General
RESOLVED WORKSFORME
12 years ago
6 years ago

People

(Reporter: John E. Koontz, Unassigned)

Tracking

Details

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MathPlayer 2.0; InfoPath.1; .NET CLR 2.0.50727)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.6) Gecko/20060804 Fedora/1.0.4-0.5.1.fc5 SeaMonkey/1.0.

I was trying to make it possible to browse MathML pages in SeaMonkey and Firefox under Fedora Core 5.  These are Xft-disabled.  I had very little luck with the instructions as formulated, which talk about how to install Type 1 fonts (using apparently obsolete or non-generic tools).  

Instead of trying to tell people how to install the Type 1 fonts for Xft-disabled builds, tell them how to get the Xft-enabled builds (available from mozilla.org) and get the appropriate MathML-supporting True Type fonts installed.  

I took a quick stab at this:

Index: mozilla-org/html/projects/mathml/fonts/index.html
===================================================================
RCS file: /cvsroot/mozilla-org/html/projects/mathml/fonts/index.html,v
retrieving revision 1.29
diff -u -r1.29 index.html
--- mozilla-org/html/projects/mathml/fonts/index.html	27 Oct 2005 05:30:46 -0000	1.29
+++ mozilla-org/html/projects/mathml/fonts/index.html	9 Aug 2006 22:05:56 -0000
@@ -61,6 +61,13 @@
 <A HREF="http://swissnet.ai.mit.edu/projects/intelligent-book/mathml/#gnu">instructions</A>.<br><br>
 </li>
 
+<li>
+The SeaMonkey package (seamonkey-1.0.4-0.5.1.fc5) and Firefox package (firefox-1.5.0.6-2.fc5) in the Fedora Core 5 distribution appear to be <b>Xft-disabled builds</b> (i.e., unable to process True Type fonts).  To resolve this problem your best bet appears to be to obtain the tarball object distributions from the Mozilla site.
+These are <b>Xft-enabled builds</b>.  Then install the MathML font package (mathml-fonts-1.0-21.fc5), the Mathematica 4.1 (this version!) fonts in True Type format (e.g., in /usr/share/fonts/mathematica), and make accessible the symbol font from AdobeReader or OpenWindows (link directory to /usr/share/fonts/...).  There is a good description of the process at <A HREF="http://72.14.203.104/search?q=cache:3jGDIsz_tZAJ:draal.physics.wisc.edu/Notes/MathML+fedora+mozilla+mathml+ttf&hl=en&gl=us&ct=clnk&cd=5.">http://draal.physics.wisc.edu/Notes/MathML</A>.  In each directory run ttmkfdir, mkfontdir, and chkfontpath per the instructions in <A HREF="http://fedora.redhat.com/docs/release-notes/fc4/">the FC4 Release Notes</A>.  
+<br><br>
+</li>
+
+
 <LI> <B>Troubleshooting</B><BR>
 <UL>
 <LI><a href="http://mcelrath.org/Notes/MathML">Linux Xft-enabled builds</a>



Reproducible: Always

Steps to Reproduce:
1.Browse any MathML web page with seamonkey or firefox from FC5.  
2.Search Web extensively, tear hair out, etc.
3.Follow procedure sketched above.
4.Repeat step 1.

Actual Results:  
I made several attempts to install Type1 fonts to fix my problem, without success.  There is not enough currently relevant information to get results.  What in the world is type1inst in http://swissnet.ai.mit.edu/projects/intelligent-book/mathml/#gnu?

When I realized that I could simply replace my Xft-disabled packaged copies of the browsers with Xft-enabled ones tarball versions from Mozilla, I was able to make progress.  

Expected Results:  
Instead of a non-functioning Type 1 PostScript setup for browsing MathML pages, you get a functioning TrueType setup.   

If there is any real interest in this, I can edit together the material cited above.  However, in all honesty I cobbled this together from the work of two other guys as cited.  

The critical observation is "don't try to achieve MathML fonts by messing around trying to make a Type1 setup, instead make a functioning True Type setup and secure browser versions that support it."

Maybe the real question is why are the Fedora packaged versions of Mozilla and Firefox Xft-disabled?  There's a nice funcitoning Xft installation available.
--> mozilla.org :: www.mozilla.org
Component: OS Integration → www.mozilla.org
Product: Firefox → mozilla.org
QA Contact: os.integration → www-mozilla-org
Version: unspecified → other
Um, the firefox certainly has Xft enabled; I suspect SeaMonkey does too.

Comment 3

12 years ago
I think rbs maintains this page, so CCing him.
(Reporter)

Comment 4

12 years ago
(In reply to comment #2)
> Um, the firefox certainly has Xft enabled; I suspect SeaMonkey does too.

Perhaps we are not talking about the same thing?  

Xft is enabled in the tarballs distributed by Mozilla - I have this downloaded for Firefox from the Mozilla site:

firefox-1.5.0.6.tar.gz

and it certainly has Xft enabled.  

However, the Fedora Core 5 packages are:

seamonkey-1.0.4-0.5.1.fc5
firefox-1.5.0.6-2.fc5

When I run these versions and enter the about:buildconfig command I get:

SeaMonkey:
about:buildconfig

Build platform
target
i686-pc-linux-gnu

Build tools
Compiler        Version         Compiler flags
gcc     gcc version 4.1.1 20060525 (Red Hat 4.1.1-1)    -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -Wno-long-long -pedantic -g -pthread -pipe
c++     gcc version 4.1.1 20060525 (Red Hat 4.1.1-1)    -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -pedantic -g -fshort-wchar -pthread -pipe

Configure arguments
--with-system-nspr --with-system-nss --with-system-jpeg --with-system-zlib --with-system-png --with-pthreads --disable-tests --disable-debug --disable-installer '--enable-optimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' --enable-xinerama --enable-default-toolkit=gtk2 --disable-xprint --disable-strip --enable-pango --enable-svg --enable-canvas --enable-extensions=default,irc --enable-application=suite --enable-crypto --prefix=/usr --libdir=/usr/lib --with-default-mozilla-five-home=/usr/lib/seamonkey-1.0.4 --mandir=/usr/share/man

Firefox:
about:buildconfig

Build platform
target
i686-pc-linux-gnu

Build tools
Compiler        Version         Compiler flags
gcc     gcc version 4.1.1 20060525 (Red Hat 4.1.1-1)    -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -Wno-long-long -pedantic -pthread -pipe
c++     gcc version 4.1.1 20060525 (Red Hat 4.1.1-1)    -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -pedantic -fshort-wchar -pthread -pipe

Configure arguments
--enable-application=browser --with-system-nspr --with-system-nss --with-system-jpeg --with-system-zlib --with-system-png --with-pthreads --disable-tests --disable-debug --disable-installer '--enable-optimize=-Os -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' --enable-xinerama --enable-default-toolkit=gtk2 --disable-xprint --disable-strip --enable-pango --enable-system-cairo --enable-svg --enable-canvas --enable-official-branding

So, no Xft enabled in either one - in Fedora Core 5.   

1. --enable-default-toolkit=gtk2 implies a default of --enable-xft (bug 239466)

2. Bugs specific Fedora packages don't belong in this bug system.  "under Fedora Core 5" is a way of describing the environment you're running in; if you're using the Fedora packages you should certainly say that much more explicitly.
(Reporter)

Comment 6

12 years ago
No, you're right.  There's no bug or problem in your software.   However, there there is a bug or policy issue in the Fedora versions of Firefox and SeaMonkey which makes it essential for your Web site to do a good job of explaining things.   At present there is a deficiency.  

The bug (or place for improvement) in the Mozilla web site to which I was drawing Mozilla's attention was not the Xft-ablement status of the Mozilla tar-balls or the Fedora packages per se, but the recommendations of the Mozilla web page http://www.mozilla.org/projects/mathml/fonts/, in the box on the right, dot 4, which reads 

"On Unix/Linux with Xft-disabled builds (i.e., with X11core fonts), you should install the Type1 TeX fonts and Mathematica 4.1 fonts (repeat: 4.1) in PFA and PCF formats. C.f. these instructions."

I contend that this is not the best solution.   The best solution in this case (for Fedora Core 4 and Fedora Core 5) is to install the Xft-enabled distributions of Firefox and SeaMonkey from Mozilla.  I suggest rewording your dot-element like this:  "On Unix/Linux with Xft-disabled builds (i.e., with TrueType font support disabled in the browser), the easiest thing to do is to get an install the Xft-enabled builds from Mozilla ... [continue with text of your own] and then continue as in the case above to set up the necessary TrueType fonts."

I suppose there may be Unix/Linux where this approach will not work, but, as far as I can tell, the instructions for the Type 1 solution do not work in Fedora Core 4 and 5 anyway.  In that case there are three cases - (1) Xft-enabled, (2) Xft-disabled but enablable, and (3) Xft-disabled and not available.  

In that case you need additional logic to determine whether number 2, the "get an Xft-enabled version solution" is the right one, or number 3, the "you're stuck with Type 1 solution."  I don't know what that logic would be, though obviously it depends on the presence of Xft in the X window implementation.  Is that the Debian or SuSE situation?  

FWIW, I gather that Qt can also be used to access TrueType fonts.  Lyx uses Qt to provide TrueType-based MathML support.  

The NIST Mathematical and Computational Sciences Division is nearing completion of the MathML-based Digital Library of Mathematical Functions.  I am not involved in the project, but the existence of NIST mathematicians trying to access the draft version accounts for my somewhat insistant interest in making MathML easy to access.  I am bugging you folks to provide more workable explanations of how to do it generally, bugging Fedora to enable Xft in their packages, and gently suggesting to Wolfram that it would be nice if they provided their fonts in an easy-to-install packaged version, instrumented for Xft.  They do provide them in tar-ed form at 

http://support.wolfram.com/mathematica/systems/unix/general/manualfontdownload.html

which is an improvement on the version Junshik Shin was able to point to in 2003 at https://bugzilla.mozilla.org/show_bug.cgi?id=128153.

I am also bugging at least one fellow with a helpful site on setting things up.  

:-)

Comment 7

12 years ago
John, I am the one to blame for those "instrusctions", having written them. Let me point out that what isn't said in the "instructions" you quoted is that users may have choosen the Xft-disabled builds *intentionally*. (Either by commission, or by ommission - by being content with their default installation.) So you too could be missing the point :-)

In your particular case where such builds are forced on them, yes, we can hint that their particular Linux distro is holding them in the dark ages :-) OK, more seriously, we can gently suggest they get a Xft-enabled build by a pointer back to mozilla.org's builds -- that could just be a sentence to add in the "instructions".

I don't particular favor saying what to do with this or that distro in that page.
Assignee: nobody → rbs
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Reporter)

Comment 8

12 years ago
Thanks for the clarification, rbs.  I did realize from the page language that it was aimed at someone dealing with the source distribution, and I have done such things in the past, but I think most people today will be reading it in a context like my present one - looking for an easy fix in terms of standard, pre-compiled, plug-in stuff.  

In addition, I think most will not be familiar with a wide range of Linux distributions.  I am pretty limited in that respect, for example.  People like this - like me - will be thrown for a loop when the commands suggested for installation don't exist in their distribution.  They won't know how to install fonts, however, so they'll need some advice.  

You're quite right that it would be better not to mention particular distributions.  But I don't know my way around the Linux and Linux font management jungle well enough to put it more suitably.  Perhaps it depends on the version of X.   

It seems to me that there are two layers of problems.  The outer layer is access to the fonts.  What lower level tool does Gecko (?) use to get to fonts in various Linux environment, and what is needed to make that lower level tool see the fonts.   Within this there are three cases:  

* Xft present in distro and enabled in browser (no problem in the outer layer) => proceed to next layer 

* Xft present in distro, but not enabled in browser => get Xft-enabled browser, install, and proceed to next layer 

* Xft not present in distro => need to use another scheme (T1)

I suspect that in all of these cases it might be better - more modular - to recommend consulting the distribution documentation for font installation instructions.  One problem I had was that the commands suggested to install the fonts didn't exist.  

The inner layer problem is that the fonts are theoretically accessible, but not being used.  

* fonts or part of them missing, where to get them?

* fonts present, but not properly installed

In the last case, I recommend telling people to see the font installation instructions for the distro, because these seem to change rapidly and vary widely.  

An example of present, but not installed would be that the Fedora mathml-fonts package doesn't integrate the fonts into Xft.  It just inserts the fonts in /usr/share/fonts.  There they are, but Xft can't see them.  Apparently Qt can, so Lyxz can get to them.  

Anyway, good luck with this.  
(Assignee)

Updated

10 years ago
Product: mozilla.org → Websites

Comment 9

10 years ago
The www.mozilla.org should site no longer host documentation.  If there is still a need for this it should be added to MDC.  Moving to Mozilla Developer Center product for discussion.
Assignee: rbs → nobody
Component: www.mozilla.org → Documentation Requests
Product: Websites → Mozilla Developer Center
QA Contact: www-mozilla-org → doc-request
Version: other → unspecified
Mozilla can no longer be configured with X11 core fonts, so this should no longer be an issue.

(In reply to comment #9)
> The www.mozilla.org should site no longer host documentation.

Hopefully it will be easier to host MathML content on MDC once browsers can parse MathML embedded in HTML5.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → WORKSFORME
(Assignee)

Updated

6 years ago
Component: Documentation Requests → Documentation
Product: Mozilla Developer Network → Mozilla Developer Network
Component: Documentation → General
Product: Mozilla Developer Network → Developer Documentation
You need to log in before you can comment on or make changes to this bug.