PluginProbe
PDF & Print by BestWebSoft – WordPress Posts and Pages PDF Generator Plugin / 1.7.1
PDF & Print by BestWebSoft – WordPress Posts and Pages PDF Generator Plugin v1.7.1
trunk 1.5 1.6 1.7 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9 1.8.0 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9.0 1.9.1 All 71 releases
← All changes | mpdf/config_fonts.php +123 -160 1.8.6 → 1.7.1 View file →
@@ -4,25 +4,29 @@
4 4 // Optionally define a folder which contains TTF fonts
5 5 // mPDF will look here before looking in the usual _MPDF_TTFONTPATH
6 6 // Useful if you already have a folder for your fonts
7 7 // e.g. on Windows: define("_MPDF_SYSTEM_TTFONTS", 'C:/Windows/Fonts/');
8 +// Leave undefined if not required
8 9
9 -//if (!defined("_MPDF_SYSTEM_TTFONTS")) { define("_MPDF_SYSTEM_TTFONTS", 'C:/xampp/htdocs/common/ttffonts/'); }
10 +// define("_MPDF_SYSTEM_TTFONTS", '');
10 11
12 +
11 13 // Optionally set font(s) (names as defined below in $this->fontdata) to use for missing characters
12 14 // when using useSubstitutions. Use a font with wide coverage - dejavusanscondensed is a good start
13 15 // only works using subsets (otherwise would add very large file)
16 +// doesn't do Indic or arabic
14 17 // More than 1 font can be specified but each will add to the processing time of the script
15 18
16 -// $this->backupSubsFont = array('dejavusanscondensed','arialunicodems','sun-exta'); // this will recognise most scripts
17 -$this->backupSubsFont = array('dejavusanscondensed','freeserif');
19 +$this->backupSubsFont = array('dejavusanscondensed');
18 20
21 +
19 22 // Optionally set a font (name as defined below in $this->fontdata) to use for CJK characters
20 23 // in Plane 2 Unicode (> U+20000) when using useSubstitutions.
21 24 // Use a font like hannomb or sun-extb if available
22 25 // only works using subsets (otherwise would add very large file)
26 +// Leave undefined or blank if not not required
23 27
24 -$this->backupSIPFont = 'sun-extb';
28 +// $this->backupSIPFont = 'sun-extb';
25 29
26 30
27 31 /*
28 32 This array defines translations from font-family in CSS or HTML
@@ -32,21 +36,27 @@
32 36 and change to lowercase e.g. "Arial Unicode MS" will be recognised as
33 37 "arialunicodems"
34 38 You only need to define additional translations.
35 39 You can also use it to define specific substitutions e.g.
36 -'helvetica' => 'arial'
40 +'frutiger55roman' => 'arial'
37 41 Generic substitutions (i.e. to a sans-serif or serif font) are set
38 -by including the font-family in e.g. $this->sans_fonts below
42 +by including the font-family in $this->sans_fonts below
43 +To aid backwards compatability some are included:
39 44 */
40 45 $this->fonttrans = array(
46 + 'helvetica' => 'arial',
41 47 'times' => 'timesnewroman',
42 48 'courier' => 'couriernew',
43 49 'trebuchet' => 'trebuchetms',
44 50 'comic' => 'comicsansms',
45 51 'franklin' => 'franklingothicbook',
52 + 'albertus' => 'albertusmedium',
53 + 'arialuni' => 'arialunicodems',
54 + 'zn_hannom_a' => 'hannoma',
46 55 'ocr-b' => 'ocrb',
47 56 'ocr-b10bt' => 'ocrb',
48 - 'damase' => 'mph2bdamase',
57 +
58 +
49 59 );
50 60
51 61 /*
52 62 This array lists the file names of the TrueType .ttf or .otf font files
@@ -53,15 +63,14 @@
53 63 for each variant of the (internal mPDF) font-family name.
54 64 ['R'] = Regular (Normal), others are Bold, Italic, and Bold-Italic
55 65 Each entry must contain an ['R'] entry, but others are optional.
56 66 Only the font (files) entered here will be available to use in mPDF.
57 -Put preferred default first in order
67 +Put preferred default first in order.
58 68 This will be used if a named font cannot be found in any of
59 69 $this->sans_fonts, $this->serif_fonts or $this->mono_fonts
60 70
61 -['sip-ext'] = 'sun-extb'; name a related font file containing SIP characters
62 -['useOTL'] => 0xFF, Enable use of OTL features.
63 -['useKashida'] => 75, Enable use of kashida for text justification in Arabic text
71 +['indic'] = true; for special mPDF fonts containing Indic characters
72 +['sip-ext'] = 'hannomb'; name a related font file containing SIP characters
64 73
65 74 If a .ttc TrueType collection file is referenced, the number of the font
66 75 within the collection is required. Fonts in the collection are numbered
67 76 starting at 1, as they appear in the .ttc file e.g.
@@ -87,10 +96,8 @@
87 96 'R' => "DejaVuSansCondensed.ttf",
88 97 'B' => "DejaVuSansCondensed-Bold.ttf",
89 98 'I' => "DejaVuSansCondensed-Oblique.ttf",
90 99 'BI' => "DejaVuSansCondensed-BoldOblique.ttf",
91 - 'useOTL' => 0xFF,
92 - 'useKashida' => 75,
93 100 ),
94 101 "dejavusans" => array(
95 102 'R' => "DejaVuSans.ttf",
96 103 'B' => "DejaVuSans-Bold.ttf",
@@ -95,10 +102,8 @@
95 102 'R' => "DejaVuSans.ttf",
96 103 'B' => "DejaVuSans-Bold.ttf",
97 104 'I' => "DejaVuSans-Oblique.ttf",
98 105 'BI' => "DejaVuSans-BoldOblique.ttf",
99 - 'useOTL' => 0xFF,
100 - 'useKashida' => 75,
101 106 ),
102 107 "dejavuserif" => array(
103 108 'R' => "DejaVuSerif.ttf",
104 109 'B' => "DejaVuSerif-Bold.ttf",
@@ -115,32 +120,9 @@
115 120 'R' => "DejaVuSansMono.ttf",
116 121 'B' => "DejaVuSansMono-Bold.ttf",
117 122 'I' => "DejaVuSansMono-Oblique.ttf",
118 123 'BI' => "DejaVuSansMono-BoldOblique.ttf",
119 - 'useOTL' => 0xFF,
120 - 'useKashida' => 75,
121 124 ),
122 - "freesans" => array(
123 - 'R' => "FreeSans.ttf",
124 - 'B' => "FreeSansBold.ttf",
125 - 'I' => "FreeSansOblique.ttf",
126 - 'BI' => "FreeSansBoldOblique.ttf",
127 - 'useOTL' => 0xFF,
128 - ),
129 - "freeserif" => array(
130 - 'R' => "FreeSerif.ttf",
131 - 'B' => "FreeSerifBold.ttf",
132 - 'I' => "FreeSerifItalic.ttf",
133 - 'BI' => "FreeSerifBoldItalic.ttf",
134 - 'useOTL' => 0xFF,
135 - 'useKashida' => 75,
136 - ),
137 - "freemono" => array(
138 - 'R' => "FreeMono.ttf",
139 - 'B' => "FreeMonoBold.ttf",
140 - 'I' => "FreeMonoOblique.ttf",
141 - 'BI' => "FreeMonoBoldOblique.ttf",
142 - ),
143 125
144 126
145 127 /* OCR-B font for Barcodes */
146 128 "ocrb" => array(
@@ -146,159 +128,143 @@
146 128 "ocrb" => array(
147 129 'R' => "ocrb10.ttf",
148 130 ),
149 131
150 -
151 -
152 -/* Miscellaneous language font(s) */
153 - "estrangeloedessa" => array( /* Syriac */
154 - 'R' => "SyrCOMEdessa.otf",
155 - 'useOTL' => 0xFF,
156 - ),
157 -
158 - "kaputaunicode" => array( /* Sinhala */
159 - 'R' => "kaputaunicode.ttf",
160 - 'useOTL' => 0xFF,
161 - ),
162 -
163 - "abyssinicasil" => array( /* Ethiopic */
164 - 'R' => "Abyssinica_SIL.ttf",
165 - 'useOTL' => 0xFF,
166 - ),
167 - "aboriginalsans" => array( /* Cherokee and Canadian */
168 - 'R' => "AboriginalSansREGULAR.ttf",
169 - ),
170 - "jomolhari" => array( /* Tibetan */
171 - 'R' => "Jomolhari.ttf",
172 - 'useOTL' => 0xFF,
173 - ),
174 - "sundaneseunicode" => array( /* Sundanese */
175 - 'R' => "SundaneseUnicode-1.0.5.ttf",
176 - 'useOTL' => 0xFF,
177 - ),
178 - "taiheritagepro" => array( /* Tai Viet */
179 - 'R' => "TaiHeritagePro.ttf",
180 - ),
181 - "aegean" => array(
182 - 'R' => "Aegean.otf",
183 - 'useOTL' => 0xFF,
184 - ),
185 - "aegyptus" => array(
186 - 'R' => "Aegyptus.otf",
187 - 'useOTL' => 0xFF,
188 - ),
189 - "akkadian" => array( /* Cuneiform */
190 - 'R' => "Akkadian.otf",
191 - 'useOTL' => 0xFF,
192 - ),
193 - "quivira" => array(
194 - 'R' => "Quivira.otf",
195 - 'useOTL' => 0xFF,
196 - ),
197 - "eeyekunicode" => array( /* Meetei Mayek */
198 - 'R' => "Eeyek.ttf",
199 - ),
200 - "lannaalif" => array( /* Tai Tham */
201 - 'R' => "lannaalif-v1-03.ttf",
202 - 'useOTL' => 0xFF,
203 - ),
204 - "daibannasilbook" => array( /* New Tai Lue */
205 - 'R' => "DBSILBR.ttf",
206 - ),
207 - "garuda" => array( /* Thai */
132 +/* Thai fonts */
133 + "garuda" => array(
208 134 'R' => "Garuda.ttf",
209 135 'B' => "Garuda-Bold.ttf",
210 136 'I' => "Garuda-Oblique.ttf",
211 137 'BI' => "Garuda-BoldOblique.ttf",
212 - 'useOTL' => 0xFF,
213 138 ),
214 - "khmeros" => array( /* Khmer */
215 - 'R' => "KhmerOS.ttf",
216 - 'useOTL' => 0xFF,
139 + "norasi" => array(
140 + 'R' => "Norasi.ttf",
141 + 'B' => "Norasi-Bold.ttf",
142 + 'I' => "Norasi-Oblique.ttf",
143 + 'BI' => "Norasi-BoldOblique.ttf",
217 144 ),
218 - "dhyana" => array( /* Lao fonts */
219 - 'R' => "Dhyana-Regular.ttf",
220 - 'B' => "Dhyana-Bold.ttf",
221 - 'useOTL' => 0xFF,
145 +
146 +
147 +/* Indic fonts */
148 + "ind_bn_1_001" => array(
149 + 'R' => "ind_bn_1_001.ttf",
150 + 'indic' => true,
222 151 ),
223 -
224 - "tharlon" => array( /* Myanmar / Burmese */
225 - 'R' => "Tharlon-Regular.ttf",
226 - 'useOTL' => 0xFF,
152 + "ind_hi_1_001" => array(
153 + 'R' => "ind_hi_1_001.ttf",
154 + 'indic' => true,
227 155 ),
228 - "padaukbook" => array( /* Myanmar / Burmese */
229 - 'R' => "Padauk-book.ttf",
230 - 'useOTL' => 0xFF,
156 + "ind_ml_1_001" => array(
157 + 'R' => "ind_ml_1_001.ttf",
158 + 'indic' => true,
231 159 ),
232 - "zawgyi-one" => array( /* Myanmar / Burmese */
233 - 'R' => "ZawgyiOne.ttf",
234 - 'useOTL' => 0xFF,
160 + "ind_kn_1_001" => array(
161 + 'R' => "ind_kn_1_001.ttf",
162 + 'indic' => true,
235 163 ),
236 - "ayar" => array( /* Myanmar / Burmese */
237 - 'R' => "ayar.ttf",
238 - 'useOTL' => 0xFF,
164 + "ind_gu_1_001" => array(
165 + 'R' => "ind_gu_1_001.ttf",
166 + 'indic' => true,
239 167 ),
240 -
241 - "taameydavidclm" => array( /* Hebrew with full Niqud and Cantillation */
242 - 'R' => "TaameyDavidCLM-Medium.ttf",
243 - 'useOTL' => 0xFF,
168 + "ind_or_1_001" => array(
169 + 'R' => "ind_or_1_001.ttf",
170 + 'indic' => true,
244 171 ),
245 -
246 -
247 -/* SMP */
248 - "mph2bdamase" => array(
249 - 'R' => "damase_v.2.ttf",
172 + "ind_ta_1_001" => array(
173 + 'R' => "ind_ta_1_001.ttf",
174 + 'indic' => true,
250 175 ),
251 -
252 -
253 -/* Indic */
254 - "lohitkannada" => array(
255 - 'R' => "Lohit-Kannada.ttf",
256 - 'useOTL' => 0xFF,
176 + "ind_te_1_001" => array(
177 + 'R' => "ind_te_1_001.ttf",
178 + 'indic' => true,
257 179 ),
258 - "pothana2000" => array(
259 - 'R' => "Pothana2000.ttf",
260 - 'useOTL' => 0xFF,
180 + "ind_pa_1_001" => array(
181 + 'R' => "ind_pa_1_001.ttf",
182 + 'indic' => true,
261 183 ),
262 184
263 185
264 -
265 -/* Arabic fonts */
186 +/* XW Zar Arabic fonts */
266 187 "xbriyaz" => array(
267 188 'R' => "XB Riyaz.ttf",
268 189 'B' => "XB RiyazBd.ttf",
269 190 'I' => "XB RiyazIt.ttf",
270 191 'BI' => "XB RiyazBdIt.ttf",
271 - 'useOTL' => 0xFF,
272 - 'useKashida' => 75,
192 + 'unAGlyphs' => true,
273 193 ),
274 - "lateef" => array( /* Sindhi, Pashto and Urdu */
275 - 'R' => "LateefRegOT.ttf",
276 - 'useOTL' => 0xFF,
277 - 'useKashida' => 75,
194 + "xbzar" => array(
195 + 'R' => "XB Zar.ttf",
196 + 'B' => "XB Zar Bd.ttf",
197 + 'I' => "XB Zar It.ttf",
198 + 'BI' => "XB Zar BdIt.ttf",
199 + 'unAGlyphs' => true,
278 200 ),
279 - "kfgqpcuthmantahanaskh" => array( /* KFGQPC Uthman Taha Naskh - Koranic */
280 - 'R' => "Uthman.otf",
281 - 'useOTL' => 0xFF,
282 - 'useKashida' => 75,
283 - ),
284 201
285 202
286 203
287 204
288 -/* CJK fonts */
205 +/* Examples of some CJK fonts */
206 +/*
207 + "unbatang_0613" => array(
208 + 'R' => "UnBatang_0613.ttf",
209 + ),
289 210 "sun-exta" => array(
290 211 'R' => "Sun-ExtA.ttf",
291 - 'sip-ext' => 'sun-extb', /* SIP=Plane2 Unicode (extension B) */
212 + 'sip-ext' => 'sun-extb',
292 213 ),
293 214 "sun-extb" => array(
294 215 'R' => "Sun-ExtB.ttf",
295 216 ),
296 - "unbatang" => array( /* Korean */
297 - 'R' => "UnBatang_0613.ttf",
217 + "hannoma" => array(
218 + 'R' => "HAN NOM A.ttf",
219 + 'sip-ext' => 'hannomb',
298 220 ),
221 + "hannomb" => array(
222 + 'R' => "HAN NOM B.ttf",
223 + ),
299 224
300 225
226 + 'mingliu' => array (
227 + 'R' => 'mingliu.ttc',
228 + 'TTCfontID' => array (
229 + 'R' => 1,
230 + ),
231 + 'sip-ext' => 'mingliu-extb',
232 + ),
233 + 'pmingliu' => array (
234 + 'R' => 'mingliu.ttc',
235 + 'TTCfontID' => array (
236 + 'R' => 2,
237 + ),
238 + 'sip-ext' => 'pmingliu-extb',
239 + ),
240 + 'mingliu_hkscs' => array (
241 + 'R' => 'mingliu.ttc',
242 + 'TTCfontID' => array (
243 + 'R' => 3,
244 + ),
245 + 'sip-ext' => 'mingliu_hkscs-extb',
246 + ),
247 + 'mingliu-extb' => array (
248 + 'R' => 'mingliub.ttc',
249 + 'TTCfontID' => array (
250 + 'R' => 1,
251 + ),
252 + ),
253 + 'pmingliu-extb' => array (
254 + 'R' => 'mingliub.ttc',
255 + 'TTCfontID' => array (
256 + 'R' => 2,
257 + ),
258 + ),
259 + 'mingliu_hkscs-extb' => array (
260 + 'R' => 'mingliub.ttc',
261 + 'TTCfontID' => array (
262 + 'R' => 3,
263 + ),
264 + ),
265 +*/
266 +
301 267 );
302 268
303 269
304 270 // Add fonts to this array if they contain characters in the SIP or SMP Unicode planes
@@ -303,9 +269,9 @@
303 269
304 270 // Add fonts to this array if they contain characters in the SIP or SMP Unicode planes
305 271 // but you do not require them. This allows a more efficient form of subsetting to be used.
306 272 $this->BMPonly = array(
307 - "dejavusanscondensed",
273 + "dejavusanscondensed",
308 274 "dejavusans",
309 275 "dejavuserifcondensed",
310 276 "dejavuserif",
311 277 "dejavusansmono",
@@ -317,25 +283,22 @@
317 283 // 2. The first font in each array will be the font which is substituted in circumstances as above
318 284 // (Otherwise the order is irrelevant)
319 285 // Use the mPDF font-family names i.e. lowercase and no spaces (after any translations in $fonttrans)
320 286 // Always include "sans-serif", "serif" and "monospace" etc.
321 -$this->sans_fonts = array('dejavusanscondensed','sans','sans-serif','cursive','fantasy','dejavusans','freesans','liberationsans',
287 +$this->sans_fonts = array('dejavusanscondensed','dejavusans','freesans','liberationsans','sans','sans-serif','cursive','fantasy',
322 288 'arial','helvetica','verdana','geneva','lucida','arialnarrow','arialblack','arialunicodems',
323 289 'franklin','franklingothicbook','tahoma','garuda','calibri','trebuchet','lucidagrande','microsoftsansserif',
324 - 'trebuchetms','lucidasansunicode','franklingothicmedium','albertusmedium','xbriyaz','albasuper','quillscript',
325 - 'humanist777','humanist777black','humanist777light','futura','hobo','segoeprint'
290 + 'trebuchetms','lucidasansunicode','franklingothicmedium','albertusmedium','xbriyaz','albasuper','quillscript'
326 291
327 292 );
328 293
329 -$this->serif_fonts = array('dejavuserifcondensed','serif','dejavuserif','freeserif','liberationserif',
294 +$this->serif_fonts = array('dejavuserifcondensed','dejavuserif','freeserif','liberationserif','serif',
330 295 'timesnewroman','times','centuryschoolbookl','palatinolinotype','centurygothic',
331 296 'bookmanoldstyle','bookantiqua','cyberbit','cambria',
332 297 'norasi','charis','palatino','constantia','georgia','albertus','xbzar','algerian','garamond',
333 298 );
334 299
335 -$this->mono_fonts = array('dejavusansmono','mono','monospace','freemono','liberationmono','courier', 'ocrb','ocr-b','lucidaconsole',
300 +$this->mono_fonts = array('dejavusansmono','freemono','liberationmono','courier', 'mono','monospace','ocrb','ocr-b','lucidaconsole',
336 301 'couriernew','monotypecorsiva'
337 302 );
338 -
339 -
340 303
341 304 ?>