Problem
The editor renders documents using only the fonts available in the browser environment. When a .docx file uses a custom or non-standard font (e.g. a corporate typeface), the editor falls back to a generic font, resulting in visual mismatch between the editor and the original document.
Proposal
Add an option to register custom fonts so the editor can render text with the correct typefaces.
Suggested API:
<DocxEditor
fonts={[
{ family: "Custom Sans", src: "/fonts/CustomSans-Regular.woff2" },
{ family: "Custom Sans", src: "/fonts/CustomSans-Bold.woff2", weight: 700 },
]}
/>
Problem
The editor renders documents using only the fonts available in the browser environment. When a
.docxfile uses a custom or non-standard font (e.g. a corporate typeface), the editor falls back to a generic font, resulting in visual mismatch between the editor and the original document.Proposal
Add an option to register custom fonts so the editor can render text with the correct typefaces.
Suggested API: