-
Notifications
You must be signed in to change notification settings - Fork 159
feat(PDF): Adding customFont option for PDF exporter.
#16892
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: master
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This PR adds custom font support to the PDF exporter service, enabling Unicode character rendering beyond the default Helvetica font's basic Latin character set. This enhancement addresses the need for exporting data containing non-Latin scripts like Cyrillic, Chinese, Japanese, Arabic, and Hebrew characters.
Changes:
- Added
customFontproperty toIgxPdfExporterOptionswith support for Base64-encoded TrueType fonts - Implemented font registration logic with automatic fallback to Helvetica on errors
- Added comprehensive unit tests covering edge cases for custom font configuration
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| pdf-exporter.ts | Implements custom font registration logic with validation and fallback handling |
| pdf-exporter.spec.ts | Adds comprehensive test coverage for custom font feature including edge cases |
| pdf-exporter-options.ts | Defines PdfUnicodeFont interface and adds customFont property with detailed documentation |
| CHANGELOG.md | Documents the new custom font feature with usage examples |
projects/igniteui-angular/grids/core/src/services/pdf/pdf-exporter.ts
Outdated
Show resolved
Hide resolved
projects/igniteui-angular/grids/core/src/services/pdf/pdf-exporter.ts
Outdated
Show resolved
Hide resolved
projects/igniteui-angular/grids/core/src/services/pdf/pdf-exporter.ts
Outdated
Show resolved
Hide resolved
…m/IgniteUI/igniteui-angular into gedinakova/pdf-custom-font-option
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.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
projects/igniteui-angular/grids/core/src/services/pdf/pdf-exporter.ts
Outdated
Show resolved
Hide resolved
…rter.ts Co-authored-by: Copilot <[email protected]>
…rter.ts Co-authored-by: Copilot <[email protected]>
…m/IgniteUI/igniteui-angular into gedinakova/pdf-custom-font-option
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.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
projects/igniteui-angular/grids/core/src/services/pdf/pdf-exporter.ts
Outdated
Show resolved
Hide resolved
projects/igniteui-angular/grids/core/src/services/pdf/pdf-exporter-options.ts
Outdated
Show resolved
Hide resolved
…rter-options.ts Co-authored-by: Copilot <[email protected]>
…rter.ts Co-authored-by: Copilot <[email protected]>
…rter.ts Co-authored-by: Copilot <[email protected]>
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.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
projects/igniteui-angular/grids/core/src/services/pdf/pdf-exporter.ts
Outdated
Show resolved
Hide resolved
projects/igniteui-angular/grids/core/src/services/pdf/pdf-exporter.spec.ts
Outdated
Show resolved
Hide resolved
…rter.ts Co-authored-by: Copilot <[email protected]>
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.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
projects/igniteui-angular/grids/core/src/services/pdf/pdf-exporter.spec.ts
Show resolved
Hide resolved
…rter.spec.ts Co-authored-by: Copilot <[email protected]>
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.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Closes #16606
Additional information (check all that apply):
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)