-
Notifications
You must be signed in to change notification settings - Fork 257
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
Font subsetting and font optimization improvements #362
Font subsetting and font optimization improvements #362
Conversation
Will support both font file reduction and subsetting. (WIP)
Covers XObject Forms, annotaitons etc. Uses extractor package to extract text marks covering what fonts and glyphs are used. Package truetype used for subsetting.
Codecov Report
@@ Coverage Diff @@
## development #362 +/- ##
===============================================
- Coverage 62.39% 56.16% -6.24%
===============================================
Files 236 239 +3
Lines 45802 46206 +404
===============================================
- Hits 28580 25951 -2629
- Misses 16549 16905 +356
- Partials 673 3350 +2677
Continue to review full report at Codecov.
|
…tion-improvements
for _, obj := range kids.Elements() { | ||
pobj, ok := core.GetIndirect(obj) | ||
if !ok { | ||
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be continue
here instead of break
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is something that should not happen, I think. Might make sense to log a debug message. It's part of the optimization so it's not very mission critical.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great.
This PR is focused on improving some optimization methods, mostly for font optimization, but also some other approaches.
NewFromContents
to extractor to enable extracting from generic pdf contents / resources.Note that some golint fixes mixed in also.
This change is