fix: register Inter woff font for curve outlining, fix tagline spacing
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 24s
Build & Deploy / 🧪 QA (push) Successful in 1m23s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled

This commit is contained in:
2026-06-11 18:02:44 +02:00
parent 91f5cb8de3
commit 069400dd86

View File

@@ -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<PDFBusinessCardProps> = ({
<View style={styles.addressFooter}>
<Text style={styles.addressFooterText}>
KLZ Vertriebs GmbH Raiffeisenstraße 22 73630 Remshalden
KLZ Vertriebs GmbH · Raiffeisenstraße 22 · 73630 Remshalden
</Text>
</View>
</Page>