Commit Graph

24 Commits

Author SHA1 Message Date
BobLd
2d6cb1aa0c Properly implement Quadtratic and Cubic bezier-curves and use Quadtratic in CalculatePath to fix #625 2024-04-05 11:33:59 +01:00
Jason Nelson
1d2777d59a [Tests] Enable implict usings 2024-03-16 07:40:17 +00:00
BobLd
9f3d2745f6 Change NumericToken from IDataToken<decimal> to IDataToken<double> and fix #765 2024-02-18 14:53:38 +00:00
BobLd
6103cf13dc Fix CID / CFF font glyphs and add tests 2024-01-20 16:40:31 +00:00
BobLd
4e63e2c415 Add visual verification tests for letter glyphs 2024-01-15 13:01:24 +00:00
BobLd
0da7bbf3d4 Replace System.Drawing by SkiaSharp in Tests 2024-01-14 20:09:57 +00:00
mvantzet
147b8997cc
Fix glyph bounding box for Type3 font with zero height (#610)
* For Type3 font with a zero width/height bounding box, set it to a sensible
default using the font matrix. This ensures the letter bounding boxes will
not have height 0.

* Also added a test to check for non-zero height in the sample Type3 PDF

* Prevent division by zero error

---------

Co-authored-by: mvantzet <mark@radialsg.com>
2023-04-19 08:55:34 +01:00
BobLd
93a2f318aa
Fix Type 3 font height and fix #500 (#585) 2023-03-26 19:20:20 +01:00
mvantzet
a439b43246 Added integration test for cropped document, and a cropped+rotated document
with an annotation as well.
Added annotations to visual verification test (blue outlines).
2023-03-13 18:08:20 +01:00
Eliot Jones
25314cc79d #161 change rotation to fix values and page size
this doesn't account for images and pdf paths yet.
2020-04-18 18:04:41 +01:00
Eliot Jones
3243be3ec5 change rectangle drawing logic for tests
support rotated output rectangles in the visual verification tests.
2020-01-22 13:45:52 +00:00
Eliot Jones
a4305cc86c test letter positions with truetype standard14 mutant. fix truetype table overflow. read compact font format encodings 2019-01-12 18:07:53 +00:00
Eliot Jones
b6a528a97d #9 add support for cff cid fonts, currently bounding box and width are calculated incorrectly. 2019-01-07 20:52:42 +00:00
Eliot Jones
243f3dc099 #13 handle special case cff file and reduce duplication in integration tests 2018-11-25 12:36:38 +00:00
Eliot Jones
87fccbbadc #15 add word boxes to the visual verification tests 2018-11-25 10:17:01 +00:00
Eliot Jones
30cfd12155 favour pdf level widths over advance widths for truetype. fix image sizes for visual verification tests 2018-11-23 18:46:48 +00:00
Eliot Jones
3a025052c9 add test for type 1 cff glyph locations and add missing doc comments 2018-11-19 21:43:22 +00:00
Eliot Jones
c72f3796e2 add inkscape document. fix bug with truetype width where no font program present 2018-11-15 22:51:46 +00:00
Eliot Jones
099f270986 add visual verification for type 1 output, currently seems off by some amount, could be font matrix 2018-11-15 20:21:13 +00:00
Eliot Jones
787bcd1cd2 create a test document with some rotated text to validate the transformations 2018-04-18 22:34:06 +01:00
Eliot Jones
99674f31e1 use image from another source since gimp positions appear wrong 2018-04-18 21:42:07 +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
Eliot Jones
e5cfc20b30 missing letters with width less than 1 are now drawn in the visual tests 2018-04-17 23:00:16 +01:00
Eliot Jones
53f693bc77 add tests to visually verify the output for glpyh bounding boxes and use advance widths for empty glyphs in truetype fonts 2018-04-15 12:47:08 +01:00