5 Commits
Author SHA1 Message Date
jessikittyandClaude Opus 5 4c05763a35 Never silently fall back to a 10-pixel font
This is why printed labels were illegible. Pillow uses a built-in bitmap
font when it cannot load a TrueType one, and that font ignores the size it
is asked for - at 300dpi it draws letters under a millimetre tall, which
no Text size setting could fix. python:3.12-slim ships no fonts at all.

load_font now tries LABEL_FONT, a wider list of system paths, a scan of
the font directories, matplotlib's bundled DejaVu, and finally Pillow's
scalable default. font_report() says which one won, so the pages can warn
instead of quietly printing micro-text.

render_fixed also takes a dpi, so the Dymo path draws at 300 rather than
being resampled from 313.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 12:01:19 +11:00
jessikittyandClaude Opus 5 fbfd66d889 Hand-built label groups, and text that grows when you ask it to
parse_group_spec / spec_from_groups let the page combine any parts onto
one label, and plan_groups never breaks a hand-made group up.

Text size now goes to 3x and means it: the name is sized first, the
image shrinks out of its way, and the floor no longer rises with the
setting - which is what truncated long names at large sizes. The meta
line takes the leftover room instead of pushing itself off the label.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 10:30:10 +11:00
jessikitty d86a71de67 Fixed 40 x 15mm drawer labels, 40 x 20mm for a shared drawer
Drawer labels are now a set physical size rather than however long the
text happens to be:

  one part type in the drawer    40 x 15 mm
  two part types                 40 x 20 mm

They lie across the tape, so the 40mm spans the width and each label only
costs its height in tape length - 1.5m per 100 standard labels instead of
4m. That needs 50mm tape, which is now the default; a narrower tape is
detected and warned about rather than silently clipping.

Two part types in one drawer are matched on the location field and
combined onto a single taller label. Nothing is ever dropped: in
"always 40 x 15" a shared drawer simply yields two labels, and a third
part type grows the label by 5mm rather than vanishing.

Part names are wrapped to two lines and the type auto-sized to fit, so
"Plate, Modified with Clip" prints in full instead of truncating.

"Fit the tape width" keeps the previous content-sized behaviour.
2026-10-12 22:42:01 +11:00
jessikitty 4a1bfc4acd Fix: unticking "Rotate for tape feed" had no effect
An unticked checkbox is absent from a form submission entirely, so
"rotate unticked" and "rotate never mentioned" arrived at the parser
looking identical - and rotate defaults to on, so it snapped straight
back every time. Add a hidden marker the options form always sends, so
absent-but-submitted can be read as unticked.

Same bug silently reset the field list when every field was unticked;
that is fixed by the same marker. rotate_default lets a saved site-wide
preference apply on a fresh arrival without overriding an explicit
untick on the page.
2026-10-12 22:08:51 +11:00
jessikitty 7d32ad8fd6 Add 313dpi continuous-tape rendering for the VC-500W 2026-10-12 21:26:02 +11:00