mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Fix line height for "normal" line-height styles.
This commit is contained in:
parent
cb36464f06
commit
5038924a1a
1 changed files with 1 additions and 2 deletions
|
@ -797,8 +797,7 @@ impl InlineFlowData {
|
||||||
let text_bounds = run.metrics_for_range(range).bounding_box;
|
let text_bounds = run.metrics_for_range(range).bounding_box;
|
||||||
let em_size = text_bounds.size.height;
|
let em_size = text_bounds.size.height;
|
||||||
let line_height = match cur_box.line_height() {
|
let line_height = match cur_box.line_height() {
|
||||||
// use the font's leading for normal
|
CSSLineHeightNormal => em_size.scale_by(1.14f),
|
||||||
CSSLineHeightNormal => text_box.run.font.metrics.leading,
|
|
||||||
CSSLineHeightNumber(l) => em_size.scale_by(l),
|
CSSLineHeightNumber(l) => em_size.scale_by(l),
|
||||||
CSSLineHeightLength(Em(l)) => em_size.scale_by(l),
|
CSSLineHeightLength(Em(l)) => em_size.scale_by(l),
|
||||||
CSSLineHeightLength(Px(l)) => Au::from_frac_px(l),
|
CSSLineHeightLength(Px(l)) => Au::from_frac_px(l),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue