From 7106655c86f01269d7f7d56789ac996e74e468e2 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Sat, 14 Aug 2021 17:41:57 +0100 Subject: [PATCH] Base: Add more test cases to fonts.html - More combinations of values - Testing a font (Liberation Serif) which has multiple faces - Add calc() tests for font-size and weight - Check fallback when a font isn't available While I was at it, reorganized the file so the CSS is inline - this keeps it close to the relevant test case. --- Base/res/html/misc/fonts.html | 72 ++++++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 23 deletions(-) diff --git a/Base/res/html/misc/fonts.html b/Base/res/html/misc/fonts.html index be7beb981d..99f5a1387f 100644 --- a/Base/res/html/misc/fonts.html +++ b/Base/res/html/misc/fonts.html @@ -1,32 +1,58 @@ - CSS test + CSS Fonts test -
font: 20px monospace;
-
font: 12pt/14pt sans-serif;
-
font: 80% cursive;
-
font: bold 80% cursive;
-
font: x-large/110% fantasy, serif;
-
font: 2em SerenitySans;
-
font: 400 2em SerenitySans;
-
font: bold italic large Helvetica, sans-serif;
-
font: normal small-caps 120%/120% monospace;
-
font: condensed oblique 12pt "Helvetica Neue", serif;
-
font: condensed oblique 25deg 12pt "Helvetica Neue", serif;
+

General tests

+
+

font: 20px monospace;

+

font: 12pt/14pt sans-serif;

+

font: 80% cursive;

+

font: bold 80% cursive;

+

font: x-large/110% fantasy, serif;

+

font: 400 2em SerenitySans;

+

font: 400 200% SerenitySans;

+

font: 400 x-large SerenitySans;

+

font: smaller SerenitySans;

+

font: normal smaller SerenitySans;

+

font: bold italic large Helvetica, sans-serif;

+

font: normal small-caps 120%/120% monospace;

+

font: condensed oblique 12pt "Helvetica Neue", serif;

+

font: condensed oblique 25deg 12pt "Helvetica Neue", serif;

+
+ +

Calc() values

+
+

font-family: 'Liberation Serif', cursive; font-size: calc(120% + 10px);

+

font: calc(120% + 10px) 'Liberation Serif', cursive;

+

font-family: 'Liberation Serif', cursive; font-weight: calc(200 * 4);

+

font: calc(200 * 4) 20px 'Liberation Serif', cursive;

+
+ +

Fallback

+
+

font: 16pt 'fake font', not-real-font, 'SerenitySans', monospace;

+

font-family: 'fake font', not-real-font, 'SerenitySans', monospace;

+
+ +

Fonts with multiple faces

+
+

font: 20px 'Liberation Serif';

+

font: italic 20px 'Liberation Serif';

+

font: bold 20px 'Liberation Serif';

+

font: bold italic 20px 'Liberation Serif';

+