diff --git a/lib/pdf-business-card.tsx b/lib/pdf-business-card.tsx index 9dac9d70..715d8550 100644 --- a/lib/pdf-business-card.tsx +++ b/lib/pdf-business-card.tsx @@ -17,6 +17,23 @@ import { } from '@react-pdf/renderer'; import * as path from 'path'; +// Register embedded fonts so Ghostscript -dNoOutputFonts can convert them to +// outlines (curves). Built-in PDF fonts like Helvetica are NEVER embedded and +// therefore cannot be outlined — always use a physical font file here. +Font.register({ + family: 'Inter', + fonts: [ + { + src: path.join(process.cwd(), 'public', 'fonts', 'Inter-Regular.woff'), + fontWeight: 'normal', + }, + { + src: path.join(process.cwd(), 'public', 'fonts', 'Inter-Bold.woff'), + fontWeight: 'bold', + }, + ], +}); + export interface PersonData { name: string; role: string; @@ -48,7 +65,7 @@ const styles = StyleSheet.create({ height: '61mm', backgroundColor: COLORS.primary, position: 'relative', - fontFamily: 'Helvetica', + fontFamily: 'Inter', overflow: 'hidden', }, pageBleedBack: { @@ -56,7 +73,7 @@ const styles = StyleSheet.create({ height: '61mm', backgroundColor: COLORS.white, position: 'relative', - fontFamily: 'Helvetica', + fontFamily: 'Inter', overflow: 'hidden', }, @@ -108,7 +125,9 @@ const styles = StyleSheet.create({ flexDirection: 'column', justifyContent: 'center', alignItems: 'center', - gap: 6, // Increased gap for more spacing under tagline + // Extra top padding so tagline text has breathing room from the green border + paddingTop: 6, + gap: 5, }, frontIconsGroup: { flexDirection: 'row', @@ -258,15 +277,14 @@ const styles = StyleSheet.create({ justifyContent: 'center', alignItems: 'center', borderTop: `0.5pt solid ${COLORS.grayText}`, - paddingTop: '2mm', + paddingTop: '3mm', marginTop: 'auto', }, addressFooterText: { - fontSize: 5, - color: COLORS.neutralDark, - letterSpacing: 1.5, - textTransform: 'uppercase', - fontWeight: 'bold', + fontSize: 6, + color: COLORS.grayText, + letterSpacing: 0.3, + fontWeight: 'normal', }, }); @@ -788,7 +806,7 @@ export const PDFBusinessCard: React.FC = ({ - KLZ Vertriebs GmbH • Raiffeisenstraße 22 • 73630 Remshalden + KLZ Vertriebs GmbH · Raiffeisenstraße 22 · 73630 Remshalden