PDF: Started building system to allow custom DOMPDF font loading #6109
No reviewers
Labels
No labels
Focus: A11y
Focus: Admin/Meta
Focus: Authentication
Focus: Back-End
Focus: Database
Focus: Design & UX
Focus: Editor - Markdown
Focus: Editor - WYSIWYG
Focus: Export System
Focus: Front-End
Focus: Translations
Focus: View Customization
Is: Docs Update
Is: Enhancement
Is: Priority
Is: Security
Is: Upstream
Status
Blocked
Status
Open to discussion
Status
Out of scope
Status
Pending Validation
Type
API Request
Type
Bug Report
Type
Feature Request
Type
Happy feedback
Type
Maintenance
Type
Question
Type
Support
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bookstack/bookstack!6109
Loading…
Reference in a new issue
No description provided.
Delete branch "dompdf_font_loading"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds a way for custom fonts to be loaded for use with DomPDF.
On export, BookStack scans the
storage/fonts/dompdffolder for*.ttffont files, then for each attempts to build the required.ufm(font-metrics) file where they don't already exist.Then it auto-converts the naming scheme to suit dompdf.
Considerations
This is just one side of things, making the font available. It would also need to be used in styles. We could attempt to auto-inject styles, but then things may get complex with factors like font ordering, different fonts for different uses etc...
Might be best, at least for now, if we provide guidance (alongside guidance for this system) on how to set the relevant styles (via custom HTML head content).
Custom head example:
Todo
storage/fontssub-folders.Docs Updates
storage/fontsfolder (and all folders within that) are accessible & writable to the web-server.