115 Commits

Author SHA1 Message Date
Gunnsteinn Hall
9665959bcf Move model/fonts to model/internal/fonts - reducing export surface
- Move the folder
- Update imports
- Add type aliases to access needed types from model (fonts.StdFont, fonts.CharMetrics and the font names)
2019-03-12 19:08:37 +00:00
Denys Smirnov
952b15c91d model: reimplement adaptive encoding 2019-01-19 19:52:08 +02:00
Gunnsteinn Hall
bf47fc5b6e
Merge branch 'v3' into encodings 2019-01-05 17:18:16 +00:00
Denys Smirnov
0327d18eb6 textencoding: remove all unrelated methods from the interface 2019-01-01 23:24:11 +02:00
Denys Smirnov
7a2cd35f48 fonts: rebuild font metrics tables based on runes for standard fonts 2019-01-01 22:40:11 +02:00
Denys Smirnov
2e820f3ac5 textencoding: remove unused rune <-> glyph methods from the interface 2019-01-01 22:15:22 +02:00
Denys Smirnov
3c5fc18b01 textencoding: refactor encodings; better handling for differences 2019-01-01 17:20:01 +02:00
Peter Williams
57e6b41ef1 Merge branch 'v3' of https://github.com/unidoc/unidoc into text.fixes 2019-01-01 17:34:04 +11:00
Peter Williams
aaf47e1479 Font reading code return partial font info for unsupported fonts.
This allows calling code to check font types which is useful for giving information about PDF files.
2019-01-01 17:29:49 +11:00
Denys Smirnov
83d8086657 model: reformat TODOs 2018-12-28 16:48:38 +02:00
Denys Smirnov
f6506204d7 fonts: simplify code by getting width of runes in font instead of glyphs 2018-12-28 01:38:48 +02:00
Denys Smirnov
eb04b2d594 fonts: remove unused name field in char metrics 2018-12-28 01:08:47 +02:00
Gunnsteinn Hall
99a19b0b8d remove duplicate log 2018-12-27 17:42:12 +00:00
Denys Smirnov
dbbef4fd05 Merge remote-tracking branch 'peterwilliams97/extract.text' into extract.text
# Conflicts:
#	pdf/extractor/text.go
2018-12-27 12:40:55 +02:00
Denys Smirnov
8835230856 model: fix tests after the merge 2018-12-27 12:37:32 +02:00
Peter Williams
c70b66a00d Fixed incorrectly named variable. 2018-12-27 21:33:31 +11:00
Denys Smirnov
53687f854e Merge remote-tracking branch 'origin/v3' into extract.text
# Conflicts:
#	pdf/contentstream/processor.go
#	pdf/extractor/text.go
#	pdf/extractor/utils.go
#	pdf/internal/textencoding/winansi.go
#	pdf/model/font.go
#	pdf/model/font_composite.go
#	pdf/model/font_simple.go
#	pdf/model/font_test.go
#	pdf/model/fontfile.go
#	pdf/model/fonts/ttfparser.go
#	pdf/model/structures.go
2018-12-27 12:17:28 +02:00
Denys Smirnov
e729fa618d model: refactor CharcodesToUnicode to return string and remove TODO 2018-12-26 17:11:41 +02:00
Denys Smirnov
db8e50e457 model: fix wording in the comments 2018-12-19 16:59:13 +05:00
Denys Smirnov
217f984033 fonts: make standard font names type-safe 2018-12-19 16:55:27 +05:00
Denys Smirnov
85e1a02ac8 model: define an unexported pdfFont interface and remove error cases 2018-12-19 13:54:45 +05:00
Denys Smirnov
7f667d8fbb model: remove Standard14Font in favor of fonts.StdFont; resolves #269 2018-12-19 13:43:09 +05:00
Denys Smirnov
e3704defc7 rename Typ1 font to StdFont 2018-12-15 19:39:55 +05:00
Denys Smirnov
19f95527b8 creator: remove SetEncoder from top 2018-12-15 18:49:15 +05:00
Denys Smirnov
3687c83b37 errors should start with a lower case 2018-12-15 18:49:15 +05:00
Denys Smirnov
3b1a92701f fonts: remove redundant Type1 font interface implementations 2018-12-15 18:47:39 +05:00
Denys Smirnov
59f694d99f fonts: remove broken SetEncoder method for most fonts 2018-12-15 18:47:39 +05:00
Denys Smirnov
0a8b46daff don't use generic receiver names; make sure receiver name is consistent 2018-12-09 21:47:15 +02:00
Denys Smirnov
9f0df8945d don't use XXX for TODOs 2018-12-09 21:39:11 +02:00
Denys Smirnov
99f3184879 define slices with a var instead of an empty literal 2018-12-09 19:28:50 +02:00
Denys Smirnov
2658fe9c06 assert types for the new code as well 2018-12-07 18:43:24 +02:00
Denys Smirnov
7cdbb0c572 Merge remote-tracking branch 'origin/v3' into extract.text
# Conflicts:
#	pdf/internal/textencoding/truetype.go
#	pdf/model/font.go
#	pdf/model/font_composite.go
#	pdf/model/font_simple.go
#	pdf/model/font_test.go
#	pdf/model/fonts/ttfparser.go
2018-12-07 18:30:37 +02:00
Gunnsteinn Hall
1f56c18454 Address review comments 2018-12-07 10:32:49 +00:00
Peter Williams
835f329c28 Merge branch 'extract.text' of https://github.com/peterwilliams97/unidoc into extract.text 2018-12-02 10:02:16 +11:00
Peter Williams
9c258551ad Documented font code. Fall back to StandardEncoding when no encoding is speficied for a font. 2018-12-02 09:14:58 +11:00
Gunnsteinn Hall
2b1c796a74 Addressing review comments 2018-11-30 23:01:04 +00:00
Gunnsteinn Hall
283c9bf778 Merge branch 'extract.text' of https://github.com/peterwilliams97/unidoc into v3-peterwilliams97-extract.text.take2 2018-11-30 17:05:49 +00:00
Gunnsteinn Hall
33843599f2 Another round of addressing review comments 2018-11-30 16:53:48 +00:00
Peter Williams
785a83e866 Merge branch 'extract.text' of https://github.com/peterwilliams97/unidoc into extract.text
NOTE: Fixed a text_test.go regression by modifying getCharCodeMetrics().
2018-11-30 10:46:33 +11:00
Denys Smirnov
fb4a087a93 textencoding: introduce GlyphName type 2018-11-29 23:24:40 +02:00
Denys Smirnov
27efe08a26 cmap: remove global for missing code; should replace the rune afterwards 2018-11-29 04:52:23 +02:00
Denys Smirnov
8a4c4069b7 textencoding: unexport CodeToGlyph field 2018-11-29 04:42:35 +02:00
Denys Smirnov
6fddd80eba textencoding: assert the type of differences map 2018-11-29 04:40:25 +02:00
Denys Smirnov
46d22eac31 fonts: introduce types for GIDs and char codes; fix shadowing bug 2018-11-29 04:19:29 +02:00
Denys Smirnov
6c0fd1e780 cmap: mapped values are runes, not strings 2018-11-29 04:19:29 +02:00
Gunnsteinn Hall
f04f83b271 Merge branch 'extract.text' of https://github.com/peterwilliams97/unidoc into v3-peterwilliams97-extract.text 2018-11-28 23:33:31 +00:00
Gunnsteinn Hall
520ab09a72 Addressing review comments 2018-11-28 23:25:17 +00:00
Peter Williams
f373881a48 Removed some unused struct fields. 2018-11-27 13:37:12 +11:00
Peter Williams
478c5dfe56 removed debug code 2018-11-26 17:45:41 +11:00
Peter Williams
536c688001 Fixed orientation handling in text extraction. 2018-11-26 17:17:17 +11:00