Last Comment Bug 118475 - The eagerness of the stretchy code needs to be controlled
: The eagerness of the stretchy code needs to be controlled
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: MathML (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: rbs
: Hixie (not reading bugmail)
: Anthony Jones (:kentuckyfriedtakahe, :k17e)
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2002-01-06 13:18 PST by rbs
Modified: 2002-03-05 19:57 PST (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
example from the GNU Scientific Library manpage (25.14 KB, image/gif)
2002-01-06 13:39 PST, rbs
no flags Details
rendering stretching is set to proceed with Mathematica fonts only (23.97 KB, image/gif)
2002-01-06 19:25 PST, rbs
no flags Details
rendering stretching is set to proceed with TeX fonts only (23.98 KB, image/gif)
2002-01-06 19:26 PST, rbs
no flags Details

Description rbs 2002-01-06 13:18:06 PST
In its eargerness to find the glyph of best size for each particular situation, 
the stretchy code suffers from the drawback that the document as a whole can be 
less agreable. I will attach a screenshot to better illustrate the problem.
Comment 1 rbs 2002-01-06 13:39:11 PST
Created attachment 63751 [details]
example from the GNU Scientific Library manpage

In the above screenshot, the MathML engine has determined that each glyph is
the one with best size in each situation. The problem is that several fonts
come into play, and since these fonts are not designed with the same
characterics, you see what you see.

Possible ways to address the problem:
1. once a character is stretched with a particular font, stick with that font
throughout the entire document
2. parameterize the fonts used during stretching, i.e., stick with a reduced
list, perhaps only one or two fonts
3. parameterize the fonts used for _each_ character

Of these
#1 doesn't look attractive to me (and it might take some precious cycles to
implement right now)

#2 and #3 are already implemented, but the current implementation requires the
user to fiddle with the so-called cryptic MathFont Property Files which do too
many other things that are intimidating.

It might instead be possible to control these particular elements via the pref
system that users are more familiar with, and which can even be exposed via the
UI. However, doing so for #3 is a pain (and it might take some precious cycles
to implement right now). So perhaps, only #2 can be handled via the pref, with
a fallback to wathever is set in the the MathFont Property files.
Comment 2 rbs 2002-01-06 19:25:56 PST
Created attachment 63770 [details]
rendering stretching is set to proceed with Mathematica fonts only
Comment 3 rbs 2002-01-06 19:26:52 PST
Created attachment 63771 [details]
rendering stretching is set to proceed with TeX fonts only
Comment 4 rbs 2002-01-06 19:53:33 PST
Of the two renderings, the one that uses TeX fonts is definitely more pleasant 
to the eyes. Unfortunately, the Mathematica fonts have many glyphs that are not 
in TeX fonts (see http://www.mozilla.org/projects/mathml/fonts/encoding/). So #3 
is probably the most desirable option since it would allow TeX fonts to be used 
as default fonts while other characters could be stretched with other fonts. But 
that would require to enlist all these in the MathFont property Files -- since I 
don't fancy the idea of hardcoding particular fonts in the MathML engine.

Ultimately (dreaming here...), it could be so cool to be able to click on a 
stretchy character to get -> Context Menu -> Properties -> Customize 
stretching... and from there provide the user with a GUI to add/update the 
default properties of the character. With this, a gradual customization of the 
list of properties of each individual character could be possible without having 
to fiddle with the MathFont Property Files explicitly. But again, perhaps just 
biting the bullet and enlisting these chars once for all is what is needed since 
it might require as much effort to build such a GUI.
Comment 5 rbs 2002-01-06 20:40:18 PST
[Hixie & style people, I am not proposing to use the following here since I 
already have a simpler implementation :-) But as I was considering alternative 
ways with which to expose various values via the pref system, I came to the 
thought that it might be possible to have a smooth integration with the style 
system using a nomenclature similar to url("..."). Thus if someone does:

font-family: -moz-pref("aKey", "aDefaultValue");

The Style System could interpret this at parsing time as: fetch the actual 
string to parse from the pref; if it isn't there, fallback to the given default 
string. There are bugs about customizing values that are hardcoded in the CSS 
files throughout the product. Perhaps, something like the above suggestion could 
help, e.g., viewsource.css could be redefined in these terms allowing GUI people 
to provide an interface to customize the viewsource rules. Food for thoughts.]
Comment 6 rbs 2002-01-07 11:01:07 PST
Filed related bug 118600 - parameterize the font used for stretchy characters at 
their base size.
Comment 7 rbs 2002-01-07 19:49:57 PST
Checked in a fix for this, and posted the following message to document how it 
works for users: news://news.mozilla.org/3C3A684A.CEA3878F%40maths.uq.edu.au

Note You need to log in before you can comment on or make changes to this bug.