Annotate fonts + underline, signature pad upgrades, editor polish#129
Merged
Conversation
- Bigger pad for tablet/pencil signing: intrinsic 500×200 → 600×360 (5:2 → 5:3, ~50% taller signing area) at higher resolution for crisp stylus strokes. The intrinsic ratio drives the displayed height (width is panel-bound), so it scales without distorting the placed/exported signature. - Draw/Upload is now a sliding-thumb segmented tab (the shared Segmented control used by Crop's "All pages / This page") instead of two separate buttons.
Expand the text tool's font picker from 3 to 14 families and add an underline toggle alongside bold/italic. Fonts: a PDF can only render Helvetica/Times/Courier without embedding, so the new families (Roboto, Open Sans, Lato, Montserrat, Poppins, Merriweather, Lora, Playfair Display, Roboto Mono, Source Code Pro, Oswald) are bundled Latin-subset TTFs (SIL OFL / Apache — see public/fonts/README.md), self-hosted so the app stays offline-first. At burn time they're fetched + fontkit subset-embedded into the exported PDF; the same TTF backs the on-canvas @font-face preview, so what you place is what exports. Single FONT_FAMILIES registry drives the picker, the preview, and the burn so they can't drift. Bold/Italic/Bold-Italic per family (Oswald has no italic → the toggle disables); TTFs are not precached (the glob omits .ttf) and instead runtime-cached on first use to keep the install lean. Underline is a drawn rule (font-independent), rendered identically in the canvas preview, the inline editor, and the PDF burn. Adds @pdf-lib/fontkit. Verified: vp check, vp test (316), vp build, a new e2e (annotate-fonts.e2e.ts — picker lists 14, places underlined Roboto, asserts the export embeds a Roboto subset), and editor-smoke for no regressions.
…ont italic Audit follow-ups on the recently-added work: - signature: export now crops to the ink bounding box. The pad was enlarged to 600x360 for tablet/pencil signing, but exporting the whole canvas wrapped small signatures in transparent margins, so they placed undersized + offset. - command palette: restore focus to the opener on close (was dumped on <body>); wire the ARIA combobox pattern (aria-activedescendant / aria-controls / option ids); honour prefers-reduced-motion for the arrow-key auto-scroll. - annotate: clear a stale italic flag when switching to a family with no italic (e.g. Oswald) and stop cssFont synthesizing an oblique the PDF burn can't — fixes a WYSIWYG mismatch for no-italic families / legacy drafts. - readme: note the richer annotate text (14 fonts, bold/italic/underline).
Annotate fonts + underline, signature pad upgrades, editor polish
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
cloakpdf | 5f063d8 | Commit Preview URL Branch Preview URL |
Jun 23 2026, 10:37 AM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promotes the latest
devwork tomain(production). Bundles #128.Highlights
Annotate — rich text
Signature
Editor polish
prefers-reduced-motionauto-scroll.Testing
vp checkclean ·vp buildclean · 316/316 unit tests🤖 Generated with Claude Code