Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Could you share your CSS for the custom font and also check that the MB_String extension is enabled for PHP on your site? You can see this on the Status tab of the plugin settings

    Thread Starter sagarcpatil

    (@sagarcpatil)

    Hello ,

    I have used following css for the same
    `@font-face {
    font-family: ‘KritiDev’;
    font-style: normal;
    font-weight: normal;
    src: local(‘KritiDev’), local(‘KritiDev’), url(<?php echo $this->get_template_path(); ?>/fonts/Kruti_Dev.ttf) format(‘truetype’);
    }
    body {
    background: #fff;
    color: #000;
    margin: 0cm;
    font-family: ‘KritiDev’, sans-serif;
    /* want to use custom fonts? https://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/using-custom-fonts/ */
    font-size: 9pt;
    line-height: 100%; /* fixes inherit dompdf bug */
    }

    Thread Starter sagarcpatil

    (@sagarcpatil)

    Sorry ignor above css code
    Please refer following code

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

    Also my MBstring Extension is enable you can check here https://prnt.sc/p2hycc

    • This reply was modified 5 years, 6 months ago by sagarcpatil.
    Plugin Contributor kluver

    (@kluver)

    Hi @sagarcpatil,

    It seems you’ve made a mistake in the CSS. In the @font-face you’ve added local(‘KrutiDev ‘) twice.

    Please try the following:

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

    (@kluver)

    Quick follow-up. The quotes in my previous example might cause problems. Also there was a space in the font family name that I missed in my last answer. Please try the following:

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

    (@sagarcpatil)

    Sorry @kluver
    Still having the same issue with font
    Please Check image for easy referance https://prnt.sc/p25m5a

    Thread Starter sagarcpatil

    (@sagarcpatil)

    @kluver Hello sir,
    waiting for your reply.
    Any update on above?

    Plugin Contributor kluver

    (@kluver)

    Hi @sagarcpatil,

    Can you make sure you also activated your child theme (Appearance > Themes) and activated your custom PDF template (WooCommerce > PDF Invoices > General > Choose a template)?

    Thread Starter sagarcpatil

    (@sagarcpatil)

    Dear @kluver ,
    Thanks for your Guidance.
    As per your Instruction the font is working but its showing all text in marathi, and i want to display both Marathi and English font together in PDF how is it possible.
    Please Check here https://prnt.sc/p43p3x

    Thread Starter sagarcpatil

    (@sagarcpatil)

    Dear @kluver,
    Thanks Everything is working Fine.
    Thanks for you Guidance.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Unable to view Marathi Font’ is closed to new replies.