Skip to content
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

Custom Font Collection Via URL Protocol Does Not Seem To Work #2456

Closed
fearghalom opened this issue Jul 14, 2022 · 1 comment
Closed

Custom Font Collection Via URL Protocol Does Not Seem To Work #2456

fearghalom opened this issue Jul 14, 2022 · 1 comment
Labels

Comments

@fearghalom
Copy link

fearghalom commented Jul 14, 2022

I'm trying to add a custom font using a TrueType Collection (.ttc) with a URL address. I've followed the example in the documentation but I get an error:

ERROR
Error: Uncaught (in promise): TypeError: url.toLowerCase is not a function
TypeError: url.toLowerCase is not a function

It looks like the library is treating the font type definition as a string when the examples show that an array of strings should be specified to identify the .ttc file and font name.

Specifying a .ttf file via the URL protocol method works fine, it's only with the usage of a .ttc file and the specification of the font name that the issue seems to occur.

I've reproduced the issue on StackBlitz: https://stackblitz.com/edit/angular-pdfmake-example-5prbnt?file=src/app/app.component.ts

@liborm85
Copy link
Collaborator

Loading TTC from URL fixed by commit eebdf14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants