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>
.card { fill: #ffffff; stroke: #e5e7eb; stroke-width: 1.2; rx: 5; ry: 5; }
.headword {
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
font-size: ${Math.round(width * 0.03)}px;
font-weight: 700;
fill: #111827;
}
.pron {
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
font-size: ${Math.round(width * 0.025)}px;
fill: #6b7280;
}
.pos {
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
font-size: ${Math.round(width * 0.017)}px;
font-weight: bold;
fill: #666;
}
.def {
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
font-size: ${Math.round(width * 0.025)}px;
fill: #111827;
}
.num {
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
font-size: ${Math.round(width * 0.025)}px;
fill: #6b7280;
}
text {
white-space: pre-wrap;
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
}
</style>