Re: Rendering primes: <msup><mi>x</mi><mo>&#x2032;</mo></msup>

Karl Tomlinson <[email protected]>
Newsgroups gmane.comp.mozilla.devel.mathml
Message-ID <[email protected]>
On Thu, 26 Jun 2008 19:11:35 +0200, [email protected] wrote:

> Using
> the above markup, it is thus rendered too small and too high above the
> baseline. (To see what I mean, point your out-of-the-box,
> STIXBeta-powered Firefox3 to
> http://www.w3.org/Math/testsuite/mml2-testsuite/Topics/Primes/primes1.xml
> and compare the first x-prime to its sample rendering.)

[email protected] writes:

> It seems to me that a clean and simple solution would be for a
> renderer to create private glyphs from pre-scripted glyphs by applying
> the inverse scripting transform (which should not require any
> knowledge beyond that already needed for the forward transform), and
> then blindly substitute these for the originals.

> Mozilla folks: what do you think? Shall I open a bug with the above
> suggestion for a fix?

Yes, please do file a bug.
I'm not yet clear on the best solution though.

If this situation can be detected/distinguished, the inverse of
the scale component of the script transformation is moderately
easy to perform, but complicated due to the fact that
scriptsizemultiplier can vary from element to element.  (Maybe
this corner case is not so important.)

The translation component needs to be considered also.  This could
be done either by

* making the pseudoscripts centered operators

  This would not give expected results in the
  <mi>x</mi><mo>&prime;</mo> situation.

* positioning the superscript based on its bounds (or the
  intersection of its bounds and the typographic ascent and
  descent of the font)

  I wonder whether there are any non-pseudoscript superscripts
  that would suffer from being positioned according to their
  bounds?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.