Postkarte: Trennstrich als dünne Kugelschreiber-Linie + mehr Abstand nach Absender
All checks were successful
Build & Deploy / deploy (push) Successful in 10s
All checks were successful
Build & Deploy / deploy (push) Successful in 10s
- Trennstrich jetzt Single-Stroke (stroke-width 0.6, non-scaling, keine Füllung) wie die Handschrift statt 1,2-mm-Balken. - Brieftext beginnt bei y≈18 mm (statt 14) → mehr Luft nach dem Absender. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -503,7 +503,8 @@ function generatePostcardSVG(text, format, options = {}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Text links (L-förmig). Nur DER Text kann „zu lang" sein (Nutzer kürzt ihn).
|
// Text links (L-förmig). Nur DER Text kann „zu lang" sein (Nutzer kürzt ihn).
|
||||||
const baseline0 = mmToPx(14) + fontSizePx;
|
// Etwas Abstand nach dem Absender (Absender endet bei y≈12 mm).
|
||||||
|
const baseline0 = mmToPx(18) + fontSizePx;
|
||||||
bodyLineLimit = Math.max(1, Math.floor((mmToPx(maxYmm) - baseline0) / lineHeightPx) + 1);
|
bodyLineLimit = Math.max(1, Math.floor((mmToPx(maxYmm) - baseline0) / lineHeightPx) + 1);
|
||||||
if (body) {
|
if (body) {
|
||||||
const bodyLines = flowVariabel(body, fontSizePx, baseline0, lineHeightPx);
|
const bodyLines = flowVariabel(body, fontSizePx, baseline0, lineHeightPx);
|
||||||
@@ -561,8 +562,9 @@ function generatePostcardSVG(text, format, options = {}) {
|
|||||||
/>`)
|
/>`)
|
||||||
.join('\n ');
|
.join('\n ');
|
||||||
|
|
||||||
// Trennstrich (solide Linie, 1,2 mm breit) zwischen Text und Adressfeld.
|
// Trennstrich: einfache Kugelschreiber-Linie (Single-Stroke, keine Füllung) –
|
||||||
const trennstrich = `<path d="M ${mmToPx(trennXmm).toFixed(1)} ${mmToPx(addrTopMm).toFixed(1)} L ${mmToPx(trennXmm).toFixed(1)} ${mmToPx(maxYmm).toFixed(1)}" stroke="#000000" stroke-width="${mmToPx(1.2).toFixed(1)}" stroke-linecap="butt" fill="none"/>`;
|
// gleiche Strichstärke wie die Handschrift, damit die Ballpoint-Optik greift.
|
||||||
|
const trennstrich = `<path d="M ${mmToPx(trennXmm).toFixed(1)} ${mmToPx(addrTopMm).toFixed(1)} L ${mmToPx(trennXmm).toFixed(1)} ${mmToPx(maxYmm).toFixed(1)}" stroke="#000000" stroke-width="0.6" fill="none" stroke-linecap="round" vector-effect="non-scaling-stroke"/>`;
|
||||||
|
|
||||||
const svg = `<svg xmlns="http://www.w3.org/2000/svg"
|
const svg = `<svg xmlns="http://www.w3.org/2000/svg"
|
||||||
width="${W}mm"
|
width="${W}mm"
|
||||||
|
|||||||
Reference in New Issue
Block a user