mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Store required font metrics on TextFragment
This commit is contained in:
parent
74d9fec9cf
commit
e3c8597ccb
3 changed files with 32 additions and 11 deletions
|
@ -87,7 +87,7 @@ impl Fragment {
|
|||
.to_physical(t.parent_style.writing_mode, containing_block)
|
||||
.translate(containing_block.origin.to_vector());
|
||||
let mut baseline_origin = rect.origin.clone();
|
||||
baseline_origin.y += t.ascent;
|
||||
baseline_origin.y += t.font_metrics.ascent;
|
||||
let glyphs = glyphs(&t.glyphs, baseline_origin);
|
||||
if glyphs.is_empty() {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue