I'm trying to create a PDF from an HTML page using the Inter font in WOFF format.
I've tried saving the font files in the folder structure of my VM, and referring to them as follows:
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("../fonts/Inter-Regular.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url("../fonts/Inter-Medium.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url("../fonts/Inter-SemiBold.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url("../fonts/Inter-Bold.woff") format("woff");
}
When I generate the PDF using Prince I don't see the fonts, just horizontal lines as shown in the attached screenshot. Presumably it's either unable to find or parse the font files.
I've also tried OTF format with the same result.
I'm using Prince 10 rev 7.
Can anyone suggest what I might be doing wrong here?
I've tried saving the font files in the folder structure of my VM, and referring to them as follows:
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("../fonts/Inter-Regular.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url("../fonts/Inter-Medium.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url("../fonts/Inter-SemiBold.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url("../fonts/Inter-Bold.woff") format("woff");
}
When I generate the PDF using Prince I don't see the fonts, just horizontal lines as shown in the attached screenshot. Presumably it's either unable to find or parse the font files.
I've also tried OTF format with the same result.
I'm using Prince 10 rev 7.
Can anyone suggest what I might be doing wrong here?