4.71 KB, image/png
When printing MathML documents, the bars <mfrac/> and <msqrt/> are too thick. I attach a screenshot showing the problem.
I've just tried to display variables of http://mxr.mozilla.org/mozilla-central/source/layout/mathml/nsMathMLFrame.cpp#278 1) Screen ascent: 520 descent: -460 RuleThickness: 60 xHeight: 380 2) Postcript ascent: 560 descent: -400 RuleThickness: 160 xHeight: 400 So the only workaround I've found for now is to fall-back to the former version if aRuleThickness >= xHeight / 3.
Does using CAIRO_HINT_METRICS_OFF here help? http://hg.mozilla.org/mozilla-central/annotate/38929916c6d1/gfx/thebes/src/gfxPangoFonts.cpp#l2529 Maybe we should only use CAIRO_HINT_METRICS_ON when hint_style != CAIRO_HINT_STYLE_NONE. But glyph positions are still snapped to pixels when they are drawn, so it actually makes sense (for ordinary text at least) to have their advances snapped to pixels (which CAIRO_HINT_METRICS_ON will do). If CAIRO_HINT_METRICS_OFF gives better results, this could be used only in the TIGHT_HINTED_OUTLINE_EXTENTS case for GetBoundingMetrics by passing an argument to gfxFcFont::GetOrMakeFont() from a new gfxFcFont::Measure() method. See gfxWindowsFont::Measure(). http://mxr.mozilla.org/mozilla-central/ident?i=TIGHT_HINTED_OUTLINE_EXTENTS
> Does using CAIRO_HINT_METRICS_OFF here help? Yes, the torture test is printed correctly. Compared to comment 1, the values when printing are now: ascent: 505 descent: -460 RuleThickness: 45 xHeight: 378
Whiteboard: [good second bug]
It seems that this works for me now. Karl, are you aware of any changes that could have fixed this bug?
Bug 490475, I expect.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Whiteboard: [good second bug] → [Fixed in bug 490475]
Depends on: 490475
Target Milestone: --- → mozilla2.0b11
You need to log in before you can comment on or make changes to this bug.