Skip to content

Labels: embed Unicode-capable fonts — non-Latin tool names garble on printed labels #58

Description

@sliptonic

What to build

Label PDFs (spec_label_sheets.py, label_sheets.py) use ReportLab's base-14 fonts (Helvetica, Courier), which are effectively Latin-1 only. A tool named in Japanese, Chinese, Korean — or even Polish — garbles on a printed label today. Labels are server-rendered artifacts: no client can fix this, so full Unicode fidelity for user data on labels is a core obligation regardless of any translation plans.

Scope:

  • Embed a Unicode-capable font family (Noto or DejaVu; needs a bold + regular + mono equivalent for the Courier code line).
  • Re-verify _truncate widths and all three painters (compact, roomy, plaque) — text metrics change with the font, and the 0.12.0 roomy layouts were hand-tuned.
  • Ratify (glossary/SPEC_LABELS.md one-liner) that spec-line abbreviations (Ø, FL, LOC, OAL, tip, °) are machinist lingua franca and stay untranslated by design.
  • Mind container size: font files ship in the Docker image.

Demoable: a tool named 超硬エンドミル 6mm renders correctly on all label stocks.

Acceptance criteria

  • CJK and Latin-Extended tool names render correctly on every stock/template
  • Truncation still behaves (no overflow, no mid-glyph clipping) on all painters
  • Spec abbreviations ratified as untranslated in docs
  • Visual spot-check of existing English labels (no layout regression)
  • Docker image size impact noted in the PR

Blocked by

None - can start immediately

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions