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
8835230856
model: fix tests after the merge
2018-12-27 12:37:32 +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
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
0ef989c713
fonts: group similar fonts to a single file
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
c4a39a1353
Look for CharMetrics for char code 32 when finding space width.
2018-12-02 13:12:10 +11: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
33843599f2
Another round of addressing review comments
2018-11-30 16:53:48 +00:00
Denys Smirnov
fb4a087a93
textencoding: introduce GlyphName type
2018-11-29 23:24:40 +02:00
Denys Smirnov
6fddd80eba
textencoding: assert the type of differences map
2018-11-29 04:40:25 +02:00
Denys Smirnov
b91c1b8c61
model: remove unnecessary typ names in font initialization
2018-11-29 04:19:29 +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
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
Peter Williams
36a1148962
Combine diacritics in text extraction.
2018-11-28 18:06:03 +11:00
Peter Williams
a2024b8e29
Use char width 250 for standard 14 font characters without given char metrics.
2018-11-23 11:21:51 +11:00
Peter Williams
6e5e32dd92
Fixed encoding selection for standard 14 fonts.
2018-11-22 22:01:04 +11:00
Peter Williams
8b964f2008
Set font even when Tf operator is not between BT and ET.
2018-11-21 13:14:11 +11:00
Peter Williams
dcb2b14d55
Handle standard 14 TrueType fonts and stanard 14 font aliases in text extraction.
2018-11-20 17:49:37 +11:00
Peter Williams
cad144cec3
Handle missing widths in text extraction
2018-11-20 15:49:28 +11:00
Peter Williams
a9019a50a3
Fixes for text extraction corpus testing.
...
- Correct matrix multiplication order in text.go
- Look up standard 14 font widths after applying custom encoding.
2018-11-18 17:21:30 +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
Peter Williams
b23600c9f4
Merge branch 'render.v3.hungarian' into extract
2018-10-23 10:59:59 +11:00
Peter Williams
5d15dc97dd
Removed code with problematic provenance.
2018-10-23 10:44:58 +11:00
Peter Williams
86108bd2b9
Build font descriptor literals from .afm files
2018-10-23 10:36:38 +11:00
Peter Williams
45f6c09e39
Merge branch 'render.v3.hungarian' into extract
2018-10-19 10:05:02 +11:00
Peter Williams
45228219b5
Added PdfFont.FontDescriptor() which always returns a PdfFontDescriptor, possibly a builtin one for
...
the standard 14 fonts.
2018-10-18 21:12:15 +11:00
Peter Williams
2452973cfe
Don't add /Encoding entry to standard 14 font dicts.
...
Moved the standard 14 font encoders to a separate field pdfFontSimple.std14Encoder.
2018-10-16 14:50:43 +11:00
Gunnsteinn Hall
bc6391200a
Avoid outputing invalid Encoding name for generated standard fonts (use font encoding instead)
2018-10-10 22:44:55 +00:00
Gunnsteinn Hall
f4deb858ba
Fix for loading standard fonts with Encoding difference maps
2018-10-09 18:14:34 +11:00
Gunnsteinn Hall
aea91f1ba9
Merge branch 'v3' into v3-enhance-forms
2018-09-29 16:59:16 +00:00
Peter Williams
24d522bdb2
Merge branch 'v3' of https://github.com/unidoc/unidoc into extract
2018-09-24 15:25:44 +10:00
Peter Williams
75dfdb6f1c
Use Standard14Font consistently for standard 14 font names.
2018-09-21 16:25:57 +10:00
Peter Williams
44563f2cae
Added fontMetrics to font loader and GetAverageCharWidth to PdfFont
2018-09-19 11:12:59 +10:00
Peter Williams
bb709b4381
Added FontName to FontDescriptor when loading TrueType based fonts from file
2018-09-07 21:43:39 +10:00
Gunnsteinn Hall
7bac3c779c
Merge branch 'v3' into enhance-forms
2018-08-03 21:15:21 +00:00
Peter Williams
08c3211590
Refactored simple textencoding
...
Made GlyphToCode work for all tables
Moved more aliases into glyphAliases rather than leaving the duplicates in the base maps.
Use SimpleEncoder explictly for simple fonts
2018-07-31 11:52:24 +10:00
Peter Williams
435bb91cb0
Explain Fall back to StandardEncoding.
2018-07-26 14:36:40 +10:00
Peter Williams
63afbb525c
doc changes after pull request review
2018-07-25 16:14:19 +10:00