- Fix a systemic centering bug: several canvas text() calls used
align:'center' but passed the box's left edge as x instead of its
midpoint, so headings, badge numbers, checkmarks and chip labels
rendered pinned to the left instead of centered (most visible on
cream-elegance's "МЕНЮ" heading and neon-menu's guest badge).
- Fix cream-elegance's category icons: the emoji glyph was never
actually passed into iconCircle, so the icon circles rendered empty.
- Even out cream-elegance's bottom row (stat cards vs price band had
mismatched heights).
- Load distinctive Cyrillic-friendly type pairs instead of default
Arial/Georgia: Playfair Display + Montserrat for cream-elegance,
Unbounded + Manrope for neon-menu, awaited via the Font Loading API
before each render so text never draws in the fallback face.
- Narrow the Settings gallery to just these two templates per request
("остановимся на 2х пдф пока"); the other 4 signature designs and
the original 13 classic templates stay intact and renderable for any
order that already used one, just not offered for new ones.
Verified via a local static server (public/, http-server) with a real
uploaded box photo run through window.SunSignatureOfferPDFV18 and the
production sunClientOfferDebugPdfPages pipeline directly — 3 pages,
no duplicate cover, both fonts confirmed loaded via document.fonts.check.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
renderOfferPdfPages routed the signature templates' inner pages back
through the classic module's own renderPages, which drew its own
extra cover page on top of the real content pages -- doubling the
render work and producing an extra page. Route straight to the plain
base renderer instead. Also await the gourmet-hero template's photo
cards instead of firing them off unawaited.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
New "signature" template pack (cream-elegance, neon-menu,
emerald-circles, midnight-checklist, gourmet-hero, diamond-gold)
replaces the visible template gallery in Settings. The previous 13
classic/archive templates keep rendering correctly for any existing
order that already used one, but are no longer selectable for new
orders — nothing was deleted.
Also adds a Settings option to upload a custom logo and company name
for PDF documents, replacing the hardcoded "Солнце Кейтеринг" branding
wherever a logo fails to load.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>