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

25 pdf extracted fonts can not be loaded in browser #26

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

tomsontom
Copy link

Normalize "Format6SubTable" to default tables if they are not present yet

Closes #25

@m-abboud
Copy link
Owner

m-abboud commented Mar 30, 2021

Awesome thank you for the PR. Code looks good except for some minor formatting issues, don't include spaces inside parentheses blocks (sorry I never set up some sort of linter for this project)

setName(NameTable.createDefaultTable());
} else {
Copy link
Author

@tomsontom tomsontom Mar 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately these changes surface a bug in NameTable - i have a fix for that but if you want I can rollback those changes and provide another PR to fix this

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the problem is in the offset-computation where there are 2 problems:

  • it's not guaranteed that the length of the string has been computed
  • the offset computation is done BEFORE the entries are sorted
    I think currently one most of the time does not recognize that because if one call normalize() and then getData() the content is correct because on the get data-call

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh if you have a fix for it you can just throw it into this PR. I unfortunately haven't worked on this project in a long time so I'm not really familiar with the specifics here (I also haven't touched java in years either)

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.

PDF Extracted Fonts can not be loaded in Browser
2 participants