update: apply font family to all <text> elements

This commit is contained in:
2025-12-04 22:31:57 +05:30
parent 4fbc3bd7d2
commit a8d586eb4a

View File

@@ -83,35 +83,30 @@ async function screenshotDOM(el, opts = {}) {
<style> <style>
.card { fill: #ffffff; stroke: #e5e7eb; stroke-width: 1.2; rx: 5; ry: 5; } .card { fill: #ffffff; stroke: #e5e7eb; stroke-width: 1.2; rx: 5; ry: 5; }
.headword { .headword {
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
font-size: ${Math.round(width * 0.03)}px; font-size: ${Math.round(width * 0.03)}px;
font-weight: 700; font-weight: 700;
fill: #111827; fill: #111827;
} }
.pron { .pron {
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
font-size: ${Math.round(width * 0.025)}px; font-size: ${Math.round(width * 0.025)}px;
fill: #6b7280; fill: #6b7280;
} }
.pos { .pos {
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
font-size: ${Math.round(width * 0.017)}px; font-size: ${Math.round(width * 0.017)}px;
font-weight: bold; font-weight: bold;
fill: #666; fill: #666;
} }
.def { .def {
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
font-size: ${Math.round(width * 0.025)}px; font-size: ${Math.round(width * 0.025)}px;
fill: #111827; fill: #111827;
} }
.num { .num {
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
font-size: ${Math.round(width * 0.025)}px; font-size: ${Math.round(width * 0.025)}px;
fill: #6b7280; fill: #6b7280;
} }
text { text {
white-space: pre-wrap; font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
} }
</style> </style>