From 3603d2df856a766ba5b58ca9304f5e9335bc5290 Mon Sep 17 00:00:00 2001 From: Ryan McCahan Date: Thu, 17 Feb 2022 19:04:19 -0700 Subject: [PATCH] Set display inline for font metrics test img --- src/render/font-metrics.ts | 1 + tests/reftests/text/text.html | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/render/font-metrics.ts b/src/render/font-metrics.ts index f40555c..828e4ee 100644 --- a/src/render/font-metrics.ts +++ b/src/render/font-metrics.ts @@ -38,6 +38,7 @@ export class FontMetrics { img.style.margin = '0'; img.style.padding = '0'; img.style.verticalAlign = 'baseline'; + img.style.display = 'inline'; span.style.fontFamily = fontFamily; span.style.fontSize = fontSize; diff --git a/tests/reftests/text/text.html b/tests/reftests/text/text.html index 66e4021..e067e0d 100644 --- a/tests/reftests/text/text.html +++ b/tests/reftests/text/text.html @@ -14,6 +14,10 @@ line-height: 1vw; } + img { + display: block; + } + .medium { font-size: 18px; line-height: 2vw;