Closed
Bug 407439
(asana-math)
Opened 17 years ago
Closed 14 years ago
Support for Asana Math font in MathML
Categories
(Core :: MathML, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla7
People
(Reporter: karlt, Assigned: fredw)
References
Details
(Keywords: dev-doc-complete, helpwanted, user-doc-needed)
Attachments
(4 files, 6 obsolete files)
|
16.20 KB,
patch
|
karlt
:
review+
|
Details | Diff | Splinter Review |
|
16.08 KB,
patch
|
Details | Diff | Splinter Review | |
|
6.62 KB,
application/xhtml+xml
|
Details | |
|
4.23 KB,
patch
|
Details | Diff | Splinter Review |
Asana Math is available under the LaTeX Project Public License and "includes
almost all mathematical Unicode symbols".
http://tug.ctan.org/pkg/asana-math
Currently there is a more recent version here:
http://openfontlibrary.org/media/files/asyropoulos/213
It also includes variants sizes and parts for large character construction
similar to Cambria Math and include a MATH OpenType table.
A notable advantage over Cambria Math (as well as the licence) as that Asana
Math provides Unicode Mappings for these variants and parts in the
Supplementary Private Use Area-B (plane 16). This means that we can use a
mathfontAsanaMath.properties file to specify the glyphs (characters), but we
need to add support to nsMathMLChar for non-BMP code points. The appropriate
characters for the properties file can be obtained by viewing the MATH table
variant and construction entries in fontforge and finding the PUA code points
for those glyph ids.
Bug 289938 needs to be fixed for Unicode Plane 1 characters.
This font has no italic nor bold style for alphanumeric characters in plane 0
as they exist at their unique code points in plane 1. To ensure that
<mi>a</mi> is displayed as italic we either need to complete the mathvariant
translation to plane 1 (bug 114365) or we need to ensure that synthetic italic
and bold are functional (e.g. bug 333126).
I've marked severity as enhancement, but it would be nice to get this into 1.9 as we no longer support the TeX Computer Modern fonts, and this font could be a good replacement.
| Reporter | ||
Comment 1•17 years ago
|
||
I hear from the author that the font has been released under the Open Font
License, not the LaTeX Project Public License.
Summary: Support for Asana Math fonts in MathML → Support for Asana Math font in MathML
| Assignee | ||
Updated•15 years ago
|
Keywords: helpwanted
| Assignee | ||
Comment 2•15 years ago
|
||
| Assignee | ||
Comment 3•15 years ago
|
||
| Assignee | ||
Comment 4•15 years ago
|
||
| Assignee | ||
Comment 5•15 years ago
|
||
Assignee: nobody → fred.wang
Status: NEW → ASSIGNED
| Assignee | ||
Updated•15 years ago
|
Attachment #454965 -
Attachment is obsolete: true
| Assignee | ||
Comment 6•14 years ago
|
||
Attachment #465351 -
Attachment is obsolete: true
Attachment #532584 -
Flags: review?(karlt)
| Assignee | ||
Comment 7•14 years ago
|
||
Attachment #454966 -
Attachment is obsolete: true
Attachment #532585 -
Flags: review?(karlt)
| Assignee | ||
Comment 8•14 years ago
|
||
| Assignee | ||
Updated•14 years ago
|
Whiteboard: [needs attachment 469857]
| Reporter | ||
Comment 9•14 years ago
|
||
Comment on attachment 532584 [details] [diff] [review]
Support for non-BMP stretchy operators (V3)
Who's crazy idea was UTF-16?
>+ // Read the next word, if we have a non-BMP character.
No comma here.
>+ if (i < length &&
>+ PRUnichar(0xD800) <= code && code <= PRUnichar(0xDBFF)) {
Use NS_IS_HIGH_SURROGATE.
>- return (ch.code == PRUnichar(0xFFFD)) ? kNullGlyph : ch;
>+ return (ch.code[0] == PRUnichar(0xFFFD) &&
>+ ch.Length() == 1) ? kNullGlyph : ch;
There's no need to check ch.Length() here, right,
because ch.code[0] will always be a high surrogate if Length() == 2?
Attachment #532584 -
Flags: review?(karlt) → review+
| Reporter | ||
Comment 10•14 years ago
|
||
Perhaps it would be more correct to use the comment
"support drawing non-BMP characters for stretchy operators".
(Stretchy operators still need to be in the BMP.)
| Assignee | ||
Comment 11•14 years ago
|
||
Thanks for your review, Karl. I'll attach a new version addressing your comments.
I don't really expect you to check in detail mathfontAsanaMath.properties, but
I'll also provide a dynamic testcase if you want to try the patches. I you test
with STIX and Asana, you can see (at least for the integrals) that we may have
different fonts used. I don't know if it is really a problem, since in general
largeops in a document have the same size and thus use the same font.
| Assignee | ||
Comment 12•14 years ago
|
||
Attachment #532584 -
Attachment is obsolete: true
| Assignee | ||
Comment 13•14 years ago
|
||
| Assignee | ||
Updated•14 years ago
|
Attachment #454969 -
Attachment is obsolete: true
| Assignee | ||
Updated•14 years ago
|
Attachment #532586 -
Flags: review?(karlt)
| Reporter | ||
Comment 14•14 years ago
|
||
Comment on attachment 532585 [details] [diff] [review]
Support for Asana Math (V2)
It looks like U+20D0/U+20D1/U+10ff1a could be used to make long harpoons
U+21BC etc, but those glyphs are designed for accents and so I expect they
would be a little smaller.
Attachment #532585 -
Flags: review?(karlt) → review+
| Reporter | ||
Comment 15•14 years ago
|
||
Comment on attachment 532586 [details] [diff] [review]
Add Asana in preferences (V2)
> pref("font.mathfont-family", "STIXNonUnicode, STIXSizeOneSym, STIXSize1, STIXGeneral, Standard Symbols L, DejaVu Sans, Cambria Math");
>+pref("font.mathfont-family", "STIXNonUnicode, STIXSizeOneSym, STIXSize1, STIXGeneral, Asana Math, Standard Symbols L, DejaVu Sans, Cambria Math");
Just update this to remove the old line.
(In reply to comment #11)
> [If] you test
> with STIX and Asana, you can see (at least for the integrals) that we may
> have different fonts used.
Nice testcase, thanks. I see what you mean. Now that we have your scaling of operators to provide precision in sizing, I expect we can loosen our tolerance for finding a matching font. No need to do that before landing this, but I expect that would also help with the parentheses and braces from STIX fonts where we currently flick between choosing variants and building from parts.
Attachment #532586 -
Flags: review?(karlt) → review+
| Assignee | ||
Comment 16•14 years ago
|
||
(In reply to comment #14)
> Comment on attachment 532585 [details] [diff] [review] [review]
> Support for Asana Math (V2)
>
> It looks like U+20D0/U+20D1/U+10ff1a could be used to make long harpoons
> U+21BC etc, but those glyphs are designed for accents and so I expect they
> would be a little smaller.
I didn't try that, I've just copied what was indicated in the MATH table and commented the entries that are not in the MathML operator dictionary.
| Assignee | ||
Comment 17•14 years ago
|
||
Attachment #532586 -
Attachment is obsolete: true
| Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
| Reporter | ||
Comment 18•14 years ago
|
||
The order of patches for checkin is:
attachment 469857 [details] [diff] [review] (bug 584332)
attachment 532887 [details] [diff] [review]
attachment 532585 [details] [diff] [review]
attachment 539300 [details] [diff] [review]
Comment 19•14 years ago
|
||
Landed on inbound.
Keywords: checkin-needed
Whiteboard: [needs attachment 469857]
Comment 20•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/8ffbdfc7c721
http://hg.mozilla.org/mozilla-central/rev/936c8f2e7085
http://hg.mozilla.org/mozilla-central/rev/40fac958d3c0
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
| Assignee | ||
Comment 21•14 years ago
|
||
We need to update the documentation:
https://developer.mozilla.org/en/Firefox_7_for_developers
https://developer.mozilla.org/en/Mozilla_MathML_Project/Fonts
Keywords: dev-doc-needed,
user-doc-needed
Comment 22•14 years ago
|
||
Updated docs mentioned in comment 21.
I don't think we need more developer doc updates, but feel free to add missing bits. Marking as dev-doc-complete.
Keywords: dev-doc-needed → dev-doc-complete
| Assignee | ||
Updated•13 years ago
|
Alias: asana-math
You need to log in
before you can comment on or make changes to this bug.
Description
•