1<?php
2
3namespace Mpdf\Config;
4
5use Mpdf\Css\DefaultCss;
6
7use Mpdf\Language\LanguageToFont;
8use Mpdf\Language\ScriptToLanguage;
9
10use Mpdf\Ucdn;
11
12class ConfigVariables
13{
14
15	private $defaults;
16
17	public function __construct()
18	{
19
20		$this->defaults = [
21
22			// PAGING
23			'mirrorMargins' => 0,
24			'forcePortraitMargins' => false,
25			'displayDefaultOrientation' => false,
26
27			// Adds date and page info for printer when using @page and "marks:crop,"
28			'printers_info' => false,
29			'bleedMargin' => 5,
30
31			// Distance of cross mark from margin in mm
32			'crossMarkMargin' => 5,
33			// Distance of crop mark from margin in mm
34			'cropMarkMargin' => 8,
35			// Default length in mm of crop line
36			'cropMarkLength' => 18,
37			// Non-printable border at edge of paper sheet in mm
38			'nonPrintMargin' => 8,
39
40			// 'slice' or 'cloneall' or 'clonebycss' - for forced pagebreaks using <pagebreak />
41			// Automatic pagebreaks (flow in text) are always 'slice'
42			'defaultPagebreakType' => 'cloneall',
43
44			// Avoid just the border/background-color of the end of a block being moved on to next page
45			// Allows an (empty) end of block to extend beyond the bottom margin by this amount (mm)
46			'margBuffer' => 2,
47
48			// PAGE NUMBERING
49			'pagenumPrefix' => '',
50			'pagenumSuffix' => '',
51			'nbpgPrefix' => '',
52			'nbpgSuffix' => '',
53			// 1:Decimal, A:uppercase alphabetic etc. (as for list-style shorthands)
54			'defaultPageNumStyle' => '1',
55
56			// PAGE NUMBER ALIASES
57			'aliasNbPg' => '{nb}',
58			'aliasNbPgGp' => '{nbpg}',
59
60			// FONTS, LANGUAGES & CHARACTER SETS
61			// Set maximum size of TTF font file to allow non-subsets - in kB
62			// Used to avoid a font e.g. Arial Unicode MS (perhaps used for substitutions) ever being fully embedded
63			// NB Free serif is 1.5MB, most files are <= 600kB (most 200-400KB)
64			'maxTTFFilesize' => 2000,
65
66			// this value determines whether to subset or not
67			// 0 - 100' => percent characters
68			// i.e. if ==40, mPDF will embed whole font if >40% characters in that font
69			// or embed subset if <40% characters
70			// 0 will force whole file to be embedded (NO subsetting)
71			// 100 will force always to subset
72			// This value is overridden if you set new mPDF('s')
73			// and/or Can set at runtime
74			'percentSubset' => 30,
75
76			// Uses Adobe CJK fonts for CJK languages
77			// default TRUE, only set false if you have defined some available fonts that support CJK
78			// If true this will not stop use of other CJK fonts if specified by font-family:
79			// and vice versa i.e. only dictates behaviour when specified by lang="" incl. AutoFont()
80			'useAdobeCJK' => false,
81
82			// When embedding full TTF font files, remakes the font file using only core tables
83			// May improve function with some PostScript printers (GhostScript/GSView)
84			// Does not work with TTC font collections
85			// Slightly smaller file, increased processing time
86			'repackageTTF' => false,
87
88			// Allows automatic character set conversion if "charset=xxx" detected in html header (WriteHTML() )
89			'allow_charset_conversion' => true,
90			// Automatically determine BIDI text in LTR page
91			'biDirectional' => false,
92
93			// AUTOMATIC FONT SELECTION
94			// Based on script and/or language
95			// mPDF 6.0 (similar to previously using function SetAutoFont() )
96			'autoScriptToLang' => false,
97			'baseScript' => Ucdn::SCRIPT_LATIN,
98			'autoVietnamese' => true,
99			'autoArabic' => true,
100			// mPDF 6.0 (similar to old useLang)
101			'autoLangToFont' => false,
102
103			// Substitute missing characters in UTF-8(multibyte) documents - from other fonts
104			'useSubstitutions' => false,
105			// Weight for bold text when using an artificial (outline) bold, value 0 (off) - 10 (rec. max)
106			'falseBoldWeight' => 5,
107
108			// CONFIGURATION
109			'allow_output_buffering' => false,
110
111			// Adding mPDFI functions
112			'enableImports' => false,
113
114			// Allows top and bottom margins to collapse between block elements
115			'collapseBlockMargins' => true,
116
117			// To interpret "px" pixel values in HTML/CSS (see img_dpi below)
118			'dpi' => 96,
119
120			// Automatically correct for tags where HTML specifies optional end tags e.g. P,LI,DD,TD
121			// If you are confident input html is valid XHTML, turning this off may make it more reliable(?)
122			'allow_html_optional_endtags' => true,
123
124			'ignore_invalid_utf8' => false,
125			// Converts all entities in Text inputs to UTF-8 before encoding
126			'text_input_as_HTML' => false,
127
128			// When writing a block element with position:fixed and overflow:auto, mPDF scales it down to fit in the space
129			// by repeatedly rewriting it and making adjustments. These values give the adjustments used, depending how far out
130			// the previous guess was. The lower the number, the quicker it will finish, but the less accurate the fit may be.
131			// FPR1 is for coarse adjustments, and FPR4 for fine adjustments when it is getting closer.
132			'incrementFPR1' => 10, // i.e. will alter by 1/[10]th of width and try again until within closer limits
133			'incrementFPR2' => 20,
134			'incrementFPR3' => 30,
135			'incrementFPR4' => 50, // i.e. will alter by 1/[50]th of width and try again when it nearly fits
136
137			// COLORSPACE
138			// 1 - allow GRAYSCALE only [convert CMYK/RGB->gray]
139			// 2 - allow RGB / SPOT COLOR / Grayscale [convert CMYK->RGB]
140			// 3 - allow CMYK / SPOT COLOR / Grayscale [convert RGB->CMYK]
141			'restrictColorSpace' => 0,
142
143			// PDFX/1-a Compliant files
144			// true=Forces compliance with PDFX-1a spec
145			// Cannot be used with 'restrictColorSpace' (i.e. no RGB)
146			'PDFX' => false,
147			// Overrides warnings making changes when possible to force PDFX1-a compliance
148			'PDFXauto' => false,
149
150			// PDFA1-b Compliant files
151			// true=Forces compliance with PDFA-1b spec
152			// Can use with 'restrictColorSpace'=3 (for a CMYK file)
153			// Any other settings, uses RGB profile
154			'PDFA' => false,
155			// Overrides warnings making changes when possible to force PDFA1-b compliance
156			'PDFAauto' => false,
157
158			// Colour profile OutputIntent
159			// sRGB_IEC61966-2-1 (=default if blank and PDFA), or other added .icc profile
160			// Must be CMYK for PDFX, or appropriate type for PDFA(RGB or CMYK)
161			'ICCProfile' => '',
162
163			'spotColors' => [],
164			'spotColorIDs' => [],
165
166			// DEBUGGING & DEVELOPERS
167			'debug' => false,
168			// Checks and reports on errors when parsing TTF files - adds significantly to processing time
169			'debugfonts' => false,
170			'showImageErrors' => false,
171			// Die and report error if table is too wide to contain whole words
172			'table_error_report' => false,
173			// Parameter which can be passed to show in error report i.e. chapter number being processed
174			'table_error_report_param' => '',
175
176			'title2annots' => false, // Automatically convert title="" properties in tags, to annotations
177			'annotSize' => 0.5, // default mm for Adobe annotations - nominal
178			'annotMargin' => null, // default position for Annotations
179			'annotOpacity' => 0.5, // default opacity for Annotations
180
181			// BOOKMARKS
182			// makes <a name=""> into a bookmark as well as internal link target, 1' => just name, 2' => name (p.34)
183			// Set an optional array to specify appearance of Bookmarks (by level)
184			// Default values are Black and normal style
185			'anchor2Bookmark' => 0,
186
187			/*
188				Example:
189				'bookmarkStyles' => array(
190					0 => array('color'=> array(0,64,128), 'style'=>'B'),
191					1 => array('color'=> array(128,0,0), 'style'=>''),
192					2 => array('color'=> array(0,128,0), 'style'=>'I'),
193				),
194			*/
195			'bookmarkStyles' => [],
196
197			// Specify whether to automatically generate bookmarks from h1 - h6 tags
198			/*
199				Define arrays with e.g. the tag=>Bookmark-level
200				Remember bookmark levels start at 0
201				(does not work inside tables)
202				H1 - H6 must be uppercase
203				'h2bookmarks' => array('H1'=>0, 'H2'=>1, 'H3'=>2),
204			*/
205			'h2bookmarks' => [],
206
207			// TABLE OF CONTENTS
208
209			// Specify whether to automatically generate ToC entries from h1 - h6 tags
210			/*
211				Define arrays with e.g. the tag=>ToC-level
212				Remember ToC levels start at 0
213				(does not work inside tables)
214				Only the default ToC will be used if > 1 ToCs are defined for the document
215				H1 - H6 must be uppercase
216				'h2toc' => array('H1'=>0, 'H2'=>1, 'H3'=>2),
217			*/
218			'h2toc' => [],
219
220			// INDEX
221			/* Specifies whether to repeat the main entry for each subEntry (true suppresses this)
222				e.g. Mammal:dog   ...   Mammal:elephant ->
223				[true]
224				Mammal
225				- dog
226				- elephant
227				[false]
228				Mammal, dog
229				Mammal, elephant
230			*/
231			'indexUseSubentries' => true,
232
233			// CSS & STYLES
234			// screen, print, or any other CSS @media type (except "all")
235			'CSSselectMedia' => 'print',
236
237			// PAGE HEADERS & FOOTERS
238			'forcePortraitHeaders' => false,
239
240			// Values used if simple FOOTER/HEADER given i.e. not array
241			'defaultheaderfontsize' => 8, // pt
242			'defaultheaderfontstyle' => 'BI', // '', or 'B' or 'I' or 'BI'
243			'defaultheaderline' => 1, // 1 or 0 - line under the header
244			'defaultfooterfontsize' => 8, // pt
245			'defaultfooterfontstyle' => 'BI', // '', or 'B' or 'I' or 'BI'
246			'defaultfooterline' => 1, // 1 or 0 - line over the footer
247
248			// spacing between bottom of header and line (if present) - function of fontsize
249			'header_line_spacing' => 0.25,
250			// spacing between bottom of header and line (if present) - function of fontsize
251			'footer_line_spacing' => 0.25,
252			// If 'pad' margin-top sets fixed distance in mm (padding) between bottom of header and top of text.
253			// If 'stretch' margin-top sets a minimum distance in mm between top of page and top of text, which expands if header is too large to fit.
254			'setAutoTopMargin' => false,
255			'setAutoBottomMargin' => false,
256			// distance in mm used as padding if 'stretch' mode is used
257			'autoMarginPadding' => 2,
258
259			// TABLES
260			// Forces all cells to have same border, background etc. Improves performance
261			'simpleTables' => false,
262			// Reduce memory usage processing tables (but with increased processing time)
263			'packTableData' => false,
264
265			'ignore_table_percents' => false,
266			'ignore_table_widths' => false,
267			// If table width set > page width, force resizing but keep relative sizes
268			// Also forces respect of cell widths set by %
269			'keep_table_proportions' => true,
270			// automatically reduce fontsize in table if words would have to split ( not in CJK)
271			// 0 or false to disable, value (if set) gives maximum factor to reduce fontsize
272			'shrink_tables_to_fit' => 1.4,
273
274			// If page-break-inside:avoid but cannot fit on full page without
275			// exceeding autosize, setting this value to true will force respect for autosize, and disable the page-break-inside:avoid
276			'tableMinSizePriority' => false,
277
278			// "Keep-with-table" Attempts to keep a <h1> to <h6> tagged heading together with a table which comes immediately after it.
279			'use_kwt' => false,
280			// Set to TRUE to use table Head iteration counter
281			'iterationCounter' => false,
282			// Use table border (using this width in mm) when table breaks across pages
283			// Recommended to use small value e.g. 0.01
284			'splitTableBorderWidth' => 0,
285
286			// Allowed characters for text alignment on decimal marks. Additional codes must start with D
287			// DM - middot U+00B7
288			// DA - arabic decimal mark U+066B
289			'decimal_align' => ['DP' => '.', 'DC' => ',', 'DM' => "\xc2\xb7", 'DA' => "\xd9\xab", 'DD' => '-'],
290
291			// IMAGES
292			// if image-rendering=='auto', this defines value for image-rendering
293			// if true, image interpolation shall be performed by a conforming reader
294			'interpolateImages' => false,
295			// Default dpi to output images if size not defined
296			// See also above "dpi"
297			'img_dpi' => 96,
298			// Specify whitelisted PHP streams to be used for images
299			// Useful to add custom streams like `s3`
300			// Note: for security reasons the `phar` stream cannot be used @see https://github.com/mpdf/mpdf/issues/949
301			'whitelistStreamWrappers' => ['http', 'https', 'file'],
302
303			// TEXT SPACING & JUSTIFICATION
304
305			// Specify whether kerning should be used when CSS font-kerning="auto" used for HTML,
306			// Also whether kerning should be used in any direct writing e.g. $mpdf->Text(),
307			'useKerning' => false,
308			// In justified text, <BR> does not cause the preceding text to be justified in browsers
309			// Change to true to force justification (as in MS Word)
310			'justifyB4br' => false,
311
312			// Number of spaces to replace for a TAB in <pre> sections
313			// Notepad uses 6, HTML specification recommends 8
314			'tabSpaces' => 8,
315			// Proportion (/1) of space (when justifying margins) to allocate to Word vs. Character
316			'jSWord' => 0.4,
317			// Maximum spacing to allocate to character spacing. (0' => no maximum)
318			'jSmaxChar' => 2,
319
320			// Maximum character spacing allowed (carried over) when finishing a last line
321			'jSmaxCharLast' => 1,
322			// Maximum word spacing allowed (carried over) when finishing a last line
323			'jSmaxWordLast' => 2,
324
325			// LINE SPACING & TEXT BASELINE
326			// Use the fixed factor ('normalLineheight') when line-height:normal
327			// Compatible with mPDF versions < 6
328			'useFixedNormalLineHeight' => false,
329
330			// Use a fixed ratio ('baselineC') to set the text baseline
331			// Compatible with mPDF versions < 6
332			'useFixedTextBaseline' => false,
333
334			// Default Value used for line-height when CSS specified as 'normal' (default)
335			'normalLineheight' => 1.33,
336
337			// Correction factor applied to lineheight values derived from 'win', 'mac', 'winTypo'
338			'adjustFontDescLineheight' => 1.14,
339
340			// Small Caps
341			// Factor of 1 to scale capital letters
342			'smCapsScale' => 0.75,
343			// % to stretch small caps horizontally (i.e. 100' => no stretch)
344			'smCapsStretch' => 110,
345
346			// Line-breaking
347			// The alternative to these next 2 is the use of U+200B Zero-width space
348			// These are only effective if using OTL for the fonts
349			// Use the dictionaries to determine line-breaking in Lao, Khmer and Thai
350			'useDictionaryLBR' => true,
351			// Use the inbuilt algorithm to determine line-breaking in Tibetan
352			'useTibetanLBR' => true,
353
354			// CJK Line-breaking
355			// FALSE=always wrap to next line, TRUE=squeeze or overflow
356			'allowCJKorphans' => true,
357			// FALSE=squeeze, TRUE=overflow (only some characters, and disabled in tables)
358			'allowCJKoverflow' => false,
359			// Forces overflowng punctuation to hang outside right margin mPDF 5.6.40
360			'CJKforceend' => false,
361
362			// COLUMNS
363			'keepColumns' => false, // Set to go to the second column only when the first is full of text etc.
364			'max_colH_correction' => 1.15, // Maximum ratio to adjust column height when justifying - too large a value can give ugly results
365			'ColGap' => 5,
366
367			// LISTS
368			// mPDF 6
369			// 'mpdf' or 'browser' - Specify whether to use mPDF custom method of automatic
370			'list_auto_mode' => 'browser',
371			// indentation of lists, or standard browser-compatible
372			// custom mPDF method is ignored if list-style-position: inside, or image used for marker (or custom U+)
373			// List Indentation when set to 'auto' if using standard browser-compatible method
374			'list_indent_default' => '40px',
375			// List Indentation when set to 'auto' if using mPDF custom method
376			'list_indent_default_mpdf' => '0em',
377			// 1/0 yes/no to indent first level of list, if using mPDF custom method
378			'list_indent_first_level' => 0,
379
380			// Content to follow a numbered list marker e.g. '.' gives 1. or IV., ')' gives 1) or a)
381			'list_number_suffix' => '.',
382
383			// To specify a bullet size and offset proportional to the list item's font size:
384			// Browsers use a fixed bullet size and offset
385			// Offset (CSS length) of list marker bullets (disc/circle/square)
386			'list_marker_offset' => '5.5pt',
387			// Size (CSS) of list marker bullets (disc/circle/square)
388			'list_symbol_size' => '3.6pt',
389
390			// Hyphenation
391			'SHYlanguages' => ['en', 'de', 'es', 'fi', 'fr', 'it', 'nl', 'pl', 'ru', 'sv'], // existing defined patterns
392			'SHYlang' => "en", // 'en','de','es','fi','fr','it','nl','pl','ru','sv'
393			'SHYleftmin' => 2,
394			'SHYrightmin' => 2,
395			'SHYcharmin' => 2,
396			'SHYcharmax' => 10,
397
398			// ACTIVE FORMS
399			'useActiveForms' => false,
400
401			// WATERMARKS
402			'watermarkImgBehind' => false,
403			'showWatermarkText' => 0,
404			'showWatermarkImage' => 0,
405			'watermarkText' => '',
406			'watermarkAngle' => 45,
407			'watermarkImage' => '',
408			'watermark_font' => '',
409			'watermarkTextAlpha' => 0.2,
410			'watermarkImageAlpha' => 0.2,
411
412			// Accepts any PDF spec. value: Normal, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn, HardLight, SoftLight, Difference, Exclusion
413			// "Multiply" works well for watermark image on top
414			'watermarkImgAlphaBlend' => 'Normal',
415
416			// BORDERS
417			'autoPadding' => false, // Automatically increases padding in block elements when border-radius set - if required
418
419			// SVG
420
421			// If you wish to use Automatic Font selection within SVG's. change this definition to true.
422			// This selects different fonts for different scripts used in text.
423			// This can be enabled/disabled independently of the use of Automatic Font selection within mPDF generally.
424			// Choice of font is determined by the LangToFont and ScriptToLang classes, the same as for mPDF generally.
425			'svgAutoFont' => false,
426
427			// Enable a limited use of classes within SVG <text> elements by setting this to true.
428			// This allows recognition of a "class" attribute on a <text> element.
429			// The CSS style for that class should be outside the SVG, and cannot use any other selectors (i.e. only .class {} can be defined)
430			// <style> definitions within the SVG code will be recognised if the SVG is included as an inline item within the HTML code passed to mPDF.
431			// The style property should be pertinent to SVG e.g. use fill:red rather than color:red
432			// Only the properties currently supported for SVG text can be specified:
433			// fill, fill-opacity, stroke, stroke-opacity, stroke-linecap, stroke-linejoin, stroke-width, stroke-dasharray, stroke-dashoffset
434			// font-family, font-size, font-weight, font-variant, font-style, opacity, text-anchor
435			'svgClasses' => false,
436
437			// Default values if no style sheet offered	(cf. http://www.w3.org/TR/CSS21/sample.html)
438			'defaultCSS' => DefaultCss::$definition,
439			'defaultCssFile' => __DIR__ . '/../../data/mpdf.css',
440
441			'customProperties' => [],
442
443			'languageToFont' => new LanguageToFont(),
444			'scriptToLanguage' => new ScriptToLanguage(),
445
446			//////////////////////////////////////////////////
447			// VALUES ONLY LIKELY TO BE CHANGED BY DEVELOPERS
448			//////////////////////////////////////////////////
449
450			'pdf_version' => '1.4',
451
452			'fontDir' => [
453				__DIR__ . '/../../ttfonts'
454			],
455
456			'tempDir' => __DIR__ . '/../../tmp',
457
458			'allowAnnotationFiles' => false,
459
460			'hyphenationDictionaryFile' => __DIR__ . '/../../data/patterns/dictionary.txt',
461
462			'default_lineheight_correction' => 1.2, // Value 1 sets lineheight=fontsize height,
463			// Value used if line-height not set by CSS (usually is)
464
465			'fontsizes' => ['XX-SMALL' => 0.7, 'X-SMALL' => 0.77, 'SMALL' => 0.86, 'MEDIUM' => 1, 'LARGE' => 1.2, 'X-LARGE' => 1.5, 'XX-LARGE' => 2],
466
467			// CHARACTER PATTERN MATCHES TO DETECT LANGUAGES
468			// pattern used to detect RTL characters -> force RTL
469			'pregRTLchars' => "\x{0590}-\x{06FF}\x{0700}-\x{085F}\x{FB00}-\x{FDFD}\x{FE70}-\x{FEFF}", // 085F to include Mandaic
470			// Chars which distinguish CJK but not between different
471			'pregCJKchars' => "\x{1100}-\x{11FF}\x{2E80}-\x{A4CF}\x{A800}-\x{D7AF}\x{F900}-\x{FAFF}\x{FE30}-\x{FE6F}\x{FF00}-\x{FFEF}\x{20000}-\x{2FA1F}",
472
473			/**
474			 * References for CJK line-breaking
475			 *
476			 * http://en.wikipedia.org/wiki/Line_breaking_rules_in_East_Asian_languages
477			 * http://msdn.microsoft.com/en-us/goglobal/bb688158.aspx - listed using charsets
478			 * Word wrapping in other langauges - http://msdn.microsoft.com/en-us/goglobal/bb688158.aspx
479			 * Word wrapping in Japanese/Korean - http://en.wikipedia.org/wiki/Kinsoku_shori
480			 * Unicode character types: http://unicode.org/reports/tr14/
481			 * http://xml.ascc.net/en/utf-8/faq/zhl10n-faq-xsl.html#qb1
482			 * ECMA-376 4th edition Part 1
483			 * http://www.ecma-international.org/publications/standards/Ecma-376.htm
484			 */
485
486			// Leading characters - Not allowed at end of line
487			'CJKleading' => "\$\(\*\[\{\x{00a3}\x{00a5}\x{00ab}\x{00b7}\x{2018}\x{201c}\x{2035}\x{3005}\x{3007}\x{3008}\x{300a}\x{300c}\x{300e}\x{3010}\x{3014}\x{3016}\x{3018}\x{301d}\x{fe34}\x{fe35}\x{fe37}\x{fe39}\x{fe3b}\x{fe3d}\x{fe3f}\x{fe41}\x{fe43}\x{fe57}\x{fe59}\x{fe5b}\x{fe5d}\x{ff04}\x{ff08}\x{ff0e}\x{ff3b}\x{ff5b}\x{ff5f}\x{ff62}\x{ffe1}\x{ffe5}\x{ffe6}",
488
489			// Following characters - Not allowed at start
490			'CJKfollowing' => "!%\),\.:,>\?\]\}\x{00a2}\x{00a8}\x{00b0}\x{00b7}\x{00bb}\x{02c7}\x{02c9}\x{2010}\x{2013}-\x{2016}\x{2019}\x{201d}-\x{201f}\x{2020}-\x{2022}\x{2025}-\x{2027}\x{2030}\x{2032}\x{2033}\x{203a}\x{203c}\x{2047}-\x{2049}\x{2103}\x{2236}\x{2574}\x{3001}-\x{3003}\x{3005}\x{3006}\x{3009}\x{300b}\x{300d}\x{300f}\x{3011}\x{3015}\x{3017}\x{3019}\x{301c}\x{301e}\x{301f}\x{303b}\x{3041}\x{3043}\x{3045}\x{3047}\x{3049}\x{3063}\x{3083}\x{3085}\x{3087}\x{308e}\x{3095}\x{3096}\x{309b}-\x{309e}\x{30a0}\x{30a1}\x{30a3}\x{30a5}\x{30a7}\x{30a9}\x{30c3}\x{30e3}\x{30e5}\x{30e7}\x{30ee}\x{30f5}\x{30f6}\x{30fb}-\x{30fd}\x{30fe}\x{31f0}-\x{31ff}\x{fe30}\x{fe31}-\x{fe34}\x{fe36}\x{fe38}\x{fe3a}\x{fe3c}\x{fe3e}\x{fe40}\x{fe42}\x{fe44}\x{fe4f}\x{fe50}-\x{fe58}\x{fe5a}\x{fe5c}-\x{fe5e}\x{ff01}\x{ff02}\x{ff05}\x{ff07}\x{ff09}\x{ff0c}\x{ff0e}\x{ff1a}\x{ff1b}\x{ff1f}\x{ff3d}\x{ff40}\x{ff5c}-\x{ff5e}\x{ff60}\x{ff61}\x{ff63}-\x{ff65}\x{ff9e}\x{ff9f}\x{ffe0}",
491
492			// Characters which are allowed to overflow the right margin (from CSS3 http://www.w3.org/TR/2012/WD-css3-text-20120814/#hanging-punctuation)
493			'CJKoverflow' => "\.,\x{ff61}\x{ff64}\x{3001}\x{3002}\x{fe50}-\x{fe52}\x{ff0c}\x{ff0e}",
494
495			// Used for preventing letter-spacing in cursive scripts
496			// NB The following scripts in Unicode 6 are considered to be cursive scripts,
497			// and do not allow expansion opportunities between their letters:
498			// Arabic, Syriac, Mandaic, Mongolian, N'Ko, Phags Pa
499			'pregCURSchars' => "\x{0590}-\x{083E}\x{0900}-\x{0DFF}\x{FB00}-\x{FDFD}\x{FE70}-\x{FEFF}",
500
501			'allowedCSStags' => 'DIV|P|H1|H2|H3|H4|H5|H6|FORM|IMG|A|BODY|TABLE|HR|THEAD|TFOOT|TBODY|TH|TR|TD|UL|OL|LI|PRE|BLOCKQUOTE|ADDRESS|DL|DT|DD'
502				. '|ARTICLE|ASIDE|FIGURE|FIGCAPTION|FOOTER|HEADER|HGROUP|NAV|SECTION|MAIN|MARK|DETAILS|SUMMARY|METER|PROGRESS|TIME'
503				. '|SPAN|TT|I|B|BIG|SMALL|EM|STRONG|DFN|CODE|SAMP|KBD|VAR|CITE|ABBR|ACRONYM|STRIKE|S|U|DEL|INS|Q|FONT'
504				. '|SELECT|INPUT|TEXTAREA|CAPTION|FIELDSET|LEGEND'
505				. '|TEXTCIRCLE|DOTTAB|BDO|BDI',
506
507			'outerblocktags' => ['DIV', 'FORM', 'CENTER', 'DL', 'FIELDSET', 'ARTICLE', 'ASIDE', 'FIGURE', 'FIGCAPTION', 'FOOTER', 'HEADER', 'HGROUP', 'MAIN', 'NAV', 'SECTION', 'DETAILS', 'SUMMARY', 'UL', 'OL', 'LI'],
508			'innerblocktags' => ['P', 'BLOCKQUOTE', 'ADDRESS', 'PRE', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'DT', 'DD', 'CAPTION'],
509
510			// cURL options
511			'curlFollowLocation' => false,
512			'curlAllowUnsafeSslRequests' => false,
513			'curlCaCertificate' => '',
514			'curlTimeout' => 5,
515			'curlProxy' => null,
516			'curlProxyAuth' => null,
517			'curlUserAgent' => 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1',
518
519			'exposeVersion' => true,
520		];
521	}
522
523	public function getDefaults()
524	{
525		return $this->defaults;
526	}
527}
528