Repository navigation
Typed signatures draw Cyrillic and Greek letters (#846) - #963
Merged
echelon merged 2 commits intoOct 11, 2026
Merged
Conversation
Dancing Script, the typed-signature face, is Latin and Vietnamese only, so script_outline skipped every Cyrillic or Greek character and a Serbian Cyrillic name came out empty. Characters the script lacks are now drawn from the bundled Inter Regular, slanted about 12 degrees and scaled to the script's capital height. Characters neither face has are still skipped. Inter's bytes are now exported as pdfcraft_fonts::INTER_REGULAR and the UI uses that static, so the font is still embedded once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
Thank you, @DWAA1660! This has landed on main: "Typed signatures draw Cyrillic and Greek letters (#846)". It also supersedes #973. Please join us on Discord if you haven't already: https://discord.gg/artcraft |
h-a-n-a-s-h-i
pushed a commit
to kekeandzeyu/pdfcraft
that referenced
this pull request
Oct 11, 2026
…ept and reported) script_missing also consults the Inter fallback that typed signatures draw Cyrillic and Greek with since storytold#963, so those names aren't reported as undrawable. The visible-signature refusal moves onto storytold#934's appearance(doc, ...) -> Result and keeps checking the name even with a graphic (the name is still written among the Helvetica details). sign_document's typed graphic.text is refused like fill_sign_add's when the script font and fallback can't draw it. ATTRIBUTION from main with catalog hashes refreshed.
Merged
11 of 12 tasks
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.
What was wrong
Typed signatures and initials are drawn from Dancing Script's glyph outlines (
pdfcraft_fonts::script_outline). Dancing Script only covers Latin and Vietnamese, soscript_outlineskipped every Cyrillic or Greek character. A Serbian Cyrillic name like "Саша Дермановић" came out with no outlines: no preview, and nothing to place.The fix
crates/fonts/src/script.rs:script_outlinenow falls back to the bundled Inter Regular for characters the script face lacks. The fallback glyphs are slanted about 12° so they lean like the script, and scaled so their capitals match Dancing Script's cap height. Latin text is drawn exactly as before. Characters neither face has (Hebrew, CJK, …) are still skipped, as they are now.pdfcraft_fonts::INTER_REGULAR, andui-egui/src/theme.rsuses that static instead of its owninclude_bytes!, so the font is still embedded only once.ATTRIBUTION.toml/ATTRIBUTION.md: Inter Regular's usage line now mentions the typed-signature fallback. The file and its hash are unchanged.Rendered outlines (Latin, Serbian Cyrillic, mixed, Greek) were checked by eye. Mixed names keep every letter in order.
How tested
script::tests::cyrillic_and_greek_names_are_drawn_from_the_fallback_face: every letter of several Serbian Cyrillic names and a Greek name has an outline; the bounds stay within the layout box; Cyrillic capitals are about as tall as Latin ones; mixed Latin/Cyrillic names keep both. It fails on main.cargo fmt --all -- --checkcargo +1.99.0 clippy -p pdfcraft-fonts -p pdfcraft-ui-egui --all-targets -- -D warningscargo +1.99.0 test -p pdfcraft-fonts(35),cargo +1.99.0 test -p pdfcraft-ui-egui --test fill_sign(22)cargo xtask assetsandcargo test -p xtask(42)Not changed: parity/ (
form.fill-sign-signaturecurrently has two evidence lists, which #953 fixes) and ROADMAP.md, to stay out of their way.Related: #437 (Hebrew UI) adds
script_missingto keep Apply off for names the script can't draw. That still applies to scripts neither face covers.Fixes #846
Duplicates: none found (searched "typed signature", "Cyrillic signature", "Dancing Script"). Seen along the way: #899 looks like a duplicate of #446 (Linux "Use system setting" theme), both covered by c933782 on main.
🤖 Generated with Claude Code