Skip to content

Allow registring of custom font directories for PDFs - #249

Merged
eXpl0it3r merged 1 commit into
masterfrom
feature/custom-font
Jul 27, 2026
Merged

Allow registring of custom font directories for PDFs#249
eXpl0it3r merged 1 commit into
masterfrom
feature/custom-font

Conversation

@eXpl0it3r

@eXpl0it3reXpl0it3r commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

When rendering a PDF and you want to use a font that is not part of the system fonts, you can provide a custom font directory containing the font files, which HtmlRenderer.PdfSharp's FontResovler will rediscover and cache in HtmlRenderer.

Register the custom font directory like this: pdfGenerator.RegisterCustomFontDirectory("some/path");

Fix#122 and close#208

WinForms and WPF implementations use Windows APIs (e.g. GDI) to get the system fonts.

@eXpl0it3r
eXpl0it3rforce-pushed the feature/custom-font branch from 43de30f to b032bd0CompareJuly 27, 2026 10:29
@eXpl0it3reXpl0it3r changed the title Allow registring of custom font mappings and directories for PDFsAllow registring of custom font directories for PDFsJul 27, 2026
@eXpl0it3r
eXpl0it3rforce-pushed the feature/custom-font branch from b032bd0 to 13e1100CompareJuly 27, 2026 10:30
@eXpl0it3r
eXpl0it3r merged commit 9b555ee into masterJul 27, 2026
18 checks passed
@eXpl0it3r
eXpl0it3r deleted the feature/custom-font branch July 27, 2026 10:42
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to add custom/private font?

1 participant

@eXpl0it3r