Hello,
I have quite similar problem with Czech crowns (K?), but as i found out, PDF files basically support only Times, Helvetica and Courier fonts (plus some symbols). Other fonts must be somehow implemented.
As I read all tips including @font-face font implementation, nothing works, except these three fonts.
Maybe you will be more lucky with this @font-face, but it didn’t work for me even after hours of trying. Maybe I was doing some rookie mistake.
Or as I think, some character coding could help us, but I have no idea where to set it correctly.
I also tried this:
In case if you want to add more fonts to Booster’s PDF invoicing module, you can do so with wcj_pdf_invoicing_fonts
filter. What you need to do is:
1. Prepare TCPDF font files (for example with this tool).
2. Upload your custom fonts files to …/wp-content/uploads/woocommerce_uploads/wcj_uploads/tcpdf_fonts folder on your server.
3. Go to your (child) theme’s functions.php file and add something like this:
add_filter( ‘wcj_pdf_invoicing_fonts’, ‘add_custom_fonts_to_booster_pdf_invoices’ );
function add_custom_fonts_to_booster_pdf_invoices( $fonts ) {
$fonts[‘font_id’] = ‘Label’;
$fonts[‘another_font_id’] = ‘Another label’;
return $fonts;
}
After that new fonts should be available in “WooCommerce > Settings > Booster > PDF Invoicing & Packing Slips > Styling”. You can set Label
to any value, and font_id
is filename of your font without extension.
But it crashes my site ??
-
This reply was modified 4 years, 3 months ago by ChickenPower.