Closed Bug 20402 Opened 25 years ago Closed 25 years ago

implement line-height and leading properly

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

VERIFIED INVALID

People

(Reporter: erik, Assigned: erik)

Details

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.
Assignee: troy → kmcclusk
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?
Assignee: kmcclusk → erik
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.
Depends on: 27874
No longer depends on: 27874
(Oops, I stomped over my own dependency within a minute of making it! Ok, 
reinstating the bug 27874 dependency...)
Depends on: 27874
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
Closed: 25 years ago
Resolution: --- → INVALID
Ok. VERIFIED.
Status: RESOLVED → VERIFIED
No longer depends on: 27874
You need to log in before you can comment on or make changes to this bug.