Closed Bug 46622 Opened 25 years ago Closed 11 years ago

Improve the lookup of fonts for MathML frames

Categories

(Core :: MathML, defect)

x86
Windows 98
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 947654

People

(Reporter: rbs, Unassigned)

Details

Adding this in bugzilla so that it doesn;t get forgotten. ==== Subject: Re: Mathematica Date: 17 Dec 1999 06:29:56 GMT From:rbs@maths.uq.edu.au (Roger B. Sidje) To: Erik van der Poel <erik@netscape.com> CC:mozilla-i18n@mozilla.org, mozilla-mathml@mozilla.org Erik van der Poel wrote: ... > Inside a MathML context (frame, or whatever) it is probably > important to make sure that math fonts are tried first, before trying > other non-math fonts. In HTML/CSS, the way to do this is to specify a > font-family property (or HTML's FONT FACE, which is deprecated or > frowned upon or something). > > font-family: "Times New Roman", serif; > > For MathML, it might be a good idea to invent a new generic font type, > similar to serif, sans-serif and so on. We could call it -moz-math, > similar to the existing -moz-fixed. When we were hacking GFX recently, we made provision for two generic names: -moz-math-symbol (for math symbol fonts), and moz-math-text (for text fonts that look nice when they accompany math symbols). > I recently added some font prefs > code for Windows. It picks up font prefs from the prefs file: > > user_pref("font.name.serif.x-western", "Times New Roman"); > > I suppose you could add a similar preference like this: > > user_pref("font.list.-moz-math", > "Math1,Math2,Math3,Math4,Math5,Symbol"); > > Then you could expand -moz-math to the list when enumerating nsFont's > "name" member. (The place where we populate nsFontMetricsWin's mFonts > member.) This will be cool. > Eventually, you could even add extensibility, so that people could add > their own Unicode converter tables, and associate the tables with font > names. If time permits :-) Isn't this part of the bigger issue of web-fonts? --- RBS Subject: Re: Mathematica Date: 17 Dec 1999 07:05:08 GMT From: erik@netscape.com (Erik van der Poel) To: "Roger B. Sidje" <rbs@maths.uq.edu.au> CC: mozilla-i18n@mozilla.org, mozilla-mathml@mozilla.org "Roger B. Sidje" wrote: > > Erik van der Poel wrote: > > > > Eventually, you could even add extensibility, so that people could add > > their own Unicode converter tables, and associate the tables with font > > names. > > If time permits :-) Isn't this part of the bigger issue of web-fonts? MathML could be done with WebFonts (downloadable fonts), but I was thinking of a person with a math font already on their computer, and simply wanting to use it with Mozilla. Erik
Implementation Notes: Supporting generic -moz-math-symbol is a bit tricky to implement as GFX would need to know that the client is MathML-related. Perhaps, a cleaner way to do this would be to teach the Style System to systematically append the generic -moz-math-symbol on all MathML style contexts belonging to MathML frames. Or even simpler but debatable, could be to ask authors to always end their MathML-related 'font-family: ...' lists with -moz-math-symbol/text :-)
Status: NEW → ASSIGNED
Um, no, we're not doing that last one. :-)
A possible plan of action to fix this might be to leverage on the work done in bug bug 116030 which allowed detecting of the language group of a character to pick better fallback fonts. This onlt works on Windows at present. 1. Add a fictional language group: x-moz-math, and set prefs such as user_pref("font.name-list.*.x-moz-math", "Math1,Math2,Math3,Math4,Math5,Symbol"); 2. Extend the language group detector (bug 116030, bug 184848) so that it maps math characters/symbols to x-moz-math.
QA Contact: ian → mathml
Assignee: rbs → nobody
Priority: P3 → --
This is a mass change. Every comment has "assigned-to-new" in it. I didn't look through the bugs, so I'm sorry if I change a bug which shouldn't be changed. But I guess these bugs are just bugs that were once assigned and people forgot to change the Status back when unassigning.
Status: ASSIGNED → NEW
This would provide a means for users to specify their preferred maths fonts while also providing reasonable fallback when documents specify fonts.
I'm marking this a duplicate of bug 947654, where we can decide how the math fonts will be selected.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.