1<?php
2
3namespace Mpdf\Config;
4
5use Mpdf\Css\DefaultCss;
6use Mpdf\Language\LanguageToFont;
7use Mpdf\Language\ScriptToLanguage;
8use Mpdf\Ucdn;
9
10class ConfigVariables
11{
12
13	private $defaults;
14
15	public function __construct()
16	{
17
18		$this->defaults = [
19
20			// PAGING
21			'mirrorMargins' => 0,
22			'forcePortraitMargins' => false,
23			'displayDefaultOrientation' => false,
24
25			// Adds date and page info for printer when using @page and "marks:crop,"
26			'printers_info' => false,
27			'bleedMargin' => 5,
28
29			// Distance of cross mark from margin in mm
30			'crossMarkMargin' => 5,
31			// Distance of crop mark from margin in mm
32			'cropMarkMargin' => 8,
33			// Default length in mm of crop line
34			'cropMarkLength' => 18,
35			// Non-printable border at edge of paper sheet in mm
36			'nonPrintMargin' => 8,
37
38			// 'slice' or 'cloneall' or 'clonebycss' - for forced pagebreaks using <pagebreak />
39			// Automatic pagebreaks (flow in text) are always 'slice'
40			'defaultPagebreakType' => 'cloneall',
41
42			// Avoid just the border/background-color of the end of a block being moved on to next page
43			// Allows an (empty) end of block to extend beyond the bottom margin by this amount (mm)
44			'margBuffer' => 2,
45
46			// PAGE NUMBERING
47			'pagenumPrefix' => '',
48			'pagenumSuffix' => '',
49			'nbpgPrefix' => '',
50			'nbpgSuffix' => '',
51			// 1:Decimal, A:uppercase alphabetic etc. (as for list-style shorthands)
52			'defaultPageNumStyle' => '1',
53
54			// PAGE NUMBER ALIASES
55			'aliasNbPg' => '{nb}',
56			'aliasNbPgGp' => '{nbpg}',
57
58			// FONTS, LANGUAGES & CHARACTER SETS
59			// Set maximum size of TTF font file to allow non-subsets - in kB
60			// Used to avoid a font e.g. Arial Unicode MS (perhaps used for substitutions) ever being fully embedded
61			// NB Free serif is 1.5MB, most files are <= 600kB (most 200-400KB)
62			'maxTTFFilesize' => 2000,
63
64			// this value determines whether to subset or not
65			// 0 - 100' => percent characters
66			// i.e. if ==40, mPDF will embed whole font if >40% characters in that font
67			// or embed subset if <40% characters
68			// 0 will force whole file to be embedded (NO subsetting)
69			// 100 will force always to subset
70			// This value is overridden if you set new mPDF('s')
71			// and/or Can set at runtime
72			'percentSubset' => 30,
73
74			// Uses Adobe CJK fonts for CJK languages
75			// default TRUE, only set false if you have defined some available fonts that support CJK
76			// If true this will not stop use of other CJK fonts if specified by font-family:
77			// and vice versa i.e. only dictates behaviour when specified by lang="" incl. AutoFont()
78			'useAdobeCJK' => false,
79
80			// When embedding full TTF font files, remakes the font file using only core tables
81			// May improve function with some PostScript printers (GhostScript/GSView)
82			// Does not work with TTC font collections
83			// Slightly smaller file, increased processing time
84			'repackageTTF' => false,
85
86			// Allows automatic character set conversion if "charset=xxx" detected in html header (WriteHTML() )
87			'allow_charset_conversion' => true,
88			// Automatically determine BIDI text in LTR page
89			'biDirectional' => false,
90
91			// AUTOMATIC FONT SELECTION
92			// Based on script and/or language
93			// mPDF 6.0 (similar to previously using function SetAutoFont() )
94			'autoScriptToLang' => false,
95			'baseScript' => Ucdn::SCRIPT_LATIN,
96			'autoVietnamese' => true,
97			'autoArabic' => true,
98			// mPDF 6.0 (similar to old useLang)
99			'autoLangToFont' => false,
100
101			// Substitute missing characters in UTF-8(multibyte) documents - from other fonts
102			'useSubstitutions' => false,
103			// Weight for bold text when using an artificial (outline) bold, value 0 (off) - 10 (rec. max)
104			'falseBoldWeight' => 5,
105
106			// CONFIGURATION
107			'allow_output_buffering' => false,
108
109			// Adding mPDFI functions
110			'enableImports' => false,
111
112			// Allows top and bottom margins to collapse between block elements
113			'collapseBlockMargins' => true,
114
115			// To interpret "px" pixel values in HTML/CSS (see img_dpi below)
116			'dpi' => 96,
117
118			// Automatically correct for tags where HTML specifies optional end tags e.g. P,LI,DD,TD
119			// If you are confident input html is valid XHTML, turning this off may make it more reliable(?)
120			'allow_html_optional_endtags' => true,
121
122			'ignore_invalid_utf8' => false,
123			// Converts all entities in Text inputs to UTF-8 before encoding
124			'text_input_as_HTML' => false,
125
126			// When writing a block element with position:fixed and overflow:auto, mPDF scales it down to fit in the space
127			// by repeatedly rewriting it and making adjustments. These values give the adjustments used, depending how far out
128			// the previous guess was. The lower the number, the quicker it will finish, but the less accurate the fit may be.
129			// FPR1 is for coarse adjustments, and FPR4 for fine adjustments when it is getting closer.
130			'incrementFPR1' => 10, // i.e. will alter by 1/[10]th of width and try again until within closer limits
131			'incrementFPR2' => 20,
132			'incrementFPR3' => 30,
133			'incrementFPR4' => 50, // i.e. will alter by 1/[50]th of width and try again when it nearly fits
134
135			// COLORSPACE
136			// 1 - allow GRAYSCALE only [convert CMYK/RGB->gray]
137			// 2 - allow RGB / SPOT COLOR / Grayscale [convert CMYK->RGB]
138			// 3 - allow CMYK / SPOT COLOR / Grayscale [convert RGB->CMYK]
139			'restrictColorSpace' => 0,
140
141			// PDFX/1-a Compliant files
142			// true=Forces compliance with PDFX-1a spec
143			// Cannot be used with 'restrictColorSpace' (i.e. no RGB)
144			'PDFX' => false,
145			// Overrides warnings making changes when possible to force PDFX1-a compliance
146			'PDFXauto' => false,
147
148			// PDFA1-b Compliant files
149			// true=Forces compliance with PDFA-1b spec
150			// Can use with 'restrictColorSpace'=3 (for a CMYK file)
151			// Any other settings, uses RGB profile
152			'PDFA' => false,
153			// Overrides warnings making changes when possible to force PDFA1-b compliance
154			'PDFAauto' => false,
155
156			// Colour profile OutputIntent
157			// sRGB_IEC61966-2-1 (=default if blank and PDFA), or other added .icc profile
158			// Must be CMYK for PDFX, or appropriate type for PDFA(RGB or CMYK)
159			'ICCProfile' => '',
160
161			'spotColors' => [],
162			'spotColorIDs' => [],
163
164			// DEBUGGING & DEVELOPERS
165			'debug' => false,
166			// Checks and reports on errors when parsing TTF files - adds significantly to processing time
167			'debugfonts' => false,
168			'showImageErrors' => false,
169			// Die and report error if table is too wide to contain whole words
170			'table_error_report' => false,
171			// Parameter which can be passed to show in error report i.e. chapter number being processed
172			'table_error_report_param' => '',
173
174			'title2annots' => false, // Automatically convert title="" properties in tags, to annotations
175			'annotSize' => 0.5, // default mm for Adobe annotations - nominal
176			'annotMargin' => null, // default position for Annotations
177			'annotOpacity' => 0.5, // default opacity for Annotations
178
179			// BOOKMARKS
180			// makes <a name=""> into a bookmark as well as internal link target, 1' => just name, 2' => name (p.34)
181			// Set an optional array to specify appearance of Bookmarks (by level)
182			// Default values are Black and normal style
183			'anchor2Bookmark' => 0,
184
185			/*
186				Example:
187				'bookmarkStyles' => array(
188					0 => array('color'=> array(0,64,128), 'style'=>'B'),
189					1 => array('color'=> array(128,0,0), 'style'=>''),
190					2 => array('color'=> array(0,128,0), 'style'=>'I'),
191				),
192			*/
193			'bookmarkStyles' => [],
194
195			// Specify whether to automatically generate bookmarks from h1 - h6 tags
196			/*
197				Define arrays with e.g. the tag=>Bookmark-level
198				Remember bookmark levels start at 0
199				(does not work inside tables)
200				H1 - H6 must be uppercase
201				'h2bookmarks' => array('H1'=>0, 'H2'=>1, 'H3'=>2),
202			*/
203			'h2bookmarks' => [],
204
205			// TABLE OF CONTENTS
206
207			// Specify whether to automatically generate ToC entries from h1 - h6 tags
208			/*
209				Define arrays with e.g. the tag=>ToC-level
210				Remember ToC levels start at 0
211				(does not work inside tables)
212				Only the default ToC will be used if > 1 ToCs are defined for the document
213				H1 - H6 must be uppercase
214				'h2toc' => array('H1'=>0, 'H2'=>1, 'H3'=>2),
215			*/
216			'h2toc' => [],
217
218			// INDEX
219			/* Specifies whether to repeat the main entry for each subEntry (true suppresses this)
220				e.g. Mammal:dog   ...   Mammal:elephant ->
221				[true]
222				Mammal
223				- dog
224				- elephant
225				[false]
226				Mammal, dog
227				Mammal, elephant
228			*/
229			'indexUseSubentries' => true,
230
231			// CSS & STYLES
232			// screen, print, or any other CSS @media type (except "all")
233			'CSSselectMedia' => 'print',
234
235			// PAGE HEADERS & FOOTERS
236			'forcePortraitHeaders' => false,
237
238			// Values used if simple FOOTER/HEADER given i.e. not array
239			'defaultheaderfontsize' => 8, // pt
240			'defaultheaderfontstyle' => 'BI', // '', or 'B' or 'I' or 'BI'
241			'defaultheaderline' => 1, // 1 or 0 - line under the header
242			'defaultfooterfontsize' => 8, // pt
243			'defaultfooterfontstyle' => 'BI', // '', or 'B' or 'I' or 'BI'
244			'defaultfooterline' => 1, // 1 or 0 - line over the footer
245
246			// spacing between bottom of header and line (if present) - function of fontsize
247			'header_line_spacing' => 0.25,
248			// spacing between bottom of header and line (if present) - function of fontsize
249			'footer_line_spacing' => 0.25,
250			// If 'pad' margin-top sets fixed distance in mm (padding) between bottom of header and top of text.
251			// 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.
252			'setAutoTopMargin' => false,
253			'setAutoBottomMargin' => false,
254			// distance in mm used as padding if 'stretch' mode is used
255			'autoMarginPadding' => 2,
256
257			// TABLES
258			// Forces all cells to have same border, background etc. Improves performance
259			'simpleTables' => false,
260			// Reduce memory usage processing tables (but with increased processing time)
261			'packTableData' => false,
262
263			'ignore_table_percents' => false,
264			'ignore_table_widths' => false,
265			// If table width set > page width, force resizing but keep relative sizes
266			// Also forces respect of cell widths set by %
267			'keep_table_proportions' => true,
268			// automatically reduce fontsize in table if words would have to split ( not in CJK)
269			// 0 or false to disable, value (if set) gives maximum factor to reduce fontsize
270			'shrink_tables_to_fit' => 1.4,
271
272			// If page-break-inside:avoid but cannot fit on full page without
273			// exceeding autosize, setting this value to true will force respect for autosize, and disable the page-break-inside:avoid
274			'tableMinSizePriority' => false,
275
276			// "Keep-with-table" Attempts to keep a <h1> to <h6> tagged heading together with a table which comes immediately after it.
277			'use_kwt' => false,
278			// Set to TRUE to use table Head iteration counter
279			'iterationCounter' => false,
280			// Use table border (using this width in mm) when table breaks across pages
281			// Recommended to use small value e.g. 0.01
282			'splitTableBorderWidth' => 0,
283
284			// Allowed characters for text alignment on decimal marks. Additional codes must start with D
285			// DM - middot U+00B7
286			// DA - arabic decimal mark U+066B
287			'decimal_align' => ['DP' => '.', 'DC' => ',', 'DM' => "\xc2\xb7", 'DA' => "\xd9\xab", 'DD' => '-'],
288
289			// IMAGES
290			// if image-rendering=='auto', this defines value for image-rendering
291			// if true, image interpolation shall be performed by a conforming reader
292			'interpolateImages' => false,
293			// Default dpi to output images if size not defined
294			// See also above "dpi"
295			'img_dpi' => 96,
296			// Specify whitelisted PHP streams to be used for images
297			// Useful to add custom streams like `s3`
298			// Note: for security reasons the `phar` stream cannot be used @see https://github.com/mpdf/mpdf/issues/949
299			'whitelistStreamWrappers' => ['http', 'https', 'file'],
300
301			// TEXT SPACING & JUSTIFICATION
302
303			// Specify whether kerning should be used when CSS font-kerning="auto" used for HTML,
304			// Also whether kerning should be used in any direct writing e.g. $mpdf->Text(),
305			'useKerning' => false,
306			// In justified text, <BR> does not cause the preceding text to be justified in browsers
307			// Change to true to force justification (as in MS Word)
308			'justifyB4br' => false,
309
310			// Number of spaces to replace for a TAB in <pre> sections
311			// Notepad uses 6, HTML specification recommends 8
312			'tabSpaces' => 8,
313			// Proportion (/1) of space (when justifying margins) to allocate to Word vs. Character
314			'jSWord' => 0.4,
315			// Maximum spacing to allocate to character spacing. (0' => no maximum)
316			'jSmaxChar' => 2,
317
318			// Maximum character spacing allowed (carried over) when finishing a last line
319			'jSmaxCharLast' => 1,
320			// Maximum word spacing allowed (carried over) when finishing a last line
321			'jSmaxWordLast' => 2,
322
323			// LINE SPACING & TEXT BASELINE
324			// Use the fixed factor ('normalLineheight') when line-height:normal
325			// Compatible with mPDF versions < 6
326			'useFixedNormalLineHeight' => false,
327
328			// Use a fixed ratio ('baselineC') to set the text baseline
329			// Compatible with mPDF versions < 6
330			'useFixedTextBaseline' => false,
331
332			// Default Value used for line-height when CSS specified as 'normal' (default)
333			'normalLineheight' => 1.33,
334
335			// Correction factor applied to lineheight values derived from 'win', 'mac', 'winTypo'
336			'adjustFontDescLineheight' => 1.14,
337
338			// Small Caps
339			// Factor of 1 to scale capital letters
340			'smCapsScale' => 0.75,
341			// % to stretch small caps horizontally (i.e. 100' => no stretch)
342			'smCapsStretch' => 110,
343
344			// Line-breaking
345			// The alternative to these next 2 is the use of U+200B Zero-width space
346			// These are only effective if using OTL for the fonts
347			// Use the dictionaries to determine line-breaking in Lao, Khmer and Thai
348			'useDictionaryLBR' => true,
349			// Use the inbuilt algorithm to determine line-breaking in Tibetan
350			'useTibetanLBR' => true,
351
352			// CJK Line-breaking
353			// FALSE=always wrap to next line, TRUE=squeeze or overflow
354			'allowCJKorphans' => true,
355			// FALSE=squeeze, TRUE=overflow (only some characters, and disabled in tables)
356			'allowCJKoverflow' => false,
357			// Forces overflowng punctuation to hang outside right margin mPDF 5.6.40
358			'CJKforceend' => false,
359
360			// COLUMNS
361			'keepColumns' => false, // Set to go to the second column only when the first is full of text etc.
362			'max_colH_correction' => 1.15, // Maximum ratio to adjust column height when justifying - too large a value can give ugly results
363			'ColGap' => 5,
364
365			// LISTS
366			// mPDF 6
367			// 'mpdf' or 'browser' - Specify whether to use mPDF custom method of automatic
368			'list_auto_mode' => 'browser',
369			// indentation of lists, or standard browser-compatible
370			// custom mPDF method is ignored if list-style-position: inside, or image used for marker (or custom U+)
371			// List Indentation when set to 'auto' if using standard browser-compatible method
372			'list_indent_default' => '40px',
373			// List Indentation when set to 'auto' if using mPDF custom method
374			'list_indent_default_mpdf' => '0em',
375			// 1/0 yes/no to indent first level of list, if using mPDF custom method
376			'list_indent_first_level' => 0,
377
378			// Content to follow a numbered list marker e.g. '.' gives 1. or IV., ')' gives 1) or a)
379			'list_number_suffix' => '.',
380
381			// To specify a bullet size and offset proportional to the list item's font size:
382			// Browsers use a fixed bullet size and offset
383			// Offset (CSS length) of list marker bullets (disc/circle/square)
384			'list_marker_offset' => '5.5pt',
385			// Size (CSS) of list marker bullets (disc/circle/square)
386			'list_symbol_size' => '3.6pt',
387
388			// Hyphenation
389			'SHYlanguages' => ['en', 'de', 'es', 'fi', 'fr', 'it', 'nl', 'pl', 'ru', 'sv'], // existing defined patterns
390			'SHYlang' => "en", // 'en','de','es','fi','fr','it','nl','pl','ru','sv'
391			'SHYleftmin' => 2,
392			'SHYrightmin' => 2,
393			'SHYcharmin' => 2,
394			'SHYcharmax' => 10,
395
396			// ACTIVE FORMS
397			'useActiveForms' => false,
398
399			// WATERMARKS
400			'watermarkImgBehind' => false,
401			'showWatermarkText' => 0,
402			'showWatermarkImage' => 0,
403			'watermarkText' => '',
404			'watermarkAngle' => 45,
405			'watermarkImage' => '',
406			'watermark_font' => '',
407			'watermarkTextAlpha' => 0.2,
408			'watermarkImageAlpha' => 0.2,
409
410			// Accepts any PDF spec. value: Normal, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn, HardLight, SoftLight, Difference, Exclusion
411			// "Multiply" works well for watermark image on top
412			'watermarkImgAlphaBlend' => 'Normal',
413
414			// BORDERS
415			'autoPadding' => false, // Automatically increases padding in block elements when border-radius set - if required
416
417			// SVG
418
419			// If you wish to use Automatic Font selection within SVG's. change this definition to true.
420			// This selects different fonts for different scripts used in text.
421			// This can be enabled/disabled independently of the use of Automatic Font selection within mPDF generally.
422			// Choice of font is determined by the LangToFont and ScriptToLang classes, the same as for mPDF generally.
423			'svgAutoFont' => false,
424
425			// Enable a limited use of classes within SVG <text> elements by setting this to true.
426			// This allows recognition of a "class" attribute on a <text> element.
427			// The CSS style for that class should be outside the SVG, and cannot use any other selectors (i.e. only .class {} can be defined)
428			// <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.
429			// The style property should be pertinent to SVG e.g. use fill:red rather than color:red
430			// Only the properties currently supported for SVG text can be specified:
431			// fill, fill-opacity, stroke, stroke-opacity, stroke-linecap, stroke-linejoin, stroke-width, stroke-dasharray, stroke-dashoffset
432			// font-family, font-size, font-weight, font-variant, font-style, opacity, text-anchor
433			'svgClasses' => false,
434
435			// Default values if no style sheet offered	(cf. http://www.w3.org/TR/CSS21/sample.html)
436			'defaultCSS' => DefaultCss::$definition,
437			'defaultCssFile' => __DIR__ . '/../../data/mpdf.css',
438
439			'customProperties' => [],
440
441			'languageToFont' => new LanguageToFont(),
442			'scriptToLanguage' => new ScriptToLanguage(),
443
444			//////////////////////////////////////////////////
445			// VALUES ONLY LIKELY TO BE CHANGED BY DEVELOPERS
446			//////////////////////////////////////////////////
447
448			'pdf_version' => '1.4',
449
450			'fontDir' => [
451				__DIR__ . '/../../ttfonts'
452			],
453
454			'tempDir' => __DIR__ . '/../../tmp',
455
456			'cacheCleanupInterval' => 3600,
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			'curlExecutionTimeout' => null,
516			'curlProxy' => null,
517			'curlProxyAuth' => null,
518			'curlUserAgent' => 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1',
519
520			'exposeVersion' => true,
521		];
522	}
523
524	public function getDefaults()
525	{
526		return $this->defaults;
527	}
528}
529