• Hi,

    I’m using a custom font and made a custom template for my PDF invoices.
    I changed the following lines in the style.css and it basically works but some parts like the shop name, the document title, table header, subtotal, total etc. are still using the old font:#

    /* Load font */
    @font-face {
        font-family: 'PorterFTRound-Light';
        font-style: normal;
        font-weight: normal;
        src: local('PorterFTRound-Light'), local('PorterFTRound-Light'), url(<?php echo $this->get_template_path(); ?>/fonts/PorterFTRound-Light.ttf) format('truetype');
    }
    body {
    	background: #fff;
    	color: #000;
    	margin: 0cm;
    	font-family: 'PorterFTRound-light';
    	/* want to use custom fonts? https://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/using-custom-fonts/ */
    	font-size: 8pt;
    	line-height: 100%; /* fixes inherit dompdf bug */
    }

    When I output the invoice to HTML it looks all good. Not when outputting to PDF though.
    Any idea how to change that behaviour ?

    Thank you.

    Cheers
    Steffen

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor kluver

    (@kluver)

    Hi @weedywhizz,

    I would check out the CSS of the elements that don’t change into the new font. There might be some conflicting rules. Also make sure not to use a numerical value for ‘font-weight’, like ‘700’. Instead use ‘bold’. Let me know what you find!

    Plugin Contributor Ewout

    (@pomegranate)

    Hi Steffen,
    The elements you are referring to are all bold elements, but in the above CSS you haven’t actually defined the bold font yet (which is a separate TTF file). The reason this shows in the browser is probably because you have the font installed on your system ??

    Adding the bold (and preferably also italic and bold italic) TTF files + definition should resolve the issue.

    Let us know if that helps!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Some parts still have different fonts’ is closed to new replies.