Open Bug 1548471 Opened 5 years ago Updated 1 year ago

Remove scriptsizemultiplier and scriptminsize

Categories

(Core :: MathML, task)

task

Tracking

()

People

(Reporter: emilio, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: dev-doc-needed, site-compat)

See the URL for the discussion.

Type: defect → enhancement
See Also: → 1187682
Keywords: site-compat
Type: enhancement → task
See Also: → 1667090
Depends on: 1667719

As a first step, I'm opening bug 1667719 to disable parsing for these two attributes.

However, the default effect of scriptminsize (8pt per MathML3) is a bit more tricky to remove. This is already known, but I'm rewriting this here for the record.

Currently, a minimum font size is handled by two things:

self.handle_mathml_scriptlevel_if_needed();
self.constrain_font_size_if_needed()

font.minimum-size.x-math = 0 so the second function has no effect. We could use set it to 8pt, which would avoid font-size to scale down indefinitely for deep nested math expressions like

<msup><mn>1</mn><msup><mn>2</mn><msup><mn>3</mn>...<msup><mn>10</mn><mn>11</mn></msup>...</msup></msup></msup>

However, this does not exactly has the same effect as scriptminsize. First, MathML3 says the (deprecated) mathsize attribute could still set the size lower to scriptminsize, but I think we don't care about that case. The issue is for things like

<msup><mn>1</mn><msup><mn>2</mn><msup><mn>3</mn>...<msup scriptlevel="0"><mn>10</mn><mn>11</mn></msup>...</msup></msup></msup>

where scaling back to math-level 0 require the unconstrained size.

Perhaps one solution to address the scriptminsize problem is to say that automatic math-level change due to the add() function cannot exceed a small value like 2 or 4 (AFAIK, TeX and OpenType MATH only have levels 0, 1, 2). For a default scriptsizemultiplier of 0.71 ≈ 1/sqrt(2) this, means the base font-size cannot be divided by more than 2 or 4.

Depends on: 1788637
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.