8 Commits

Author SHA1 Message Date
Peter Williams
b7f91fd72c errors.Is -> xerrors.Is and %w -> %v for go 1.12 compatibility 2020-06-29 20:53:58 +10:00
Peter Williams
25414d4214 Use errors.Is(err, core.ErrNotSupported) to distinguish unsupported font errorrs.
See https://blog.golang.org/go1.13-errors
2020-06-27 11:29:21 +10:00
Peter Williams
a7779a34d8 Merge branch 'development' of https://github.com/unidoc/unipdf into columns 2020-06-22 16:37:06 +10:00
Gunnsteinn Hall
11f692bc3a
Font subsetting and font optimization improvements (#362)
* Track runes in IdentityEncoder (for subsetting), track decoded runes

* Working with the identity encoder in font_composite.go

* Add GetFilterArray to multi encoder.  Add comments.

* Add NewFromContents constructor to extractor only requiring contents and resources

* golint fixes

* Optimizer compress streams - improved detection of raw streams

* Optimize - CleanContentStream optimizer that removes redundant operands

* WIP Optimize - clean fonts

Will support both font file reduction and subsetting. (WIP)

* Optimize - image processing - try combined DCT and Flate

* Update options.go

* Update optimizer.go

* Create utils.go for optimize with common methods needed for optimization

* Optimizer - add font subsetting method

Covers XObject Forms, annotaitons etc.  Uses extractor package to extract text marks covering what fonts and glyphs are used.  Package truetype used for subsetting.

* Add some comments

* Fix cmap parsing rune conversion

* Error checking for extractor.  Add some comments.

* Update Jenkinsfile

* Update modules
2020-06-16 21:19:10 +00:00
Peter Williams
16b3c1c450 Removed commented code 2020-06-05 14:21:53 +10:00
Peter Williams
d21e2f83c4 Got text_test.go passing. 2020-05-27 18:15:18 +10:00
Peter Williams
fad1552009 Fixed text state save/restore. 2020-05-26 13:26:09 +10:00
Adrian-George Bostan
c64812093d Remmove pdf folder and move packages up one level (#2) 2019-05-16 20:44:51 +00:00