unidoc / unipdf

Golang PDF library for creating and processing PDF files (pure go)
https://unidoc.io
Other
2.5k stars 249 forks source link

Font subsetting and font optimization improvements #362

Closed gunnsth closed 4 years ago

gunnsth commented 4 years ago

This PR is focused on improving some optimization methods, mostly for font optimization, but also some other approaches.

Note that some golint fixes mixed in also.


This change is Reviewable

codecov[bot] commented 4 years ago

Codecov Report

Merging #362 into development will decrease coverage by 6.23%. The diff coverage is 18.20%.

Impacted file tree graph

@@               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     
Impacted Files Coverage Δ
model/optimize/clean_contentstream.go 0.00% <0.00%> (ø)
model/optimize/clean_fonts.go 0.00% <0.00%> (ø)
model/optimize/optimizer.go 87.14% <0.00%> (-5.29%) :arrow_down:
model/optimize/utils.go 0.00% <0.00%> (ø)
extractor/text.go 63.47% <25.00%> (-8.26%) :arrow_down:
model/font_composite.go 58.44% <25.00%> (-11.93%) :arrow_down:
internal/textencoding/identity.go 40.90% <50.00%> (-2.43%) :arrow_down:
model/font.go 57.56% <50.00%> (-7.33%) :arrow_down:
model/annotations.go 22.33% <54.54%> (-1.85%) :arrow_down:
model/page.go 53.20% <82.35%> (-7.38%) :arrow_down:
... and 164 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 99ef1b8...c943a1d. Read the comment docs.