Fix PDF export heading font fallback#6069
Fix PDF export heading font fallback#6069ssddanbrown merged 1 commit intoBookStackApp:developmentfrom
Conversation
|
The problem lies elsewhere. The last version that didn't have a problem with Polish characters in headers was v25.02.2. After updating to v25.02.3, "zażółć gęśli jaźń" -> "za?ół?? g??l? ja??.". The only change that causes this error is at the very beginning of the .dummy-style{color:red}:root{--font-body:...Removing |
|
@janusz-net Removing .dummy-style{color:red} would likely reintroduce the earlier BOM-related issue tracked in sass/dart-sass#472. Your observation is still useful though, since it shows the PDF export path is sensitive to the first rule in the inlined export-styles.css; this PR aims to fix that without regressing the earlier workaround. |
|
Thanks @alexwoo-awso, now merged. I did make a slight change afterwards in 4f370cc to set this for all exports so that it's aligned with what we're doing for fonts on other text. |
PDF exports used the heading font var which in DOMPDF fell back to base fonts lacking Polish glyphs, causing ? in titles. This PR adds a PDF-only heading font fallback to DejaVu Sans for h1-h6. Tested by exporting a page with a Polish title; characters render correctly.
Before


After

