Open Bug 1045263 Opened 6 years ago Updated 4 years ago

<msqrt> rendering excessively stretched with larger expressions with Cambria Math

Categories

(Core :: MathML, defect)

31 Branch
x86_64
Windows 8.1
defect
Not set

Tracking

()

UNCONFIRMED

People

(Reporter: paulmasson, Unassigned)

References

Details

(Keywords: regression)

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0 (Beta/Release)
Build ID: 20140716183446

Steps to reproduce:

Create expressions enclosed in <msqrt> tags:

<math><msqrt><mfrac><mi>a</mi><mi>c</mi></mfrac></msqrt></math>

<math><msqrt><mfrac><mi>A</mi><mi>C</mi></mfrac></msqrt></math>

<math><msqrt><mstyle displaystyle="true">
<mfrac><mi>A</mi><mi>C</mi></mfrac></mstyle></msqrt></math>

<math><msqrt><msubsup><mi>u</mi><mi>x</mi><mn>2</mn></msubsup></msqrt></math>

<math><msqrt><munder><mo movablelimits="false">&sum;</mo><mi>k</mi></munder></msqrt></math>



Actual results:

In all cases the square root symbol is rendered as if there were an extra line of white space underneath the expression. The height of the extra line of white space varies depending on the type of expression. The extra line does not appear for smaller expressions such as <mi>x</mi>, and inexplicably sometimes does not occur for fractions when the square root is accompanied by other factors outside of it.


Expected results:

The square root sign should render at a size appropriate to the enclosed content.
Component: Untriaged → MathML
Product: Firefox → Core
This change was "on purpose" to follow TeX's behavior (https://developer.mozilla.org/en-US/docs/Mozilla/MathML_Project/MathML_Torture_Test ; test 13). See also bug 464592 comment 5 and below.
I can understand progressively stretching the radical for a series of nested square roots, but what I've seeing is the radical almost doubled in size for a single square root: it just doesn't look very good. The stretching is also inconsistent, mostly occurring but sometimes not, which indicates an inconsistency in calculating the size of the enclosed expression.
(In reply to Paul Masson from comment #2)
> I can understand progressively stretching the radical for a series of nested
> square roots, but what I've seeing is the radical almost doubled in size for
> a single square root: it just doesn't look very good. The stretching is also
> inconsistent, mostly occurring but sometimes not, which indicates an
> inconsistency in calculating the size of the enclosed expression.

Yes, I think it seems to be a problem specific to Cambria Math.  As I said on the other bug, XITS seems best for Windows until the ascent/descent bug is fixed with the other fonts. You can also still force the use of old fonts like MathJax fonts for now.

I wonder whether using MathGlyphVariantRecord.AdvanceMeasurement, GlyphPartRecord.FullAdvance and  MathVariants.MinConnectorOverlap would help here.
Hi,

I am new to Mozilla and i found mathml to work with, i work with c++, can someone suggest me some easy to fix bugs which involve c++ in mathml.
Hi Abhishek,

> I am new to Mozilla and i found mathml to work with

Welcome.

> can someone suggest me some easy to fix bugs which involve c++ in mathml.

We run monthly meetings about MathML. This month meeting is starting right now, check https://etherpad.mozilla.org/mathml-2015-04.

Frédéric,

can you help Abhishek?
Flags: needinfo?(fred.wang)
I think he already wanted to work on bug 897065?
Flags: needinfo?(fred.wang)
I can reproduce this issue on Nightly 48.0a1 on Win 8.1.

Given your comment above, is this an issue Mozilla would want to pursue?
Flags: needinfo?(fred.wang)
I think it's a bug specific to Windows / Cambria Math (I'm changing title to reflect that), we can leave it open.

Recommendation is to install Latin Modern Math. See https://developer.mozilla.org/en-US/docs/Mozilla/MathML_Project/Fonts#Windows
Flags: needinfo?(fred.wang)
Summary: <msqrt> rendering excessively stretched with larger expressions → <msqrt> rendering excessively stretched with larger expressions with Cambria Math
You need to log in before you can comment on or make changes to this bug.