The default bug view has changed. See this FAQ.

infinity (∞) and other symbols are rendered as hex boxes in mathml expressions on Windows with STIX fonts.

RESOLVED FIXED in mozilla1.9beta5

Status

()

Core
MathML
P2
normal
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: SamyDagan, Assigned: karlt)

Tracking

Trunk
mozilla1.9beta5
x86
Windows XP
Points:
---
Dependency tree / graph
Bug Flags:
blocking1.9 +
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 1 obsolete attachment)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3pre) Gecko/2008011815 Minefield/3.0b3pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3pre) Gecko/2008011815 Minefield/3.0b3pre

The infinity symbol of a mathml expression is not properly displayed by Minefield on Windows XP with Stix fonts, (but is rendered correctly On Mac OSx).

Reproducible: Always

Steps to Reproduce:
1.Open a xhtml file mathml expression that includes the infinity symbol by Minefield on windows XP machine.
2.The symbol is not properly displayed.
3.
Actual Results:  
Instread of the infinity symbol a square appears with its hexadecimal code (221E).

Expected Results:  
The infinity symbol to be displayed.

The bug appears on wndows XP, but does not appear on Mac OSx.
(Reporter)

Comment 1

9 years ago
Created attachment 297948 [details]
Example of a mathml expression including the infinity symbol.
Component: General → MathML
Product: Firefox → Core
QA Contact: general → mathml
Version: unspecified → Trunk
(Assignee)

Comment 2

9 years ago
There are a few issues here:

1) The default value of the mathvariant attribute on <mi> elements with a
   single character is italic, but this should only cause alphanumeric symbols
   to take italic forms.

   http://www.w3.org/TR/2007/WD-MathML3-20071214/chapter3.html#presm.commatt:

   "By design, the only cases that have an unambiguous interpretation are
   exactly the ones that correspond to SMP Math Alphanumeric Symbol
   characters, which are enumerated in Section 6.5 Mathematical Alphanumeric
   Symbols. The mathvariant values "initial", "tailed", "looped" and
   "stretched" are expected to apply only to Arabic characters. In all other
   cases, it is suggested that renderers ignore the value of the mathvariant
   attribute if it is present."

2) The Italic subfamily of STIXGeneral does not support the infinity
   character.  The Roman subfamily does, but bug 382542 is preventing the
   Roman family from being used for fallback.

3) <mi mathvariant="normal">&#x221E;</mi> shows a glyph for the infinity
   symbol but it is from the wrong font (serif).
Blocks: 114365
Status: UNCONFIRMED → NEW
Depends on: 162405, 382542
Ever confirmed: true
(Assignee)

Comment 3

9 years ago
Created attachment 298152 [details] [diff] [review]
let mathvariant="normal" inherit the document fonts [checked-in]

(Adding an explicit mathvariant="normal" to an <mi> that has default mathvariant="normal" should not change the font.)
Attachment #298152 - Flags: review?(roc)
Attachment #298152 - Flags: superreview+
Attachment #298152 - Flags: review?(roc)
Attachment #298152 - Flags: review+
(Assignee)

Comment 4

9 years ago
Comment on attachment 298152 [details] [diff] [review]
let mathvariant="normal" inherit the document fonts [checked-in]

This would fix issue 3 and its a low risk change.
Attachment #298152 - Flags: approval1.9?

Updated

9 years ago
Flags: in-testsuite?

Updated

9 years ago
Attachment #298152 - Flags: approval1.9? → approval1.9+
(Assignee)

Comment 5

9 years ago
Comment on attachment 298152 [details] [diff] [review]
let mathvariant="normal" inherit the document fonts [checked-in]

checked in with a reftest for issue 3.
Attachment #298152 - Attachment description: let mathvariant="normal" inherit the document fonts → let mathvariant="normal" inherit the document fonts [checked-in]
(Assignee)

Updated

9 years ago
Summary: The infinity symbol (&#x221E;) is not rendered in mathml expressions by Minefield on Windows with Stix fonts. → The infinity symbol (&#x221E;) is rendered as a hex box in mathml expressions on Windows with STIX fonts.
(Assignee)

Updated

9 years ago
Summary: The infinity symbol (&#x221E;) is rendered as a hex box in mathml expressions on Windows with STIX fonts. → The infinity (&#x221E;) and other symbols are rendered as hex boxes in mathml expressions on Windows with STIX fonts.
(Assignee)

Updated

9 years ago
Summary: The infinity (&#x221E;) and other symbols are rendered as hex boxes in mathml expressions on Windows with STIX fonts. → infinity (&#x221E;) and other symbols are rendered as hex boxes in mathml expressions on Windows with STIX fonts.
(Assignee)

Updated

9 years ago
Assignee: nobody → mozbugz
Keywords: relnote
(Assignee)

Comment 6

9 years ago
Either issue 1 or issue 2 (or both) needs to be fixed by FF3.
Depending on how bug 382542 is resolved (for issue 2) we may still need to resolve issue 1.
Flags: blocking1.9?
Priority: -- → P2
(Assignee)

Updated

9 years ago
Whiteboard: [swag:3d]
OK.  +'ing as well, math needs infinity.
Flags: blocking1.9? → blocking1.9+
(Assignee)

Comment 8

9 years ago
Created attachment 309339 [details] [diff] [review]
fix for issue 1 in comment 2

Only change the style of default mathvariant <mi> elements to italic when
there is a corresponding italic Mathematical Alphanumeric Symbol.

Accept non-BMP characters in nsMathMLOperator::LookupInvariantChar.
Update the mathvariant entries in mathfont.properties from PUA characters to
their Plane 1 Unicode assignments.  (Remainder of bug 289938)

The mathvariant strings were generated by saving
http://www.w3.org/TR/2003/REC-MathML2-20031021/italic.html and others as text,
editting sans-serif-bold-italic.txt to remove line wrapping, and running
this command (with the line-wrapping removed):

for file in *.txt; sed -e '0,/^Unicode/d' -e '/^$/,$d' $file | perl -MEncode -wne '$SIG{__WARN__}=sub{warn "$_ ",@_;};($v,$k) = map hex, (split)[0,1]; $k < 0x80 ? print chr $k : printf "\\u%04X", $k; printf "\\u%04x\\u%04x", unpack("n*", encode "utf-16be", chr $v), 0xfffd' > $file:r.string
Attachment #309339 - Flags: review?(roc)
Comment on attachment 309339 [details] [diff] [review]
fix for issue 1 in comment 2

+    if (!(mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::mathvariant_) ||
+          mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::fontstyle_))) {
+      if (!isSingleCharacter) {
+          fontstyle.AssignLiteral("normal");
+      }
+      else if (length == 1 && // BMP
+               !nsMathMLOperators::
+                TransformVariantChar(data[0], eMATHVARIANT_italic).
+                Equals(data)) {
+       // Transformation exists.  Try to make the BMP character look like the
+       // styled character using the style system until bug 114365 is resolved.
+       fontstyle.AssignLiteral("italic");
+      }
+      // else single character but there is no corresponding Math Alphanumeric
+      // Symbol character: "ignore the value of the [default] mathvariant
+      // attribute".
+    }

Not sure what indenting rules you're using here...
Attachment #309339 - Flags: superreview+
Attachment #309339 - Flags: review?(roc)
Attachment #309339 - Flags: review+
(Assignee)

Comment 10

9 years ago
Created attachment 309714 [details] [diff] [review]
fix for issue 1 in comment 2 [checked-in]

(In reply to comment #9)
> Not sure what indenting rules you're using here...

The kind that results when I find tabs in the patch and try to remove them by hand ;)

Added another emacs mode line and updated contributors.
Attachment #309339 - Attachment is obsolete: true
(Assignee)

Comment 11

9 years ago
Comment on attachment 309714 [details] [diff] [review]
fix for issue 1 in comment 2 [checked-in]

checked-in with reftest

http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&branch=HEAD&cvsroot=%2Fcvsroot&date=explicit&mindate=1205633391&maxdate=1205633412&who=karlt%2B%25karlt.net
http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&branch=HEAD&cvsroot=%2Fcvsroot&date=explicit&mindate=1205634355&maxdate=1205634427&who=karlt%2B%25karlt.net
Attachment #309714 - Attachment description: fix for issue 1 in comment 2 → fix for issue 1 in comment 2 [checked-in]
(Assignee)

Comment 12

9 years ago
There could still be some issues if italic style is explicitly applied (bug   	324857) but the normal cases should be fixed.
Blocks: 289938, 324857
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
(Assignee)

Updated

9 years ago
Flags: in-testsuite? → in-testsuite+
Target Milestone: --- → mozilla1.9beta5
(Assignee)

Updated

9 years ago
Keywords: relnote
Whiteboard: [swag:3d]
(Reporter)

Comment 13

9 years ago
I am satisfied. Thanks, Samy
(Assignee)

Comment 14

9 years ago
Thanks for checking.

(In reply to comment #12)
> There could still be some issues if italic style is explicitly applied (bug    
> 324857) but the normal cases should be fixed.

In case anyone is seeing issues, I meant bug 382542 (not 324857).
You need to log in before you can comment on or make changes to this bug.