• Resolved testerimaker

    (@testerimaker)


    I have followed the instructions of these two documents but still cannot see the chinese characters in the invoice.

    https://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/creating-a-custom-pdf-template/
    https://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/using-custom-fonts/

    Heres what I have done:

    1. I have created a child theme and activated it in the appearance.

    2. I copied the simple template folder and pasted it into my child theme. This is my path
    wp-content/themes/astra-child/woocommerce/pdf/Customised Simple

    3. I also added a fonts folder inside the customised simple folder, with a font tff file. This is my path wp-content/themes/astra-child/woocommerce/pdf/Customised Simple/fonts

    4. I added the these code into the customised simple folder’s style.css file:

    /* Load font */
    @font-face {
    font-family: ‘NotoSansHK-Regular-Alphabetic’;
    font-style: normal;
    font-weight: normal;
    src: local(‘NotoSansHK-Regular-Alphabetic’),
    local(‘NotoSansHK-Regular-Alphabetic’),
    url(<?php echo $this->get_template_path(); ?>/fonts/NotoSansHK-Regular-Alphabetic.ttf) format(‘truetype’);
    }

    body {
    font-family: ‘NotoSansHK-Regular-Alphabetic’;
    }

    I don’t understand what I have missed or done wrong. Can anyone please help me. Thanks!

Viewing 1 replies (of 1 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    It looks like you have done everything correctly. Did you also select the “Customised Simple” template in the General settings tab of the PDF Invoice plugin?

Viewing 1 replies (of 1 total)
  • The topic ‘Failed to install custom font for invoice’ is closed to new replies.