#8 font issues - sets of capitals

open
nobody
None
5
2008-06-03
2008-04-22
Anonymous
No

Well, I'm back with another font issue. I've been running a lot of tests with JEuclid as part of my project, and overall things are working well (yay). However... JEuclid seems to not be picking up the Mathematica fonts from my system - cutting off three full sets of capital letters that I want to use.

Running on Debian Etch with Gnome 2.14.3, this behavior is the same with FOP 0.94 + JEuclid 3.0.3 and FOP 0.95beta + JEuclid 3.1.0.

I am trying to use the sets of Script Capitals, Double-Struck Capitals and Black-Letter Capitals (aka Fraktur Capitals). All of these are part of Mathematica's Math5 font[1], which is installed and working when I view the characters on my original XHTML page (I'm certain this font is the one handling these characters). However they disappear when converting the FO file to a PDF [Test files attached].

As recommended for MathML, I'm using the Mathematica 4.1 fonts for Xft-enabled builds, which makes up 20 files in my ~/.fonts/ folder[2].

I happen to have STIXgeneral.ttf in the ~/.fonts/ folder as well, and I know that it IS getting picked up properly by JEuclid and used for PDF generation. I've reached the point of scratching my head, wondering why Math5 isn't. Any ideas?

[1] Font table: http://www.mozilla.org/projects/mathml/fonts/encoding/math5.html
[2] Font download: http://www.mozilla.org/projects/mathml/fonts/

Peter Williams
broadway at city-net dot com

Discussion

1 2 3 > >> (Page 1 of 3)
  • test files

     
    Attachments
  • Max Berger
    Max Berger
    2008-04-28

    Logged In: YES
    user_id=99210
    Originator: NO

    Peter,

    don't remember if you where able to build from source. I've just added a new "listfonts" tool to the current trunk (svn) version which lists all fonts detected and available for JEuclid. This may help a great deal. Please try - and if you can't compile let me know, then I'll provide a binary version.

    Max

     
  • Max Berger
    Max Berger
    2008-04-29

    Logged In: YES
    user_id=99210
    Originator: NO

    My fault - fop 0.95beta is not in the repository.. I'll add it (and post back here)

    Max

     
  • Max Berger
    Max Berger
    2008-05-02

    Logged In: YES
    user_id=99210
    Originator: NO

    Peter,

    fop 0.95beta is now in the main repository, so it should compile.
    After compilation, please run
    sh jeuclid/target/appassembler/bin/listfonts
    to show what fonts are available to JEuclid.

    However, there are several other issues at play here:
    - JEuclid did not use the Mathematica fonts for script, double-struck, and fraktur. I've fixed that (rev. 733). However, the Mathematica 4.1 fonts only contain a script font, and no fraktur / double-struck. You may use the ams-fonts (bundled with JEuclid), or the mathematica 5 or 6 fonts.
    - In the sample that you showed, the characters are just inside an mrow, and not inside an mtext, mo, or any other tag which would allow characters to be printed, that's why they are silently ignored, so this is a bug in your mathml (unless I'm missing something in the spec). However, it may be a good idea print text outside of elements rather than ignore it. Or maybe emit a warning?

    Max

     
  • Peter Williams
    Peter Williams
    2008-05-05

    Logged In: YES
    user_id=2074729
    Originator: NO

    Max,

    First, thanks for pointing out the problem in the mathml... I went back and added mo's. This enabled some of the characters (the ones actually included in Unicode 1.1.0) to appear, while the rest show with an error box. This works even as far back as FOP 0.94 with JEuclid 3.0.3. See newly the uploaded files in capitals2.tgz - capitals2.pdf

    I was able to complete a build using rev. 734, and set it up with a new instance of FOP 0.95beta.

    I tried the font files that you suggested: I unpacked the Mathematica 6 fonts, and copied the .ttf's into ~/.fonts (they do appear in 'listfonts'), and I copied ams-fonts-1.0.jar into the FOP lib directory. None of these had any effect on the PDF output, however. The new .tgz includes a text file with the output of listfonts, showing all of these fonts in place... and this was the font setup when I generated capitals2.pdf.

    Are you sure that the Mathematica 4.1 fonts don't have these characters? My installation of these fonts consists of 20 files... four each of Math1*.ttf, Math2*.ttf, Math3*.ttf, Math4*.ttf and Math5*.ttf. If I pull the Math5 files from my system fonts, and leave the others, the characters stop displaying correctly in my browser (eg, on capitals2.xhtml). More specifically, the characters that are extended past standard unicode stop working, and the ones that are in Unicode 1.1.0 (and now show up in the PDF generation) still display. If I put Math5 back in place, all of the characters display correctly.

    All three alphabets are listed in full in the spec for Math5 (see footnote [1] on my original post). Between that and my tests, I do still think that this subset of the Mathematica 4.1 fonts IS where these characters are coming from.

    When you added handling for the Mathematica fonts, did you perhaps only include Math1 through Math4?

    I'll throw one other thing out here, even though I have a feeling it isn't really contributing to this problem. Whenever I run FOP 0.95, I get an error that looks like this:

    WARNING: I/O exception while reading font cache (org.apache.fop.fonts.FontCache; local class incompatible: stream classdesc serialVersionUID = 605232520271754717, local class serialVersionUID = 605232520271754718). Discarding font cache file.

    The error occurs even if there isn't any mathml in the file I'm processing, and when I investigated this before, it seemed to be trivial. But, just in case, there it is.

    Back to you for now... any new thoughts on Mathematica 4.1, or anywhere else these characters could be called from, to work win JEuclid?

    Best,
    Peter

     
  • Peter Williams
    Peter Williams
    2008-05-05

    Logged In: YES
    user_id=2074729
    Originator: NO

    It seems I can't upload more files to this ticket. The new samples are available at:
    http://pillars.che.pitt.edu/LaTeXMathML/capitals2.tgz

    Or I can provide them another way, if desired.

     
  • Max Berger
    Max Berger
    2008-05-10

    • status: open --> pending
     
  • Max Berger
    Max Berger
    2008-05-10

    Logged In: YES
    user_id=99210
    Originator: NO

    Peter,

    your fonts are getting picked up just fine, in this case it should use the script and fraktur fonts from the AMS package and completely ignore Math5.

    I did some more debugging and finally found out that you have broken MathML again :)

    Here is the sample with the fraktur fonts:
    (created with xmllint --encode ascii )
    ---
    <math><mstyle><mstyle mathvariant="fraktur"><mrow><mo>&#61277;</mo><mo>&#61278;<
    /mo><mo>&#8493;</mo><mo>&#61279;</mo><mo>&#61280;</mo><mo>&#61281;</mo><mo>&#612
    82;</mo><mo>&#8460;</mo><mo>&#8465;</mo><mo>&#61283;</mo><mo>&#61284;</mo><mo>&#
    61285;</mo><mo>&#61286;</mo><mo>&#61287;</mo><mo>&#61288;</mo><mo>&#61289;</mo><
    mo>&#61290;</mo><mo>&#8476;</mo><mo>&#61291;</mo><mo>&#61292;</mo><mo>&#61293;</
    mo><mo>&#61294;</mo><mo>&#61295;</mo><mo>&#61296;</mo><mo>&#61297;</mo><mo>&#848
    8;</mo></mrow></mstyle></mstyle></math>
    ---

    converting these to hexadezimal i see that you use, for example character EF5D, which is defined as private use, and therefore not displayed.

    Instead, you should use:
    - either the high math plane (1D4xxx)
    - or you can ignore all those special characters completely: since you use mathvariant="fraktur" all characters should already be shown as fraktur, if possible, e.g.
    <mstyle mathvariant="fraktur"><mo>A</mo></mstyle> should be sufficient.

    hth

    Max

     
  • Peter Williams
    Peter Williams
    2008-05-12

    Logged In: YES
    user_id=2074729
    Originator: NO

    That does fix it... thanks a lot for the help!

    And sorry for the newbie-ish mistakes and questions. I'm as new to MathML as I am to JEuclid. I'm also working with LaTeXMathML, which is actually the source of both of the MathML problems here, the private character sets beyond Unicode, and the missing <mo>'s. I'm making corrections to the LaTeXMathML code to handle these better.

    Thanks again,
    Peter

     
1 2 3 > >> (Page 1 of 3)