From 0c195dc3a92637748f4dc902b40e6f7f8f01e959 Mon Sep 17 00:00:00 2001 From: Thomas Reitz Date: Mon, 9 Mar 2026 12:17:47 +0100 Subject: [PATCH] fix: separate handset icon (landline) and smartphone icon (mobile) in PDF export - Landline phone: classic telephone handset with earpiece, mouthpiece and curved connector - Mobile phone: smartphone outline with display and home button Co-Authored-By: Claude Opus 4.6 --- .../expert-profile/profile-export.service.ts | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/packages/core-service/src/core/expert-profile/profile-export.service.ts b/packages/core-service/src/core/expert-profile/profile-export.service.ts index 57f3400..68077f5 100644 --- a/packages/core-service/src/core/expert-profile/profile-export.service.ts +++ b/packages/core-service/src/core/expert-profile/profile-export.service.ts @@ -175,11 +175,11 @@ export class ProfileExportService { const iconTextOffset = 18; // Abstand Icon → Text if (data.phone) { - this.drawPhoneIcon(doc, leftColX + 1, yLeft, accentColor); + this.drawHandsetIcon(doc, leftColX + 1, yLeft, accentColor); yLeft = this.pdfContactText(doc, data.phone, leftColX + iconTextOffset, yLeft, leftColWidth - iconTextOffset); } if (data.mobile) { - this.drawPhoneIcon(doc, leftColX + 1, yLeft, accentColor); + this.drawMobileIcon(doc, leftColX + 1, yLeft, accentColor); yLeft = this.pdfContactText(doc, data.mobile, leftColX + iconTextOffset, yLeft, leftColWidth - iconTextOffset); } if (data.email) { @@ -731,7 +731,27 @@ export class ProfileExportService { // --- Vektor-Icons für Kontakt --- - private drawPhoneIcon(doc: PDFKit.PDFDocument, x: number, y: number, color: string): void { + private drawHandsetIcon(doc: PDFKit.PDFDocument, x: number, y: number, color: string): void { + doc.save(); + // Klassischer Telefonhörer (Festnetz) + // Hörer-Form: oben Ohrmuschel, unten Sprechmuschel, verbunden durch Bogen + const cx = x + 4; + + // Ohrmuschel (oben) — abgerundetes Rechteck + doc.roundedRect(cx - 3.5, y - 0.5, 7, 3, 1.2).fill(color); + + // Sprechmuschel (unten) — abgerundetes Rechteck + doc.roundedRect(cx - 3.5, y + 7, 7, 3, 1.2).fill(color); + + // Verbindungsbogen (links) zwischen Ohr- und Sprechmuschel + doc.moveTo(cx - 2, y + 2.5) + .bezierCurveTo(cx - 5, y + 4, cx - 5, y + 5.5, cx - 2, y + 7) + .strokeColor(color).lineWidth(2.2).stroke(); + + doc.restore(); + } + + private drawMobileIcon(doc: PDFKit.PDFDocument, x: number, y: number, color: string): void { doc.save(); // Smartphone-Icon: abgerundetes Rechteck mit Display und Home-Button const w = 7;