The nsIFontMetrics::GetLeading() method is inappropriate. In the CSS world, leading is determined by line-height and font-size (i.e. leading is line-height - font-size). Currently, the MathML engine is the only caller. It is probably calling this method for the wrong reason. Cc'ing Roger.
This is not a layout bug. nsIFontMetrics is gfx and not layout...
I was using GetLeading() as a work around to the lack of other metrics. But now that we have a better GetBoundingMetrics() method, many things are going to change in the MathML world. GetLeading() is going to be removed in the near future. Were you planning to remove GetLeading() anytime soon?
Actually, there is something called "line-height: normal" in CSS. We may want to use the font's recommended leading for this. So let's leave GetLeading in there for now. (I may want to move it to nsIRenderingContext for other reasons later, though.) Re-assigning to myself.
Status: NEW → ASSIGNED
Summary: remove nsIFontMetrics::GetLeading() → implement line-height and leading properly
Target Milestone: M15
Moving all of my M15s to M16. Please add comments if you disagree.
Target Milestone: M15 → M16
We must probably fix bug 27874, "line-height should use em-square height, not bounding box height", before getting rid of nsIFontMetrics::GetLeading(). Marking dependency.
(Oops, I stomped over my own dependency within a minute of making it! Ok, reinstating the bug 27874 dependency...)
I've decided not to get rid of the GetLeading method. Line height will be addressed by 27874, so I'm closing this bug as INVALID.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → INVALID
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.