Skip to content

Commit

Permalink
Merge pull request #2088 from dompdf/develop
Browse files Browse the repository at this point in the history
Preparation for 0.8.5 release
  • Loading branch information
bsweeney committed Feb 20, 2020
2 parents 8f49b3b + 655667f commit 6782abf
Show file tree
Hide file tree
Showing 56 changed files with 1,455 additions and 1,441 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -47,7 +47,7 @@ Follow us on [![Twitter](http://twitter-badges.s3.amazonaws.com/twitter-a.png)](

## Requirements

* PHP version 5.4.0 or higher
* PHP version 7.1 or higher
* DOM extension
* MBString extension
* php-font-lib
Expand Down
338 changes: 169 additions & 169 deletions lib/Cpdf.php

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions lib/fonts/dompdf_font_family_cache.dist.php
@@ -1,95 +1,95 @@
<?php
$distFontDir = $rootDir . '/lib/fonts';
return array(
return [
'sans-serif' =>
array(
[
'normal' => $distFontDir . '/Helvetica',
'bold' => $distFontDir . '/Helvetica-Bold',
'italic' => $distFontDir . '/Helvetica-Oblique',
'bold_italic' => $distFontDir . '/Helvetica-BoldOblique'
),
],
'times' =>
array(
[
'normal' => $distFontDir . '/Times-Roman',
'bold' => $distFontDir . '/Times-Bold',
'italic' => $distFontDir . '/Times-Italic',
'bold_italic' => $distFontDir . '/Times-BoldItalic'
),
],
'times-roman' =>
array(
[
'normal' => $distFontDir . '/Times-Roman',
'bold' => $distFontDir . '/Times-Bold',
'italic' => $distFontDir . '/Times-Italic',
'bold_italic' => $distFontDir . '/Times-BoldItalic'
),
],
'courier' =>
array(
[
'normal' => $distFontDir . '/Courier',
'bold' => $distFontDir . '/Courier-Bold',
'italic' => $distFontDir . '/Courier-Oblique',
'bold_italic' => $distFontDir . '/Courier-BoldOblique'
),
],
'helvetica' =>
array(
[
'normal' => $distFontDir . '/Helvetica',
'bold' => $distFontDir . '/Helvetica-Bold',
'italic' => $distFontDir . '/Helvetica-Oblique',
'bold_italic' => $distFontDir . '/Helvetica-BoldOblique'
),
],
'zapfdingbats' =>
array(
[
'normal' => $distFontDir . '/ZapfDingbats',
'bold' => $distFontDir . '/ZapfDingbats',
'italic' => $distFontDir . '/ZapfDingbats',
'bold_italic' => $distFontDir . '/ZapfDingbats'
),
],
'symbol' =>
array(
[
'normal' => $distFontDir . '/Symbol',
'bold' => $distFontDir . '/Symbol',
'italic' => $distFontDir . '/Symbol',
'bold_italic' => $distFontDir . '/Symbol'
),
],
'serif' =>
array(
[
'normal' => $distFontDir . '/Times-Roman',
'bold' => $distFontDir . '/Times-Bold',
'italic' => $distFontDir . '/Times-Italic',
'bold_italic' => $distFontDir . '/Times-BoldItalic'
),
],
'monospace' =>
array(
[
'normal' => $distFontDir . '/Courier',
'bold' => $distFontDir . '/Courier-Bold',
'italic' => $distFontDir . '/Courier-Oblique',
'bold_italic' => $distFontDir . '/Courier-BoldOblique'
),
],
'fixed' =>
array(
[
'normal' => $distFontDir . '/Courier',
'bold' => $distFontDir . '/Courier-Bold',
'italic' => $distFontDir . '/Courier-Oblique',
'bold_italic' => $distFontDir . '/Courier-BoldOblique'
),
],
'dejavu sans' =>
array(
[
'bold' => $distFontDir . '/DejaVuSans-Bold',
'bold_italic' => $distFontDir . '/DejaVuSans-BoldOblique',
'italic' => $distFontDir . '/DejaVuSans-Oblique',
'normal' => $distFontDir . '/DejaVuSans'
),
],
'dejavu sans mono' =>
array(
[
'bold' => $distFontDir . '/DejaVuSansMono-Bold',
'bold_italic' => $distFontDir . '/DejaVuSansMono-BoldOblique',
'italic' => $distFontDir . '/DejaVuSansMono-Oblique',
'normal' => $distFontDir . '/DejaVuSansMono'
),
],
'dejavu serif' =>
array(
[
'bold' => $distFontDir . '/DejaVuSerif-Bold',
'bold_italic' => $distFontDir . '/DejaVuSerif-BoldItalic',
'italic' => $distFontDir . '/DejaVuSerif-Italic',
'normal' => $distFontDir . '/DejaVuSerif'
)
);
]
];
4 changes: 2 additions & 2 deletions lib/html5lib/Data.php
Expand Up @@ -10,7 +10,7 @@ class HTML5_Data
// codepoints
// XXX: Not quite sure why it's named this; this is
// actually the numeric entity dereference table.
protected static $realCodepointTable = array(
protected static $realCodepointTable = [
0x00 => 0xFFFD, // REPLACEMENT CHARACTER
0x0D => 0x000A, // LINE FEED (LF)
0x80 => 0x20AC, // EURO SIGN ('€')
Expand Down Expand Up @@ -45,7 +45,7 @@ class HTML5_Data
0x9D => 0x009D, // <control>
0x9E => 0x017E, // LATIN SMALL LETTER Z WITH CARON ('ž')
0x9F => 0x0178, // LATIN CAPITAL LETTER Y WITH DIAERESIS ('Ÿ')
);
];

protected static $namedCharacterReferences;

Expand Down
18 changes: 9 additions & 9 deletions lib/html5lib/InputStream.php
Expand Up @@ -48,7 +48,7 @@ class HTML5_InputStream {
/**
* Parse errors.
*/
public $errors = array();
public $errors = [];

/**
* @param $data | Data to parse
Expand Down Expand Up @@ -90,10 +90,10 @@ public function __construct($data) {
by U+FFFD REPLACEMENT CHARACTERs. Any occurrences of such
characters is a parse error. */
for ($i = 0, $count = substr_count($data, "\0"); $i < $count; $i++) {
$this->errors[] = array(
$this->errors[] = [
'type' => HTML5_Tokenizer::PARSEERROR,
'data' => 'null-character'
);
];
}
/* U+000D CARRIAGE RETURN (CR) characters and U+000A LINE FEED
(LF) characters are treated specially. Any CR characters
Expand All @@ -103,16 +103,16 @@ public function __construct($data) {
by LF characters, and there are never any CR characters in the
input to the tokenization stage. */
$data = str_replace(
array(
[
"\0",
"\r\n",
"\r"
),
array(
],
[
"\xEF\xBF\xBD",
"\n",
"\n"
),
],
$data
);

Expand Down Expand Up @@ -146,10 +146,10 @@ public function __construct($data) {
$matches
);
for ($i = 0; $i < $count; $i++) {
$this->errors[] = array(
$this->errors[] = [
'type' => HTML5_Tokenizer::PARSEERROR,
'data' => 'invalid-codepoint'
);
];
}
} else {
// XXX: Need non-PCRE impl, probably using substr_count
Expand Down

0 comments on commit 6782abf

Please sign in to comment.