mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:28:12 +00:00
LibWeb: Use more precise font metrics when doing inline layout
We now position inline-level boxes based on ascent and descent metrics from the font in use. This makes our basic text layouts look a lot more like those produced by other browsers. :^) I've tried to match the terminology used by the CSS Inline Layout spec. This will regress Acid2 a little bit, and probably various other sites, but on the whole it's the direction we should be heading, so let's go.
This commit is contained in:
parent
fae8fde913
commit
6a4247bee9
4 changed files with 59 additions and 74 deletions
|
@ -274,7 +274,7 @@ void InlineFormattingContext::generate_line_boxes(LayoutMode layout_mode)
|
|||
item.margin_start,
|
||||
item.margin_end,
|
||||
item.width,
|
||||
text_node.computed_values().font_size());
|
||||
text_node.line_height());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue