239 Commits

Author SHA1 Message Date
Peter Williams
bb709b4381 Added FontName to FontDescriptor when loading TrueType based fonts from file 2018-09-07 21:43:39 +10:00
Peter Williams
4d5156c4a0 Added NewStandard14FontMustCompile 2018-09-07 19:11:58 +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
Peter Williams
adb16cd150 Moved files to new UniDoc directory layout. 2018-08-23 21:51:32 +10:00
Peter Williams
b7f1f3e291 Merge branch 'v3' of https://github.com/unidoc/unidoc into render.v3.hungarian 2018-08-22 22:01:00 +10:00
Peter Williams
660c1b934b added change left out of previous commit 2018-08-22 15:05:34 +10:00
Peter Williams
b641b2b627 don't return a glyph for rune \x00 2018-08-22 15:02:52 +10:00
Peter Williams
e5ec5406f6 Changes to get creator working better.
- textencoding.RuneToGlyph always returns a value
- Encode empty /Difference correctly
- NewParagraph sets a custom encoding that matches its text
2018-08-22 14:51:50 +10:00
Peter Williams
cc4f64fa98 small tidy up 2018-08-21 12:43:51 +10:00
Peter Williams
d96f963de2 Changed Encode signature from Encode(raw string) string to Encode(raw string) []byte. 2018-08-20 20:13:10 +10:00
Peter Williams
b9561f0671 file left out of previous commit 2018-08-20 18:37:47 +10:00
Peter Williams
8b6a14a2f9 Added a function to create an encoder for a specified alphabet for simple fonts. 2018-08-20 17:58:01 +10:00
Peter Williams
c2feafdfdc Fixed some issues in creator code
Stopped double converting from Go strings to PDF encoded strings
Added TTF parse table format 12
2018-08-17 08:41:35 +10:00
Peter Williams
ffa7f9b482 Changed the literal rune maps in simple.go to use hex numbers rather than character codes.
Go sometimes subsitutes literal character codes (e.g. '\u2206') with other runes. This doesn't
happen if the literal is written as a number (e.g. 0x2206 ). I am not sure why Go does this.
2018-08-15 17:15:27 +10:00
Peter Williams
d64785a8ca Added more font tests 2018-08-14 21:28:57 +10:00
Peter Williams
26e6e114ad removed debug code that was accidentally commited 2018-08-14 12:01:12 +10:00
Peter Williams
aa88d8510a Cleaned up glyph<->unicode maps
These maps had been getting messy which made it hard for me to update them.

This change builds the full maps from source files which are included in the commit.
2018-08-14 11:56:09 +10:00
Gunnsteinn Hall
a49bdcb8f8 Change PdfWriter dependency from io.WriteSeeker to io.Writer - enabling PDF memory output 2018-08-13 13:58:38 +00:00
Gunnsteinn Hall
e254fd763c Move test and supplementary files to nearest package testdata. 2018-08-03 11:01:39 +00:00
Gunnsteinn Hall
0b25fcc4e7 golint and godoc fixes in textencoding 2018-08-03 10:18:44 +00:00
Gunnsteinn Hall
6c34f32c7f Updating headers and package descriptions 2018-08-03 10:15:42 +00:00
Gunnsteinn Hall
a505bf67dd Move supplementary files to testdata folders 2018-08-03 10:13:21 +00:00
Gunnsteinn Hall
1321303950 Address golint for interface methods 2018-08-02 10:48:44 +00:00
Gunnsteinn Hall
7c4b1640ef Address golint comments 2018-08-02 00:29:47 +00:00
Gunnsteinn Hall
cc44dd2552 Merge branch 'master' into v3 2018-08-01 22:04:27 +00:00
Gunnsteinn Hall
5f330db891 Move ps back from internal. Address multiple golint comments. 2018-08-01 20:27:34 +00:00
Gunnsteinn Hall
7fe68915cc Disable trace logging when running tests 2018-08-01 13:19:05 +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
6b73b0d9eb Added more glyphs 2018-07-31 11:52:04 +10:00
Peter Williams
435bb91cb0 Explain Fall back to StandardEncoding. 2018-07-26 14:36:40 +10:00
Peter Williams
ac48862c39 Moved font test data to contrib/testdata/font 2018-07-25 18:10:41 +10: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
b1cf3494f7 Removed naked returns. Fixed godoc. Reorganized object extractors 2018-07-25 12:00:49 +10:00
Peter Williams
e886846c6a Changes after pull request review 2018-07-24 21:32:02 +10:00
Peter Williams
e2b4f908bd removed panics 2018-07-23 17:14:42 +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
Peter Williams
2468e2b264 Merge branch 'render' into render.clean 2018-07-21 14:18:48 +10:00
Peter Williams
28d2d223c4 Reduced logging noise 2018-07-21 08:53:59 +10:00
Peter Williams
c489d4630c Added some logging 2018-07-21 08:43:03 +10:00
Peter Williams
357d517498 Added tests for simple fonts and encodings 2018-07-20 22:18:18 +10:00
Peter Williams
ef97dd1d59 Added a test for font encodings with /Difference entries 2018-07-20 14:15:41 +10:00
Peter Williams
bb1c8197a0 Added a test for cmap beginbfchar and beginbfrange entries 2018-07-20 11:39:41 +10:00
Peter Williams
879b07df16 Added a test for CharcodeBytesToUnicode for Type0 ToUnicode cmaps 2018-07-19 10:28:23 +10:00
Peter Williams
6b507a21d7 fixed comments 2018-07-18 14:50:52 +10:00
Peter Williams
5d513ac8cf Removed debug code 2018-07-18 14:34:46 +10:00