-
Notifications
You must be signed in to change notification settings - Fork 376
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
Italics not working #42
Comments
modesty
pushed a commit
that referenced
this issue
Mar 10, 2016
fixed in v1.1.1, thanks. |
todorowww
pushed a commit
to todorowww/pdf2json
that referenced
this issue
Jan 24, 2017
…olditalic fonts
todorowww
added a commit
to todorowww/pdf2json
that referenced
this issue
Jan 24, 2017
…l bolditalic font detection
modesty
added a commit
that referenced
this issue
Nov 10, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dear Mr. Zhang,
The Italic field (TS[3]) is always zero regardless of whether the text field is Italic or not. After digging in pdffont.js for a bit, I figured out that it's because the value is always the initial value (false) set in the constructor and it is never set anywhere else.
In my case, I corrected the issue by making this very simple change to pdffont.js:
Please note that Bold works as advertised. I notice that you are also analyzing the typeface name to distinguish between bold and normal text in the case of "pseudobold" text fonts, I have not done anything like that for italics so it probably won't work for typefaces that oblique by design but not by formatting.
I have not forked the project so please accept this issue and code snippet in lieu of a pull request. :)
Yours faithfully,
Riaan
PS. Thanks for the package, it's much appreciated!
The text was updated successfully, but these errors were encountered: