mPDFの文字化け対策

-mpdfで日本語のフォントを追加したり、文字化けを回避したり - tohokuaikiのチラシの裏

$ diff -wur MPDF57 MPDF57.org
diff -wur MPDF57/config.php MPDF57.org/config.php
--- MPDF57/config.php   2013-09-20 14:33:39.000143000 +0900
+++ MPDF57.org/config.php       2013-07-15 00:13:40.000000000 +0900
@@ -60,7 +60,7 @@
 // and/or Can set at runtime
 $this->percentSubset = 30;

-$this->useAdobeCJK = true;             // Uses Adobe CJK fonts for CJK languages
+$this->useAdobeCJK = false;            // Uses Adobe CJK fonts for CJK languages
                        // default TRUE; only set false if you have defined some available fonts that support CJK
                        // If true this will not stop use of other CJK fonts if specified by font-family:
                        // and vice versa i.e. only dictates behaviour when specified by lang="" incl. AutoFont()
diff -wur MPDF57/config_cp.php MPDF57.org/config_cp.php
--- MPDF57/config_cp.php        2013-09-20 14:38:50.000261000 +0900
+++ MPDF57.org/config_cp.php    2011-03-02 22:31:32.000000000 +0900
@@ -92,7 +92,7 @@
          // CJK Langauges
          CASE "ja":  
                if ($adobeCJK) {
-                       $unifonts = "ipa,sjis,sjisB,sjisI,sjisBI";
+                       $unifonts = "sjis,sjisB,sjisI,sjisBI";
                }
 /* Uncomment these lines if CJK fonts available */
 //             else {
diff -wur MPDF57/config_fonts.php MPDF57.org/config_fonts.php
--- MPDF57/config_fonts.php     2013-09-20 14:40:38.000828000 +0900
+++ MPDF57.org/config_fonts.php 2013-01-20 19:30:14.000000000 +0900
@@ -199,9 +199,6 @@
                'unAGlyphs' => true,
                ),

-       "ipa" => array(
-               'R' => "ipag.ttf",
-               ),



@@ -273,7 +270,6 @@
 // Add fonts to this array if they contain characters in the SIP or SMP Unicode planes
 // but you do not require them. This allows a more efficient form of subsetting to be used.
 $this->BMPonly = array(
-       "ipa",
        "dejavusanscondensed",
        "dejavusans",
        "dejavuserifcondensed",
MPDF57.org/tmpだけに発見: dummy.txt
MPDF57/ttfontdataだけに発見: dejavusanscondensed.cw.dat
MPDF57/ttfontdataだけに発見: dejavusanscondensed.mtx.php
MPDF57/ttfontdataだけに発見: dejavusanscondensedB.cw.dat
MPDF57/ttfontdataだけに発見: dejavusanscondensedB.mtx.php
MPDF57/ttfontdataだけに発見: dejavuserifcondensed.cw.dat
MPDF57/ttfontdataだけに発見: dejavuserifcondensed.mtx.php
MPDF57/ttfontdataだけに発見: dejavuserifcondensedB.cw.dat
MPDF57/ttfontdataだけに発見: dejavuserifcondensedB.mtx.php
MPDF57/ttfontdataだけに発見: dejavuserifcondensedI.cw.dat
MPDF57/ttfontdataだけに発見: dejavuserifcondensedI.mtx.php
MPDF57/ttfontdataだけに発見: ipa.cw.dat
MPDF57/ttfontdataだけに発見: ipa.cw127.php
MPDF57/ttfontdataだけに発見: ipa.mtx.php
MPDF57/ttfontsだけに発見: ipag.ttf
MPDF57/ttfontsだけに発見: ipagp.ttf
MPDF57/ttfontsだけに発見: ipam.ttf
MPDF57/ttfontsだけに発見: ipamp.ttf

  • Prev
  • Next