Skip to content

feat(ux): centralize the font registry (#2264) - #2313

Open
alfonsodg wants to merge 1 commit into
OpenSignLabs:stagingfrom
alfonsodg:pr/2264-font-registry
Open

alfonsodg wants to merge 1 commit into
OpenSignLabs:stagingfrom
alfonsodg:pr/2264-font-registry

Conversation

@alfonsodg

Copy link
Copy Markdown

Problem

Fonts were hardcoded in six different components, and the typed-signature font
list was duplicated between the modal and the canvas rendering, so the
preview and the final document could use different fonts.

Affected files

  • apps/OpenSign/src/constant/fonts.js
  • apps/OpenSign/tailwind.config.js
  • apps/OpenSign/src/components/pdf/Placeholder.jsx
  • apps/OpenSign/src/components/pdf/PlaceholderType.jsx
  • apps/OpenSign/src/components/pdf/CellsWidget.jsx
  • apps/OpenSign/src/components/pdf/PrefillWidgetsModal.jsx
  • apps/OpenSign/src/components/pdf/WidgetsValueModal.jsx
  • apps/OpenSign/src/components/bulksend/components/RenderWidgets.jsx

Fix

A single font registry holds the UI font, the signature font list and the
default signature font, and the Tailwind theme exposes the matching font
tokens.

Acceptance criteria

  • The UI font is defined in one place
  • The signature font list is not duplicated
  • The preview and the rendered document use the same fonts

Fixes OpenSignLabs#2264

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
@vercel

vercel Bot commented Oct 21, 2026

Copy link
Copy Markdown

@alfonsodg is attempting to deploy a commit to the prafull 's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI balanced review requested due to automatic review settings October 21, 2026 22:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Tailwind tokens still duplicate font definitions instead of consuming shared data, leaving the single-source-of-truth requirement unmet.

1 open issue
What changed in this PR

This PR introduces a shared font registry for OpenSign’s widget UI and typed-signature rendering, and adds matching Tailwind font tokens.

Changes:

  • Replaces hardcoded UI fonts across six widget components with UI_FONT.
  • Centralizes signature choices and defaults used by the modal, Redux state, and rendering utilities.
  • Adds Tailwind font-ui and font-signature tokens.
File Description
apps/​OpenSign/​tailwind.config.js Adds UI and signature font tokens.
apps/​OpenSign/​src/​redux/​reducers/​widgetSlice.js Uses the shared signature default in initial state.
apps/​OpenSign/​src/​constant/​Utils.js Uses the shared default for signature rendering and saving.
apps/​OpenSign/​src/​constant/​fonts.js Defines UI, signature, and document font constants.
apps/​OpenSign/​src/​components/​pdf/​WidgetsValueModal.jsx Uses shared font choices and defaults.
apps/​OpenSign/​src/​components/​pdf/​PrefillWidgetsModal.jsx Uses the shared UI font for date input.
apps/​OpenSign/​src/​components/​pdf/​PlaceholderType.jsx Uses the shared UI font for widget styles.
apps/​OpenSign/​src/​components/​pdf/​Placeholder.jsx Uses the shared UI font for placeholders.
apps/​OpenSign/​src/​components/​pdf/​CellsWidget.jsx Uses the shared UI font for cells.
apps/​OpenSign/​src/​components/​bulksend/​components/​RenderWidgets.jsx Uses the shared UI font for bulk-send date input.

Review effort: Balanced

Comment on lines +7 to +8
ui: ["Arial", "sans-serif"],
signature: ["Fasthand", "cursive"],
@alfonsodg alfonsodg changed the title feat(ux): centralize the font registry and expose Tailwind font tokens (#2264) feat(ux): centralize the font registry (#2264) Oct 22, 2026

This branch has not been deployed

No deployments
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.

2 participants