Skip to content

Commit 21ee38c

Browse files
committed
🐛(frontend) fix export when quote block and inline code
When exporting documents, if a inline code was inside a quote block, the PDF export was failing because the inline code was searching the GeistMono font in italics, which was not available. We switch to the core "Courier" font for code marks, which is available in italics.
1 parent 09de014 commit 21ee38c

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ and this project adheres to
3131

3232
- 🐛(makefile) Windows compatibility fix for Docker volume mounting #1264
3333
- 🐛(minio) fix user permission error with Minio and Windows #1264
34+
- 🐛(frontend) fix export when quote block and inline code #1319
3435

3536
## [3.5.0] - 2025-07-31
3637

src/frontend/apps/impress/src/features/docs/doc-export/mappingDocx.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,16 @@ export const docxDocsSchemaMappings: DocsExporterDocx['mappings'] = {
2424
interlinkingSearchInline: () => new Paragraph(''),
2525
interlinkingLinkInline: inlineContentMappingInterlinkingLinkDocx,
2626
},
27+
styleMapping: {
28+
...docxDefaultSchemaMappings.styleMapping,
29+
// Switch to core PDF "Courier" font to avoid relying on GeistMono
30+
// that is not available in italics
31+
code: (enabled?: boolean) =>
32+
enabled
33+
? {
34+
font: 'Courier New',
35+
shading: { fill: 'DCDCDC' },
36+
}
37+
: {},
38+
},
2739
};

src/frontend/apps/impress/src/features/docs/doc-export/mappingPDF.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,11 @@ export const pdfDocsSchemaMappings: DocsExporterPDF['mappings'] = {
2929
interlinkingSearchInline: () => <></>,
3030
interlinkingLinkInline: inlineContentMappingInterlinkingLinkPDF,
3131
},
32+
styleMapping: {
33+
...pdfDefaultSchemaMappings.styleMapping,
34+
// Switch to core PDF "Courier" font to avoid relying on GeistMono
35+
// that is not available in italics
36+
code: (enabled?: boolean) =>
37+
enabled ? { fontFamily: 'Courier', backgroundColor: '#dcdcdc' } : {},
38+
},
3239
};

0 commit comments

Comments
 (0)