From cc2c9af4d47a309918dde39167076f01c7356154 Mon Sep 17 00:00:00 2001 From: Traian Captan Date: Wed, 15 Jun 2022 12:57:26 -0700 Subject: [PATCH] Modified text decoration thickness test to pass on all platforms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The lowercase 'g' descends through the underline, which is rendered with dilation (gap between the underline and the descending g). Due to different anti-aliasing settings on different test platforms, the font metrics are calculated slightly differently, causing a 1 px difference between the from-font in the reference and the manually set length in the test on at least one platform, depending on the set font size. To avoid dilation issues, the proposed work around is to change the lowercase 'g' in the test text to uppercase 'G'. Fixed: 1068947 Change-Id: Id2be1fb3e56f9faab8a9698522b21cc42b57f5d1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3689109 Reviewed-by: Philip Rogers Commit-Queue: Traian Captan Cr-Commit-Position: refs/heads/main@{#1014580} --- .../text-decoration-thickness-fixed-ref.html | 10 +++++----- .../text-decoration-thickness-fixed.html | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/css/css-text-decor/reference/text-decoration-thickness-fixed-ref.html b/css/css-text-decor/reference/text-decoration-thickness-fixed-ref.html index b155eb9c8a01de..88f7b46843a6f8 100644 --- a/css/css-text-decor/reference/text-decoration-thickness-fixed-ref.html +++ b/css/css-text-decor/reference/text-decoration-thickness-fixed-ref.html @@ -19,7 +19,7 @@ .test { text-underline-position: from-font; -font-size: 62px; +font-size: 64px; line-height: 1.8; } @@ -38,9 +38,9 @@

Test passes if underlines are thin, thick, thin, thick in this order and match the reference rendering.

-
aagaa
-
aagaa
-
aagaa
-
aagaa
+
aaGaa
+
aaGaa
+
aaGaa
+
aaGaa
diff --git a/css/css-text-decor/text-decoration-thickness-fixed.html b/css/css-text-decor/text-decoration-thickness-fixed.html index 3437c430d8334d..07dab0b9b659e4 100644 --- a/css/css-text-decor/text-decoration-thickness-fixed.html +++ b/css/css-text-decor/text-decoration-thickness-fixed.html @@ -15,7 +15,7 @@ .test { text-underline-position: from-font; -font-size: 62px; +font-size: 64px; line-height: 1.8; } @@ -28,7 +28,7 @@ .thick_underline { font-family: underline-variable; text-decoration: underline; -text-decoration-thickness: 6.2px; +text-decoration-thickness: 6.4px; } .thin_underline_percent { @@ -46,9 +46,9 @@

Test passes if underlines are thin, thick, thin, thick in this order and match the reference rendering.

-
aagaa
-
aagaa
-
aagaa
-
aagaa
+
aaGaa
+
aaGaa
+
aaGaa
+
aaGaa