-
Notifications
You must be signed in to change notification settings - Fork 1.2k
WIP: New Text Renderer #1628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
WIP: New Text Renderer #1628
Conversation
This stops jest being the limiting factor which is stopping the use of ESM only packages
Great work. Aside from UTF16 support what is different in the new lib? Wondering if with this change will be possible to render a text box with custom background / borders |
Hi @blikblum, The new changes are mainly a complete rewrite of how we handle text processing, both to enable rotation handling more smoothly as well as finally sort out those pesky numerical errors we've been getting. Yep just sorting backgrounds now along with a few other text based improvements such as font contexts |
- Remove support for node18 - Add support for node24
@blikblum quick question do we still need the |
Its used by the bundlers like webpack |
Added a new commit to fix the build process (not technically part of the scope of this task, but was needed to ensure the build would work). Have tested with browserify, webpack, native browser import, esm, cjs, umd (standalone), and umd through unkpg |
- Current process fails on the external dependencies - This modernizes both the test and build process - And fixes the package defined exports
Still working on this, been sorting out testing and fixing bugs found along the way |
THIS IS A WIP, to allow you to contribute feedback/changes
What kind of change does this PR introduce?
LayoutEngine.text
: render the same as existing using the PDF spec rules on positioning (this means rotated text can go above the start position)LayoutEngine.textBox
: render text from the top left of the text bounds (this means that rotated text is forced inside the text boxLayoutEngine.box
: render a simple rectangle (but this can be rotated)Checklist:
Based on #1625