-
-
Notifications
You must be signed in to change notification settings - Fork 887
Add support for selecting font families when creating a form PDF #312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
(Still adding tests) |
.gitignore
Outdated
| lerna-debug.log* | ||
|
|
||
| node_modules | ||
| dist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid commiting the package output
| const STANDARD_FONT_NAMES: string[] = Object.values(StandardFonts) | ||
|
|
||
| // Additional fonts storage | ||
| let additionalFonts: string[] = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There might be a better way to do this, im open to suggestions
| label.style.fontFamily = fontName.includes('Times') ? 'serif' : | ||
| fontName.includes('Courier') ? 'monospace' : 'sans-serif' | ||
|
|
||
| // Count how many fields use this font |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might not be useful 🤔
|
I have read the CLA Document and I hereby sign the CLA |
|
I can try and resolve the new conflicts after this has been reviewed |
Description
When a user creates a PDF form, they can now select the font family used for the text fields.
New Form Properties area shows all embedded fonts
Font families drop down shows all standard fonts available, and defaults to Helvetica
Adding Custom Font modal
By Google font name

By font URL

By uploaded file

Updated font list after custom font addition
Updated live render / output font render in the pdf
Embedded font information
Fixes #261
Type of change
Please delete options that are not relevant.
🧪 How Has This Been Tested?
Please describe how you tested your changes so that maintainers can verify them. Include enough detail for someone else to reproduce your tests.
Checklist:
Expected Results:
Actual Results:
Checklist: