Skip to content

Custom font support #620

@bencohenvi

Description

@bencohenvi

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 },
  ]}
/>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions