From 4f370ccddb4f5fd8eddff5915a9413786ae2a2c7 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Mon, 20 Apr 2026 14:32:13 +0100 Subject: [PATCH] Styles: Aligned fonts set on content and headers for exports During review of #6069 --- resources/sass/export-styles.scss | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/resources/sass/export-styles.scss b/resources/sass/export-styles.scss index 22f15d1b8..36901c0f1 100644 --- a/resources/sass/export-styles.scss +++ b/resources/sass/export-styles.scss @@ -12,12 +12,16 @@ html, body { } body { - font-family: 'DejaVu Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Roboto", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; margin: 0; padding: 0; display: block; } +// Set fonts to common system fonts, starting with DejaVu Sans due to support in DOMPDF +body, h1, h2, h3, h4, h5, h6 { + font-family: 'DejaVu Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Roboto", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; +} + table { border-spacing: 0; border-collapse: collapse; @@ -64,11 +68,6 @@ body.export-format-pdf { font-size: 14px; line-height: 1.2; - // Ensure heading glyph coverage for PDF engines that don't handle CSS vars well. - h1, h2, h3, h4, h5, h6 { - font-family: 'DejaVu Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Roboto", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; - } - h1, h2, h3, h4, h5, h6 { line-height: 1.2; }