10/14/2013

HOWTO use malgun.ttf font in dokuwiki dw2pdf plugins


1. Copy malgun.ttf and malgunbd.ttf to dokuwiki/lib/plugins/dw2pdf/mpdf/ttfonts/
2. Ensure the dokuwiki/lib/plugins/dw2pdf/mpdf/config.php file contains :

$this->useAdobeCJK = false;

** If the value is true, it forces using AdobeCJK font even if a user modify the css file and config-fonts.php file.

3.  Add the following lines to dokuwiki/lib/plugins/dw2pdf/conf/style.local.css file:

body {
    font-family: malgun;

4. Open dokuwiki/lib/plugins/dw2pdf/mpdf/config-fonts.php, find "$this->fontdata = array(", and add the followings :

"malgun" => array(
'R' => "malgun.ttf",
'B' => "malgunbd.ttf",
'I' => "malgun.ttf",
'BI' => "malgunbd.ttf",
), 

...