PluginProbe
PDF & Print by BestWebSoft – WordPress Posts and Pages PDF Generator Plugin / 1.8.2
PDF & Print by BestWebSoft – WordPress Posts and Pages PDF Generator Plugin v1.8.2
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
pdf-print / mpdf / config_fonts.php

config_fonts.php in PDF & Print by BestWebSoft – WordPress Posts and Pages PDF Generator Plugin 1.8.2, at mpdf/config_fonts.php

341 lines 10.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3
4 // Optionally define a folder which contains TTF fonts
5 // mPDF will look here before looking in the usual _MPDF_TTFONTPATH
6 // Useful if you already have a folder for your fonts
7 // e.g. on Windows: define("_MPDF_SYSTEM_TTFONTS", 'C:/Windows/Fonts/');
8
9 //if (!defined("_MPDF_SYSTEM_TTFONTS")) { define("_MPDF_SYSTEM_TTFONTS", 'C:/xampp/htdocs/common/ttffonts/'); }
10
11 // Optionally set font(s) (names as defined below in $this->fontdata) to use for missing characters
12 // when using useSubstitutions. Use a font with wide coverage - dejavusanscondensed is a good start
13 // only works using subsets (otherwise would add very large file)
14 // More than 1 font can be specified but each will add to the processing time of the script
15
16 // $this->backupSubsFont = array('dejavusanscondensed','arialunicodems','sun-exta'); // this will recognise most scripts
17 $this->backupSubsFont = array('dejavusanscondensed','freeserif');
18
19 // Optionally set a font (name as defined below in $this->fontdata) to use for CJK characters
20 // in Plane 2 Unicode (> U+20000) when using useSubstitutions.
21 // Use a font like hannomb or sun-extb if available
22 // only works using subsets (otherwise would add very large file)
23
24 $this->backupSIPFont = 'sun-extb';
25
26
27 /*
28 This array defines translations from font-family in CSS or HTML
29 to the internal font-family name used in mPDF.
30 Can include as many as want, regardless of which fonts are installed.
31 By default mPDF will take a CSS/HTML font-family and remove spaces
32 and change to lowercase e.g. "Arial Unicode MS" will be recognised as
33 "arialunicodems"
34 You only need to define additional translations.
35 You can also use it to define specific substitutions e.g.
36 'helvetica' => 'arial'
37 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
39 */
40 $this->fonttrans = array(
41 'times' => 'timesnewroman',
42 'courier' => 'couriernew',
43 'trebuchet' => 'trebuchetms',
44 'comic' => 'comicsansms',
45 'franklin' => 'franklingothicbook',
46 'ocr-b' => 'ocrb',
47 'ocr-b10bt' => 'ocrb',
48 'damase' => 'mph2bdamase',
49 );
50
51 /*
52 This array lists the file names of the TrueType .ttf or .otf font files
53 for each variant of the (internal mPDF) font-family name.
54 ['R'] = Regular (Normal), others are Bold, Italic, and Bold-Italic
55 Each entry must contain an ['R'] entry, but others are optional.
56 Only the font (files) entered here will be available to use in mPDF.
57 Put preferred default first in order
58 This will be used if a named font cannot be found in any of
59 $this->sans_fonts, $this->serif_fonts or $this->mono_fonts
60
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
64
65 If a .ttc TrueType collection file is referenced, the number of the font
66 within the collection is required. Fonts in the collection are numbered
67 starting at 1, as they appear in the .ttc file e.g.
68 "cambria" => array(
69 'R' => "cambria.ttc",
70 'B' => "cambriab.ttf",
71 'I' => "cambriai.ttf",
72 'BI' => "cambriaz.ttf",
73 'TTCfontID' => array(
74 'R' => 1,
75 ),
76 ),
77 "cambriamath" => array(
78 'R' => "cambria.ttc",
79 'TTCfontID' => array(
80 'R' => 2,
81 ),
82 ),
83 */
84
85 $this->fontdata = array(
86 "dejavusanscondensed" => array(
87 'R' => "DejaVuSansCondensed.ttf",
88 'B' => "DejaVuSansCondensed-Bold.ttf",
89 'I' => "DejaVuSansCondensed-Oblique.ttf",
90 'BI' => "DejaVuSansCondensed-BoldOblique.ttf",
91 'useOTL' => 0xFF,
92 'useKashida' => 75,
93 ),
94 "dejavusans" => array(
95 'R' => "DejaVuSans.ttf",
96 'B' => "DejaVuSans-Bold.ttf",
97 'I' => "DejaVuSans-Oblique.ttf",
98 'BI' => "DejaVuSans-BoldOblique.ttf",
99 'useOTL' => 0xFF,
100 'useKashida' => 75,
101 ),
102 "dejavuserif" => array(
103 'R' => "DejaVuSerif.ttf",
104 'B' => "DejaVuSerif-Bold.ttf",
105 'I' => "DejaVuSerif-Italic.ttf",
106 'BI' => "DejaVuSerif-BoldItalic.ttf",
107 ),
108 "dejavuserifcondensed" => array(
109 'R' => "DejaVuSerifCondensed.ttf",
110 'B' => "DejaVuSerifCondensed-Bold.ttf",
111 'I' => "DejaVuSerifCondensed-Italic.ttf",
112 'BI' => "DejaVuSerifCondensed-BoldItalic.ttf",
113 ),
114 "dejavusansmono" => array(
115 'R' => "DejaVuSansMono.ttf",
116 'B' => "DejaVuSansMono-Bold.ttf",
117 'I' => "DejaVuSansMono-Oblique.ttf",
118 'BI' => "DejaVuSansMono-BoldOblique.ttf",
119 'useOTL' => 0xFF,
120 'useKashida' => 75,
121 ),
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
144
145 /* OCR-B font for Barcodes */
146 "ocrb" => array(
147 'R' => "ocrb10.ttf",
148 ),
149
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 */
208 'R' => "Garuda.ttf",
209 'B' => "Garuda-Bold.ttf",
210 'I' => "Garuda-Oblique.ttf",
211 'BI' => "Garuda-BoldOblique.ttf",
212 'useOTL' => 0xFF,
213 ),
214 "khmeros" => array( /* Khmer */
215 'R' => "KhmerOS.ttf",
216 'useOTL' => 0xFF,
217 ),
218 "dhyana" => array( /* Lao fonts */
219 'R' => "Dhyana-Regular.ttf",
220 'B' => "Dhyana-Bold.ttf",
221 'useOTL' => 0xFF,
222 ),
223
224 "tharlon" => array( /* Myanmar / Burmese */
225 'R' => "Tharlon-Regular.ttf",
226 'useOTL' => 0xFF,
227 ),
228 "padaukbook" => array( /* Myanmar / Burmese */
229 'R' => "Padauk-book.ttf",
230 'useOTL' => 0xFF,
231 ),
232 "zawgyi-one" => array( /* Myanmar / Burmese */
233 'R' => "ZawgyiOne.ttf",
234 'useOTL' => 0xFF,
235 ),
236 "ayar" => array( /* Myanmar / Burmese */
237 'R' => "ayar.ttf",
238 'useOTL' => 0xFF,
239 ),
240
241 "taameydavidclm" => array( /* Hebrew with full Niqud and Cantillation */
242 'R' => "TaameyDavidCLM-Medium.ttf",
243 'useOTL' => 0xFF,
244 ),
245
246
247 /* SMP */
248 "mph2bdamase" => array(
249 'R' => "damase_v.2.ttf",
250 ),
251
252
253 /* Indic */
254 "lohitkannada" => array(
255 'R' => "Lohit-Kannada.ttf",
256 'useOTL' => 0xFF,
257 ),
258 "pothana2000" => array(
259 'R' => "Pothana2000.ttf",
260 'useOTL' => 0xFF,
261 ),
262
263
264
265 /* Arabic fonts */
266 "xbriyaz" => array(
267 'R' => "XB Riyaz.ttf",
268 'B' => "XB RiyazBd.ttf",
269 'I' => "XB RiyazIt.ttf",
270 'BI' => "XB RiyazBdIt.ttf",
271 'useOTL' => 0xFF,
272 'useKashida' => 75,
273 ),
274 "lateef" => array( /* Sindhi, Pashto and Urdu */
275 'R' => "LateefRegOT.ttf",
276 'useOTL' => 0xFF,
277 'useKashida' => 75,
278 ),
279 "kfgqpcuthmantahanaskh" => array( /* KFGQPC Uthman Taha Naskh - Koranic */
280 'R' => "Uthman.otf",
281 'useOTL' => 0xFF,
282 'useKashida' => 75,
283 ),
284
285
286
287
288 /* CJK fonts */
289 "sun-exta" => array(
290 'R' => "Sun-ExtA.ttf",
291 'sip-ext' => 'sun-extb', /* SIP=Plane2 Unicode (extension B) */
292 ),
293 "sun-extb" => array(
294 'R' => "Sun-ExtB.ttf",
295 ),
296 "unbatang" => array( /* Korean */
297 'R' => "UnBatang_0613.ttf",
298 ),
299
300
301 );
302
303
304 // Add fonts to this array if they contain characters in the SIP or SMP Unicode planes
305 // but you do not require them. This allows a more efficient form of subsetting to be used.
306 $this->BMPonly = array(
307 "dejavusanscondensed",
308 "dejavusans",
309 "dejavuserifcondensed",
310 "dejavuserif",
311 "dejavusansmono",
312 );
313
314 // These next 3 arrays do two things:
315 // 1. If a font referred to in HTML/CSS is not available to mPDF, these arrays will determine whether
316 // a serif/sans-serif or monospace font is substituted
317 // 2. The first font in each array will be the font which is substituted in circumstances as above
318 // (Otherwise the order is irrelevant)
319 // Use the mPDF font-family names i.e. lowercase and no spaces (after any translations in $fonttrans)
320 // Always include "sans-serif", "serif" and "monospace" etc.
321 $this->sans_fonts = array('dejavusanscondensed','sans','sans-serif','cursive','fantasy','dejavusans','freesans','liberationsans',
322 'arial','helvetica','verdana','geneva','lucida','arialnarrow','arialblack','arialunicodems',
323 'franklin','franklingothicbook','tahoma','garuda','calibri','trebuchet','lucidagrande','microsoftsansserif',
324 'trebuchetms','lucidasansunicode','franklingothicmedium','albertusmedium','xbriyaz','albasuper','quillscript',
325 'humanist777','humanist777black','humanist777light','futura','hobo','segoeprint'
326
327 );
328
329 $this->serif_fonts = array('dejavuserifcondensed','serif','dejavuserif','freeserif','liberationserif',
330 'timesnewroman','times','centuryschoolbookl','palatinolinotype','centurygothic',
331 'bookmanoldstyle','bookantiqua','cyberbit','cambria',
332 'norasi','charis','palatino','constantia','georgia','albertus','xbzar','algerian','garamond',
333 );
334
335 $this->mono_fonts = array('dejavusansmono','mono','monospace','freemono','liberationmono','courier', 'ocrb','ocr-b','lucidaconsole',
336 'couriernew','monotypecorsiva'
337 );
338
339
340
341 ?>