6 Commits

Author SHA1 Message Date
Jake Holland
54e6600f1c
Fix precision rounding issues in LineWrapper (#1595)
* Fix further LineWrapper precision issues

* add test of bounded text precision issue

* add rowSpanning table example

* add failure threshold

* implement toContainText jest matcher

* create a unit test for bounded text precision

* remove round up rounding code path

---------

Co-authored-by: Luiz Américo Pereira Câmara <blikblum@users.noreply.github.com>
2025-05-02 23:05:11 -03:00
Jake Holland
033ba3426b
Add support for tables (#1577)
* Add page size utilities

- Added page.contentWidth
- Added page.contentHeight

* Add table support

- Tables support cell customization (including colors)
- Tables also support rotatable text (with alignment support)
- Tables have accessibility support

* chore: fix code generation context

- code generation now respects the current document positioning to allow use of page dependent operations

* chore: remove comments from build

* removed unnecessary config optimisations

* Optimize table minification

* Performance improvements to tables

* Improve font handling in tables
2025-02-24 07:49:25 -03:00
Jake Holland
868e9be3c4
Fix text overflow issues in boundsOfString (#1594) 2025-01-27 16:45:20 -03:00
Jake Holland
73d86db95e
Fix side normalize when non-object (#1585) 2025-01-13 13:04:06 +01:00
Jake Holland
36549b3946
Add support for dynamic sizing (#1576)
* Add support for dynamic sizing

- Enable defining sizes using any units (defaulting to Points)
- This also allows us to define sizes based on the current font context i.e. em's
- The new public `sizeToPoint` method allows users to also interact with these sizes to generate the correct point sizes

* Optimise side normalization

* Added test case for one margin being undefined
2025-01-12 18:17:13 -03:00
Jake Holland
40a0f383a7
Fix precision rounding issues in LineWrapper (#1583)
Handle JS quirks with large decimal precision checks resulting from the calculations of next lines in the LineWrapper
2025-01-11 13:16:17 +01:00