Skip to content

Typed signatures draw Cyrillic and Greek letters (#846) - #963

Merged
echelon merged 2 commits into
storytold:mainfrom
DWAA1660:fix/846-typed-signature-cyrillic
Oct 11, 2026
Merged

echelon merged 2 commits into
storytold:mainfrom
DWAA1660:fix/846-typed-signature-cyrillic

Conversation

@DWAA1660

Copy link
Copy Markdown
Contributor

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, so script_outline skipped 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_outline now 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.
  • Inter's bytes are exported as pdfcraft_fonts::INTER_REGULAR, and ui-egui/src/theme.rs uses that static instead of its own include_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

  • New 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 -- --check
  • cargo +1.99.0 clippy -p pdfcraft-fonts -p pdfcraft-ui-egui --all-targets -- -D warnings
  • cargo +1.99.0 test -p pdfcraft-fonts (35), cargo +1.99.0 test -p pdfcraft-ui-egui --test fill_sign (22)
  • cargo xtask assets and cargo test -p xtask (42)

Not changed: parity/ (form.fill-sign-signature currently has two evidence lists, which #953 fixes) and ROADMAP.md, to stay out of their way.

Related: #437 (Hebrew UI) adds script_missing to 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

DWAA1660 and others added 2 commits October 11, 2026 00:46
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>
@echelon
echelon merged commit cc344a2 into storytold:main Oct 11, 2026
@echelon

echelon commented Oct 11, 2026

Copy link
Copy Markdown
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typed signatures in Fill & Sign do not render Serbian Cyrillic characters

2 participants