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

Remove text state handling as it doesn't surive graphic stack saves/restores #238

Merged
merged 1 commit into from
May 10, 2014

Conversation

ryanwersal
Copy link
Contributor

Saving and/or restoring the graphics state causes each text object to have to reinitialize that text state. As a result, the mode/characterSpacing commands would not get re-added until their value(s) had changed which resulted in #224.

…estores

Saving and/or restoring the graphics state causes each text object to have to
reinitialize that text state. As a result, the mode/characterSpacing commands
would not get re-added until their value(s) had changed.
devongovett added a commit that referenced this pull request May 10, 2014
Remove text state handling as it doesn't surive graphic stack saves/restores
@devongovett devongovett merged commit 7883279 into foliojs:master May 10, 2014
@devongovett
Copy link
Member

Thanks for doing this.

@devongovett
Copy link
Member

Released this and your other fixes in v0.6.2. Thanks again for all your work! https://github.com/devongovett/pdfkit/releases/tag/v0.6.2

@ryanwersal
Copy link
Contributor Author

Sweet! Glad to be able to help out. 👍

@ryanwersal ryanwersal deleted the iss224-fix-char-spacing branch May 10, 2014 18:30
@binh1990
Copy link

i want to export pdf file with embedded font like japan font. Like this
[ doc.font('ipaexg.ttf').text('武大郎') ]
But i receive error: Uncaught TypeError: undefined is not a function pdfkit.js:2426
TTFFont.open pdfkit.js:2426
PDFFont pdfkit.js:436
module.exports.font pdfkit.js:3842
(anonymous function) newhtml.html:170
n.event.dispatch jquery.min.js:3
r.handle

@devongovett
Copy link
Member

@binh1990 from your stack trace, it appears you're using PDFKit in the browser. Your example also shows loading a font from a filename, which is impossible in the browser. Try loading a buffer instead.

@binh1990
Copy link

Thanks devongovett for your reply. Can you give me a example loading a font from buffer in the browser. Thank you so much .

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

Successfully merging this pull request may close these issues.

3 participants