Commit Graph

32 Commits

Author SHA1 Message Date
Eliot Jones
198cca1336 change point size calculation to use rotation #41
point size was previously only calculated based on the transformation matrix but now uses the transformation matrix, the rotation matrix and the font matrix values. the calculated value still seems unlikely to be correct so it is exposed using the page's experimental access for now, rather than as a public getter.
2019-07-07 12:12:09 +01:00
Eliot Jones
c495065178 support gs operator, fix systemfonts, apply rotation to glyphs
- begin adding support for extended graphics state (the 'gs' operator) including setting the font #39.
- apply page level rotation to the glyph bounding box and width to get correct glyph sizes #41.
- wrap page rotation in a value type to ensure the value is restricted to right angle rotations and provide convenience members #42.
- fix bug where system font finder never worked for truetype fonts because it began reading the file from the wrong offset.
2019-07-06 14:03:23 +01:00
BobLd
65647febcf - Adding a TextDirection enum.
- In the Letter class:
     - Renaming 'Location' to 'StartBaseLine' and adding 'EndBaseLine' for better localisation of the letter ('Location' is also kept).
     - Adding TextDirection.
2019-04-19 21:33:31 +01:00
Eliot Jones
245efae8ed fixes various font handling issues for type 1 and truetype fonts
handle "unionsq" and other tricky glyph names. log missing glyphs. ignore flexpoints in type 1 subroutines. improve system font performance and substitution. handle truetype fonts using standard 14 fonts.
2019-01-12 13:54:16 +00:00
Eliot Jones
cdf5546a1b #24 add the missing operations for the graphics state 2019-01-06 15:47:33 +00:00
Eliot Jones
406f0e6184 #24 add missing marked content operators, still 2 to go 2019-01-06 11:34:25 +00:00
Eliot Jones
cd84edbdc8 #26 add missing operation and expose the content stream directly to the user through the page 2019-01-04 19:54:55 +00:00
Eliot Jones
611786855b #26 make all operations writable and test 2019-01-04 19:17:54 +00:00
Eliot Jones
2a30631ab7 #26 make all operation classes public and test 2019-01-04 18:55:36 +00:00
Eliot Jones
5c8a77bf33 #26 make almost all operators public 2019-01-03 22:20:53 +00:00
Eliot Jones
29daeb5806 #26 prepare more content stream operations for public api 2019-01-02 23:14:13 +00:00
Eliot Jones
ea9ac795ff #26 add writing logic and comments to more graphics state operations 2019-01-01 18:00:04 +00:00
Eliot Jones
4d5518a599 move annotations to experimental access, support changing color state for document creation and update readme 2018-12-30 14:12:04 +00:00
Eliot Jones
713d600ee7 remove unused code and add writing support for more graphics operations 2018-12-25 10:51:36 +00:00
Eliot Jones
39786ac00a #21 add a test for accented characters and fill in more writing methods for content stream operators
the output is currently incorrect for accented characters
2018-12-14 18:33:01 +00:00
Eliot Jones
924fc7b37f #21 support writing lines, curves and rectangles. add documentinformation to output. rename characterpath 2018-12-12 00:09:15 +00:00
Eliot Jones
d6a896dcb0 #21 enable document creation using standard 14 font to test output 2018-12-02 16:14:55 +00:00
Eliot Jones
997979cc92 #11 early access to the raw xobjects for images.
temporary 'safe' untested implementation of seac for type 1 charstrings.
make structure public
bump version of package and project to 0.0.3 (it had accidentally increased to 0.0.5)
2018-11-26 19:46:41 +00:00
Eliot Jones
b9c8e152c1 #16 change letter api to match the actual information 2018-11-22 19:32:16 +00:00
Eliot Jones
0f68dfeb19 #10 move tokens to the root namespace for discoverability. upgrade xunit versions. there is a bug with test discovery for stringtokenizertests 2018-11-16 20:00:12 +00:00
Eliot Jones
7e1bcf6f64 bug fixes for reading from type 1 fonts. test all pages in documents. use content rather than embedded resources for #4 2018-11-15 19:52:42 +00:00
Eliot Jones
1fe54c5f49 add xobjects to pages, fix parsing truetype fonts where the glyphs use the repeat flag. 2018-04-26 22:22:29 +01:00
Eliot Jones
b6585292fb start adding support for reading and applying XObjects 2018-04-21 16:24:37 +01:00
Eliot Jones
0e844d88df return both glyph and character bounding boxes for each letter, glyph is the actual outline of the letter whereas character is the surrounding space as defined in the pdf 2018-04-18 19:24:10 +01:00
modest-as
d65f50dfd1 fixed coordinate space transformations 2018-04-11 23:18:24 +01:00
modest-as
564e32e072 Return bounding boxes for letters 2018-03-30 23:16:54 +01:00
Eliot Jones
3172596b7c remove all old cos objects 2018-01-21 14:56:50 +00:00
Eliot Jones
c5e3ce7ec7 finish moving all parsing to token scanner 2018-01-20 00:49:53 +00:00
Eliot Jones
a0deab446b switch classes still using the cos object approach to the tokenization approach initally used for parsing cmap files. 2018-01-19 00:35:04 +00:00
Eliot Jones
b64eeffce2 add a flag to throw if the unicode lookup fails for a character 2018-01-14 19:01:58 +00:00
Eliot Jones
ba8d2f5b1d fix a bug with tokenization without spaces before string 2018-01-10 22:15:29 +00:00
Eliot Jones
ec62542b64 change the project name to something silly 2018-01-10 19:49:32 +00:00