You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for overriding the default page styles, allowing a font to be specified. Ideally, other style properties like page margin could be altered, too, for future flexibility.
Support registering custom fonts, overriding the default registerFont method.
Describe alternatives you've considered
No alternatives come to mind, aside from perhaps forgoing the default block / inline style mappers and writing our own versions for every block or inline content type. Doing so would decrease the value provided by the package.
Additional context
Happy to submit a PR.
Bonus
I'm a sponsor and would appreciate if you could look into this sooner than later 💖
Thanks for the feedback. A currently possible alternative is to subclass PDFExporter and override registerFont to register the alternative font files, and change the font type in this.styles.
Have you considered this? I agree this might not be very clear, so happy to accept a PR with a clearer API and / or documentation (or we can do this on the next iteration or if this approach doesn't work).
Is your feature request related to a problem? Please describe.
We use custom fonts in our production block editor and want the same fonts to be used in our exported PDFs. Currently, it appears as though the editor font is hardcoded to Inter: https://github.com/TypeCellOS/BlockNote/blob/main/packages/xl-pdf-exporter/src/pdf/pdfExporter.tsx#L57C10-L74
Describe the solution you'd like
registerFont
method.Describe alternatives you've considered
No alternatives come to mind, aside from perhaps forgoing the default block / inline style mappers and writing our own versions for every block or inline content type. Doing so would decrease the value provided by the package.
Additional context
Happy to submit a PR.
Bonus
(https://github.com/poggiolabs is a sponsor)
The text was updated successfully, but these errors were encountered: