To Enable Chinese Font in the PDF
-
Hi,
I’m having a problem in understanding the solution provided in the Using Custom Font page.?
For example, if my font name is fireflysung.ttf and my path is wp-content/themes/mytheme/woocommerce/pdf/yourtemplate,?in the? code provided by the solution (as attach below), may I know which part else do I need to edit besides the MyFont?
/* Load font */
@font-face {
????font-family:?‘MyFont’;
????font-style:?normal;
????font-weight:?normal;
????src:?local(‘MyFont’),?local(‘MyFont’),?url(<?php echo $this->get_template_path(); ?>/fonts/myfont.ttf)?format(‘truetype’);
}
@font-face {
????font-family:?‘MyFont’;
????font-style:?normal;
????font-weight:?bold;
????src:?local(‘MyFont Bold’),?local(‘MyFont-Bold’),?url(<?php echo $this->get_template_path(); ?>/fonts/myfont-bold.ttf)?format(‘truetype’);
}
@font-face {
????font-family:?‘MyFont’;
????font-style:?italic;
????font-weight:?normal;
????src:?local(‘MyFont Italic’),?local(‘MyFont-Italic’),?url(<?php echo $this->get_template_path(); ?>/fonts/myfont-italic.ttf)?format(‘truetype’);
}
@font-face {
????font-family:?‘MyFont’;
????font-style:?italic;
????font-weight:?bold;
????src:?local(‘MyFont Bold Italic’),?local(‘MyFont-BoldItalic’),?url(<?php echo $this->get_template_path(); ?>/fonts/myfont-bolditalic.ttf)?format(‘truetype’);
}And for the font-family code below, where should I paste it?
body {
font-family:?‘MyFont’;
}Can I have your kind guidance please??
Thank you.
- The topic ‘To Enable Chinese Font in the PDF’ is closed to new replies.