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

How to Use Standard Fonts #101

Closed
Mikolaytis opened this issue Oct 6, 2014 · 8 comments
Closed

How to Use Standard Fonts #101

Mikolaytis opened this issue Oct 6, 2014 · 8 comments

Comments

@Mikolaytis
Copy link

How to use standard fonts?
Found them in source code
PDFFont.prototype._standardFonts = ["Courier", "Courier-Bold", "Courier-Oblique", "Courier-BoldOblique", "Helvetica", "Helvetica-Bold", "Helvetica-Oblique", "Helvetica-BoldOblique", "Times-Roman", "Times-Bold", "Times-Italic", "Times-BoldItalic", "Symbol", "ZapfDingbats"];

I have tried to use that font names instead of font file names in VFS. But i got a exception: Uncaught TypeError: Cannot read property 'widthOfString' of null

@bpampuch
Copy link
Owner

Standard fonts aren't embedded by default, if you need them, you should add them manually as described here: #33

@Mikolaytis
Copy link
Author

Already did that. Works fine. But fonts have a huge size :( It's sad that we can't access user's standard fonts.

@bpampuch
Copy link
Owner

AFAIK the underlying pdfkit library does not provide this, I wish it could be done easily ;)

@bpampuch
Copy link
Owner

I'm marking it as a feature request and will think about it

@loverdrive
Copy link

Any news about it?

@liborm85
Copy link
Collaborator

Now, there is no problem to implement this, but I do not know whether it will have any benefits.
The above-mentioned fonts pdfkit really supported, but only in ANSI (only english charset)! Furthermore, the builded file pdfmake.js would increase size about 700 kB.

@liborm85
Copy link
Collaborator

liborm85 commented Jan 22, 2017

It will not be implemented.

@liborm85
Copy link
Collaborator

Standard 14 fonts are supported by pdfmake on server-side by default.
I'm implemented command for building with standard fonts for client-side by commit 903f767.

How to use standard 14 fonts in pdfmake are described in wiki page.

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

No branches or pull requests

4 participants