64 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
Gunnsteinn Hall
bf47fc5b6e
Merge branch 'v3' into encodings 2019-01-05 17:18:16 +00:00
Denys Smirnov
aeea76f4dd fonts: read ttf font data once 2019-01-02 17:18:43 +02: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
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
85e1a02ac8 model: define an unexported pdfFont interface and remove error cases 2018-12-19 13:54:45 +05:00
Denys Smirnov
d5a69b817c model: move CID font width array code to function and add a test case 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
7b4564aec5 model: clarify the usage of width map and ttf text encoder 2018-12-15 18:47:39 +05:00
Denys Smirnov
11081b20c5 fonts: clarify cid to gid mapping 2018-12-15 18:47:39 +05:00
Denys Smirnov
e07fa3b2c0 model: add a reference to width table format and simplify the code 2018-12-15 18:47:39 +05:00
Denys Smirnov
7e2a987f8a model: remove unused font width index 2018-12-15 18:47:39 +05:00
Denys Smirnov
2274cbdf8c fonts: add a function to make a text encoder from ttf font 2018-12-15 18:47:39 +05: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
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
Peter Williams
88c9b05dff Merge branch 'v3' of https://github.com/unidoc/unidoc into extract.text 2018-11-29 17:12:40 +11: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
ab62ff5060 fonts: specify rune type as a key for Chars and runeToWidth 2018-11-29 04:19:29 +02:00
Gunnsteinn Hall
e6b768c06c Remove GetAverageCharWidth 2018-11-29 01:09:34 +00:00
Denys Smirnov
5b0eaf3f3a creator: make output stable when using custom fonts; fixes #232 2018-11-29 02:56:26 +02:00
Gunnsteinn Hall
520ab09a72 Addressing review comments 2018-11-28 23:25:17 +00:00
Peter Williams
cad144cec3 Handle missing widths in text extraction 2018-11-20 15:49:28 +11:00
Peter Williams
a1d5e8dc45 Cleaned up some comments. 2018-11-10 21:41:47 +11:00
Peter Williams
a2342ec6c6 First attempt at getting font metrics by character code. 2018-11-08 15:20:12 +11:00
Peter Williams
3da4ffc5aa Merge 2018-11-01 21:33:51 +11:00
Peter Williams
b0c440dd00 Fixed text position tracking. 2018-10-30 21:55:30 +11:00
Gunnsteinn Hall
4e2e3defba Merge branch 'v3' into v3-enhance-forms 2018-10-23 12:09:01 +00:00
Peter Williams
45f6c09e39 Merge branch 'render.v3.hungarian' into extract 2018-10-19 10:05:02 +11:00
Denys Smirnov
a5b5c63f89 model: fix runes enumeration in composite fonts 2018-10-16 01:44:12 +03:00
Denys Smirnov
558fe5a420 model: use composite struct literal for initialization 2018-10-16 01:44:12 +03:00
Gunnsteinn Hall
aea91f1ba9 Merge branch 'v3' into v3-enhance-forms 2018-09-29 16:59:16 +00:00
Peter Williams
b0f5329425 Allow TrueType font files to not have PostScript entries in their "name" table. 2018-09-24 17:53:12 +10:00
Peter Williams
44563f2cae Added fontMetrics to font loader and GetAverageCharWidth to PdfFont 2018-09-19 11:12:59 +10:00
Peter Williams
b18c8ca93d Add ToUnicode map when embedding Type0 CIDType2 fonts in PDF files. 2018-09-17 17:57:52 +10:00
Peter Williams
bb709b4381 Added FontName to FontDescriptor when loading TrueType based fonts from file 2018-09-07 21:43:39 +10:00
Peter Williams
f84792531f Fixed bugs introduced into creator_test.go by font changes.
- Use pdfFontType0 Encoding value for encoding name if it is set.
- Use DW entry in CID Type2 fonts
- Encode CID fonts using 2 bytes / character
2018-09-03 10:48:31 +10:00
Peter Williams
4ae7016b94 Moved FontDescriptor from Type0 font dict to DescendantFont dict 2018-08-29 21:30:05 +10:00
Gunnsteinn Hall
7bac3c779c Merge branch 'v3' into enhance-forms 2018-08-03 21:15:21 +00:00
Peter Williams
63afbb525c doc changes after pull request review 2018-07-25 16:14:19 +10:00
Peter Williams
eb80c88da9 Made CIDSystemInfo a PdfObjectDictionary 2018-07-25 14:29:39 +10:00
Peter Williams
84a4e0ebbf Removed GetArrayVal 2018-07-25 13:19:09 +10:00
Peter Williams
e886846c6a Changes after pull request review 2018-07-24 21:32:02 +10:00
Hiroshi Muramatsu
994b69e970 Embed common font fields 2018-07-23 14:55:23 +10:00
Hiroshi Muramatsu
5257855e29 Define font descriptor flags 2018-07-23 13:21:13 +10:00
Peter Williams
502836666d Merge remote-tracking branch 'upstream/v3' into render.v3 2018-07-21 21:20:39 +10:00