Skip to content

The headless browser for AI agents and web scraping

test: gate font metric line geometry

SGavrlf6bf57809b74
diff --git a/render-repros/checks.json b/render-repros/checks.json
index c5e06f14..a3be4c4f 100644
--- a/render-repros/checks.json
+++ b/render-repros/checks.json
@@ -63,6 +63,14 @@
{"name": "custom property font shorthand sets em geometry", "color": "#1971c2", "x": 0, "y": 0, "width": 200, "height": 80},
{"name": "later font shorthand replaces prior longhands", "color": "#e8590c", "x": 0, "y": 80, "width": 200, "height": 40}
],
+ "font-metric-line-height": [
+ {"name": "small normal sans lines use grid-fitted metrics", "color": "#087f5b", "x": 0, "y": 200, "width": 100, "height": 20},
+ {"name": "medium normal sans lines round metrics independently", "color": "#1971c2", "x": 150, "y": 140, "width": 100, "height": 20},
+ {"name": "normal serif lines use serif face metrics", "color": "#e8590c", "x": 300, "y": 160, "width": 100, "height": 20},
+ {"name": "normal mono lines use mono face metrics", "color": "#7048e8", "x": 450, "y": 150, "width": 100, "height": 20},
+ {"name": "explicit fractional line height accumulates fractionally", "color": "#c2255c", "x": 600, "y": 215, "width": 100, "height": 20},
+ {"name": "explicit line height may be smaller than font size", "color": "#2b8a3e", "x": 750, "y": 100, "width": 100, "height": 20}
+ ],
"float-flow-bands": [
{"name": "right float occupies its band", "color": "#1971c2", "x": 650, "y": 0, "width": 250, "height": 400},
{"name": "float-avoiding intro uses available band", "color": "#087f5b", "x": 0, "y": 0, "width": 650, "height": 100},
diff --git a/render-repros/font-metric-line-height.html b/render-repros/font-metric-line-height.html
new file mode 100644
index 00000000..c3f2b868
--- /dev/null
+++ b/render-repros/font-metric-line-height.html
@@ -0,0 +1,82 @@
+<!doctype html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>font metric line-height geometry</title>
+ <style>
+ html, body { margin: 0; }
+ .column {
+ position: absolute;
+ top: 0;
+ width: 120px;
+ }
+ .sans-small {
+ left: 0;
+ font: 9.3333px/normal "Liberation Sans", sans-serif;
+ }
+ .sans-medium {
+ left: 150px;
+ font: 12px/normal "Liberation Sans", sans-serif;
+ }
+ .serif {
+ left: 300px;
+ font: 13px/normal "Liberation Serif", serif;
+ }
+ .mono {
+ left: 450px;
+ font: 13px/normal "Liberation Mono", monospace;
+ }
+ .explicit {
+ left: 600px;
+ font: 9px/10.75px "Liberation Sans", sans-serif;
+ }
+ .tight {
+ left: 750px;
+ font: 20px/10px "Liberation Sans", sans-serif;
+ }
+ .marker { width: 100px; height: 20px; }
+ .sans-small .marker { background: #087f5b; }
+ .sans-medium .marker { background: #1971c2; }
+ .serif .marker { background: #e8590c; }
+ .mono .marker { background: #7048e8; }
+ .explicit .marker { background: #c2255c; }
+ .tight .marker { background: #2b8a3e; }
+ </style>
+</head>
+<body>
+ <div class="column sans-small">
+ <div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div>
+ <div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div>
+ <div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div>
+ <div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div>
+ <div class="marker"></div>
+ </div>
+ <div class="column sans-medium">
+ <div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div>
+ <div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div>
+ <div class="marker"></div>
+ </div>
+ <div class="column serif">
+ <div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div>
+ <div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div>
+ <div class="marker"></div>
+ </div>
+ <div class="column mono">
+ <div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div>
+ <div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div>
+ <div class="marker"></div>
+ </div>
+ <div class="column explicit">
+ <div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div>
+ <div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div>
+ <div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div>
+ <div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div>
+ <div class="marker"></div>
+ </div>
+ <div class="column tight">
+ <div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div>
+ <div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div><div>Ag</div>
+ <div class="marker"></div>
+ </div>
+</body>
+</html>