Closed Bug 121493 Opened 24 years ago Closed 23 years ago

Investigate supporting Mathematica fonts for <msqrt> and <mroot>

Categories

(Core :: MathML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.0.1

People

(Reporter: rbs, Assigned: rbs)

References

()

Details

Attachments

(2 files)

Mathematica fonts have glyphs that can be used to stretch the radical symbol. See the character map: http://www.mozilla.org/projects/mathml/fonts/encoding/math2.gif Currently, the rendering of <msqrt> & <mroot> is only done with TeX fonts. This causes some people who have troubles installing TeX fonts not to see a neat sqrt at all -- even though they have Mathematica fonts. Unfortunately, I haven't got a documentation on how their partial glyphs of the radical are supposed to be used. (In the case of TeX, there are assumptions on these pieces but these are documented, and that's why we support them.) So I am filing this bug to record that it might be possible to support <msqrt> and <mroot> with glyphs from Mathematica fonts as well. This bug is low priority to me since TeX glyphs work fine. Feel free to post any information and/or take the bug if interested.
Got the following information from Neil Soiffer <soiffer@wolfram.com>: > There are two sets of characters to use. From UnicodeFontMapping.tr in the > mathematica distribution: > > 0xF3A6 V 3 (0x8f 0x22 0x24 0x26) 0x29 0x2a 0x00 0x28 # square root > 0xF3A7 H 3 (0x21 0x23 0x25 0x27) 0x2b 0x00 0x00 0x00 # line across top of root > > The first numbers are the private space character points used in Mathematica. > The 'V' means it is vertically stretchy, the 'H' means horizontally stretchy. > The '3' is a font index, and corresponds to Math2. > > The parenthesized numbers refer to various fixed sizes (smaller to larger) of > the characters. Eg, the glyph at 8f together with the glyph at 21 (in Math2) > would be used for something like <msqrt> <mn> 2 </mn> </msqrt>. > > The second set of character positions are used for larger radicals than can > be represented by the largest of the fixed sizes. These can be used to scale > to any size. They represent the repeat piece, the top, middle, and bottom > parts of the character. 0x00 indicates the there is no top, etc. > > These two characters are designed to be used in pairs. Ie, 0x8f and 0x21 > should be used together. The line across the top is designed so that if > both characters are drawn at the same 'y' value, they will align correctly. > A character for drawing across the top is necessary for printing because > printer metrics are not entirely accurate leading to off by a little errors > in connecting the line across the top. For screen drawing, the metrics > you get are accurate, so one can measure the character (for its width and > position) then just draw a line instead of lots of repeats.
At the recent MathML Conference in Chicago, I spoke with the font designer of the Mathematica fonts and he explained what these confusing radical glyphs mean: http://www.mozilla.org/projects/mathml/fonts/encoding/math2.gif In particular, there is a subset that was purposely designed to follow the assumptions that apply to the radical symbol in TeX fonts. Since the stretching code doesn't hard-code fonts/glyphs, it is possible for Mozilla to support the radical with Math2 with virtually no code-level changes (except in the setting of the font for the base-size since bug 118600 isn't yet fixed). I will attach a patch to fix this bug. The benefit is that it will allow default decent MathML rendering on most systems where Mathematica is already installed. Understandably, Wolfram folks have asked me to drive for inclusion of the fix in Nav7 since they wish to make it work fine out-of-the-box with their upcoming webMathematica product.
Status: NEW → ASSIGNED
There is another bit in intl/uconv/ucvmath to enlist the new glyph indices -- but it is an automatically generated binary format and messes everything and it makes the patch looks big when it isn't. I won't bother to attach it. However, I maintain the more friendly ASCII versions on the doc tree, at http://www.mozilla.org/projects/mathml/fonts/encoding/math2.html and the diff for the newly added mapping is simply: Index: math2.html =================================================================== RCS file: /cvsroot/mozilla-org/html/projects/mathml/fonts/encoding/math2.html,v retrieving revision 1.3 diff -u -r1.3 math2.html --- math2.html 19 May 2001 00:53:56 -0000 1.3 +++ math2.html 5 Jul 2002 22:30:28 -0000 @@ -77,13 +77,13 @@ 0x2E 0x221A:? #Square root, radic, Sqrt 0x2F 0x221A:? #Square root, radic, Sqrt - 0x30 0x221A:? #Square root, radic, Sqrt - 0x31 0x221A:? #Square root, radic, Sqrt - 0x32 0x221A:? #Square root, radic, Sqrt - 0x33 0x221A:? #Square root, radic, Sqrt - 0x34 0x221A:? #Square root, radic, Sqrt - 0x35 0x221A:? #Square root, radic, Sqrt - 0x36 0x221A:? #Square root, radic, Sqrt + 0x30 0x221A:0 #Square root, radic, Sqrt + 0x31 0x221A:1 #Square root, radic, Sqrt + 0x32 0x221A:2 #Square root, radic, Sqrt + 0x33 0x221A:3 #Square root, radic, Sqrt + 0x34 0x221A:B #Square root, radic, Sqrt + 0x35 0x221A:G #Square root, radic, Sqrt + 0x36 0x221A:T #Square root, radic, Sqrt 0x37 0x221A:? #Square root, radic, Sqrt 0x38 0x007B:0 #Left curly bracket 0x39 0x007B:1 #Left curly bracket
gisburn/roc/waterson, care to r/sr, whatever combination comes first, thanks!
Keywords: mozilla1.0.1
Summary: Investigate supporting Mathematica fonts for <msqrt> and <mroot> → [PATCH] Investigate supporting Mathematica fonts for <msqrt> and <mroot>
Target Milestone: --- → mozilla1.0.1
Comment on attachment 90345 [details] [diff] [review] patch to fix the bug r=roc+moz This is a bit unreviewable ... but sounds good to me :-)
Probably the current biggest problem with MathML support in Mozilla is font installation, which is not part of the Mozilla install. There are over a million Mathematica users, so with this fix, that's one million less people that need to worry about font installation for MathML support. In addition, with a forthcoming free "font pack" from Wolfram Research, new users will find getting and installing Math fonts easier since they will be able to just grab the Mathematica fonts and not have to worry about installing TeX fonts. I hope this simple fix makes it into other release's beside the main mozilla build (Netscape: hint, hint). Neil Soiffer Wolfram Research
Comment on attachment 90345 [details] [diff] [review] patch to fix the bug sr=waterson
Attachment #90345 - Flags: superreview+
checked in to trunk, have asked approval for the m1.0+ branch.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
please checkin to the 1.0.1 branch. once there, remove the "mozilla1.0.1+" keyword and add the "fixed1.0.1" keyword.
checked in to branch - marking fixed1.0.1
Summary: [PATCH] Investigate supporting Mathematica fonts for <msqrt> and <mroot> → Investigate supporting Mathematica fonts for <msqrt> and <mroot>
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: