Mise à jour des dépendences

This commit is contained in:
Noizette 2020-10-24 00:24:16 +02:00
parent bfecdbfe98
commit 4b3fa030d8
180 changed files with 2026 additions and 737 deletions

76
lib/MPDF/composer.lock generated
View File

@ -8,16 +8,16 @@
"packages": [
{
"name": "mpdf/mpdf",
"version": "v8.0.3",
"version": "v8.0.7",
"source": {
"type": "git",
"url": "https://github.com/mpdf/mpdf.git",
"reference": "6dd4285aff21f013554ff752046bb44ab1240f5f"
"reference": "7daf07f15334ed59a276bd52131dcca48794cdbd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mpdf/mpdf/zipball/6dd4285aff21f013554ff752046bb44ab1240f5f",
"reference": "6dd4285aff21f013554ff752046bb44ab1240f5f",
"url": "https://api.github.com/repos/mpdf/mpdf/zipball/7daf07f15334ed59a276bd52131dcca48794cdbd",
"reference": "7daf07f15334ed59a276bd52131dcca48794cdbd",
"shasum": ""
},
"require": {
@ -25,7 +25,7 @@
"ext-mbstring": "*",
"myclabs/deep-copy": "^1.7",
"paragonie/random_compat": "^1.4|^2.0|9.99.99",
"php": "^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0",
"php": "^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0",
"psr/log": "^1.0",
"setasign/fpdi": "^2.1"
},
@ -73,24 +73,30 @@
"php",
"utf-8"
],
"time": "2019-10-25T17:54:07+00:00"
"funding": [
{
"url": "https://www.paypal.me/mpdf",
"type": "custom"
}
],
"time": "2020-07-15T09:48:00+00:00"
},
{
"name": "myclabs/deep-copy",
"version": "1.9.3",
"version": "1.10.1",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea"
"reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea",
"reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
"reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
"shasum": ""
},
"require": {
"php": "^7.1"
"php": "^7.1 || ^8.0"
},
"replace": {
"myclabs/deep-copy": "self.version"
@ -121,7 +127,13 @@
"object",
"object graph"
],
"time": "2019-08-09T12:45:53+00:00"
"funding": [
{
"url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
"type": "tidelift"
}
],
"time": "2020-06-29T13:22:24+00:00"
},
{
"name": "paragonie/random_compat",
@ -170,16 +182,16 @@
},
{
"name": "psr/log",
"version": "1.1.2",
"version": "1.1.3",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801"
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801",
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801",
"url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
"shasum": ""
},
"require": {
@ -213,37 +225,38 @@
"psr",
"psr-3"
],
"time": "2019-11-01T11:05:21+00:00"
"time": "2020-03-23T09:12:05+00:00"
},
{
"name": "setasign/fpdi",
"version": "v2.2.0",
"version": "v2.3.4",
"source": {
"type": "git",
"url": "https://github.com/Setasign/FPDI.git",
"reference": "3c266002f8044f61b17329f7cd702d44d73f0f7f"
"reference": "2b5fb811c04f937ef257ef3f798cebeded33c136"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Setasign/FPDI/zipball/3c266002f8044f61b17329f7cd702d44d73f0f7f",
"reference": "3c266002f8044f61b17329f7cd702d44d73f0f7f",
"url": "https://api.github.com/repos/Setasign/FPDI/zipball/2b5fb811c04f937ef257ef3f798cebeded33c136",
"reference": "2b5fb811c04f937ef257ef3f798cebeded33c136",
"shasum": ""
},
"require": {
"ext-zlib": "*",
"php": "^5.6 || ^7.0"
},
"conflict": {
"setasign/tfpdf": "<1.31"
},
"require-dev": {
"phpunit/phpunit": "~5.7",
"setasign/fpdf": "~1.8",
"setasign/tfpdf": "1.25",
"setasign/tfpdf": "1.31",
"squizlabs/php_codesniffer": "^3.5",
"tecnickcom/tcpdf": "~6.2"
},
"suggest": {
"setasign/fpdf": "FPDI will extend this class but as it is also possible to use TCPDF or tFPDF as an alternative. There's no fixed dependency configured.",
"setasign/fpdi-fpdf": "Use this package to automatically evaluate dependencies to FPDF.",
"setasign/fpdi-tcpdf": "Use this package to automatically evaluate dependencies to TCPDF.",
"setasign/fpdi-tfpdf": "Use this package to automatically evaluate dependencies to tFPDF."
"setasign/fpdf": "FPDI will extend this class but as it is also possible to use TCPDF or tFPDF as an alternative. There's no fixed dependency configured."
},
"type": "library",
"autoload": {
@ -274,7 +287,13 @@
"fpdi",
"pdf"
],
"time": "2019-01-30T14:11:19+00:00"
"funding": [
{
"url": "https://tidelift.com/funding/github/packagist/setasign/fpdi",
"type": "tidelift"
}
],
"time": "2020-08-27T06:55:47+00:00"
}
],
"packages-dev": [],
@ -284,5 +303,6 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform-dev": [],
"plugin-api-version": "1.1.0"
}

View File

@ -60,7 +60,7 @@ class ClassLoader
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', $this->prefixesPsr0);
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
}
return array();

View File

@ -13,6 +13,9 @@ class ComposerAutoloaderInit464b8cc4726849d52f4325e9114ac125
}
}
/**
* @return \Composer\Autoload\ClassLoader
*/
public static function getLoader()
{
if (null !== self::$loader) {

View File

@ -1,17 +1,17 @@
[
{
"name": "mpdf/mpdf",
"version": "v8.0.3",
"version_normalized": "8.0.3.0",
"version": "v8.0.7",
"version_normalized": "8.0.7.0",
"source": {
"type": "git",
"url": "https://github.com/mpdf/mpdf.git",
"reference": "6dd4285aff21f013554ff752046bb44ab1240f5f"
"reference": "7daf07f15334ed59a276bd52131dcca48794cdbd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mpdf/mpdf/zipball/6dd4285aff21f013554ff752046bb44ab1240f5f",
"reference": "6dd4285aff21f013554ff752046bb44ab1240f5f",
"url": "https://api.github.com/repos/mpdf/mpdf/zipball/7daf07f15334ed59a276bd52131dcca48794cdbd",
"reference": "7daf07f15334ed59a276bd52131dcca48794cdbd",
"shasum": ""
},
"require": {
@ -19,7 +19,7 @@
"ext-mbstring": "*",
"myclabs/deep-copy": "^1.7",
"paragonie/random_compat": "^1.4|^2.0|9.99.99",
"php": "^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0",
"php": "^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0",
"psr/log": "^1.0",
"setasign/fpdi": "^2.1"
},
@ -35,7 +35,7 @@
"ext-xml": "Needed mainly for SVG manipulation",
"ext-zlib": "Needed for compression of embedded resources, such as fonts"
},
"time": "2019-10-25T17:54:07+00:00",
"time": "2020-07-15T09:48:00+00:00",
"type": "library",
"extra": {
"branch-alias": {
@ -68,25 +68,31 @@
"pdf",
"php",
"utf-8"
],
"funding": [
{
"url": "https://www.paypal.me/mpdf",
"type": "custom"
}
]
},
{
"name": "myclabs/deep-copy",
"version": "1.9.3",
"version_normalized": "1.9.3.0",
"version": "1.10.1",
"version_normalized": "1.10.1.0",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea"
"reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea",
"reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
"reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
"shasum": ""
},
"require": {
"php": "^7.1"
"php": "^7.1 || ^8.0"
},
"replace": {
"myclabs/deep-copy": "self.version"
@ -96,7 +102,7 @@
"doctrine/common": "^2.6",
"phpunit/phpunit": "^7.1"
},
"time": "2019-08-09T12:45:53+00:00",
"time": "2020-06-29T13:22:24+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -118,6 +124,12 @@
"duplicate",
"object",
"object graph"
],
"funding": [
{
"url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
"type": "tidelift"
}
]
},
{
@ -169,23 +181,23 @@
},
{
"name": "psr/log",
"version": "1.1.2",
"version_normalized": "1.1.2.0",
"version": "1.1.3",
"version_normalized": "1.1.3.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801"
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801",
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801",
"url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"time": "2019-11-01T11:05:21+00:00",
"time": "2020-03-23T09:12:05+00:00",
"type": "library",
"extra": {
"branch-alias": {
@ -218,36 +230,37 @@
},
{
"name": "setasign/fpdi",
"version": "v2.2.0",
"version_normalized": "2.2.0.0",
"version": "v2.3.4",
"version_normalized": "2.3.4.0",
"source": {
"type": "git",
"url": "https://github.com/Setasign/FPDI.git",
"reference": "3c266002f8044f61b17329f7cd702d44d73f0f7f"
"reference": "2b5fb811c04f937ef257ef3f798cebeded33c136"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Setasign/FPDI/zipball/3c266002f8044f61b17329f7cd702d44d73f0f7f",
"reference": "3c266002f8044f61b17329f7cd702d44d73f0f7f",
"url": "https://api.github.com/repos/Setasign/FPDI/zipball/2b5fb811c04f937ef257ef3f798cebeded33c136",
"reference": "2b5fb811c04f937ef257ef3f798cebeded33c136",
"shasum": ""
},
"require": {
"ext-zlib": "*",
"php": "^5.6 || ^7.0"
},
"conflict": {
"setasign/tfpdf": "<1.31"
},
"require-dev": {
"phpunit/phpunit": "~5.7",
"setasign/fpdf": "~1.8",
"setasign/tfpdf": "1.25",
"setasign/tfpdf": "1.31",
"squizlabs/php_codesniffer": "^3.5",
"tecnickcom/tcpdf": "~6.2"
},
"suggest": {
"setasign/fpdf": "FPDI will extend this class but as it is also possible to use TCPDF or tFPDF as an alternative. There's no fixed dependency configured.",
"setasign/fpdi-fpdf": "Use this package to automatically evaluate dependencies to FPDF.",
"setasign/fpdi-tcpdf": "Use this package to automatically evaluate dependencies to TCPDF.",
"setasign/fpdi-tfpdf": "Use this package to automatically evaluate dependencies to tFPDF."
"setasign/fpdf": "FPDI will extend this class but as it is also possible to use TCPDF or tFPDF as an alternative. There's no fixed dependency configured."
},
"time": "2019-01-30T14:11:19+00:00",
"time": "2020-08-27T06:55:47+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -277,6 +290,12 @@
"fpdf",
"fpdi",
"pdf"
],
"funding": [
{
"url": "https://tidelift.com/funding/github/packagist/setasign/fpdi",
"type": "tidelift"
}
]
}
]

View File

@ -0,0 +1,36 @@
Contributing
============
Issue tracker
-------------
The Issue tracker serves mainly as a place to report bugs and request new features.
Please do not abuse it as a general questions or troubleshooting location.
For these questions you can always use the
[mpdf tag](https://stackoverflow.com/questions/tagged/mpdf) at [Stack Overflow](https://stackoverflow.com/).
* Please provide a small example in php/html that reproduces your situation
* Please report one feature or one bug per issue
* Failing to provide necessary information or not using the issue template may cause the issue to be closed without consideration.
Pull requests
-------------
Pull requests should be always based on the default [development](https://github.com/mpdf/mpdf/tree/development)
branch except for backports to older versions.
Some guidelines:
* Use an aptly named feature branch for the Pull request.
* Only files and lines affecting the scope of the Pull request must be affected.
* Make small, *atomic* commits that keep the smallest possible related code changes together.
* Code should be accompanied by a unit test testing expected behaviour.
* To be incorporated, the PR must contain a change in the CHANGELOG.md file describing itself
When updating a PR, do not create a new one, just `git push --force` to your former feature branch, the PR will
update itself.

View File

@ -0,0 +1 @@
custom: https://www.paypal.me/mpdf

View File

@ -0,0 +1,22 @@
> Please use https://stackoverflow.com/questions/tagged/mpdf for all your general questions or troubleshooting!
> For contributing here, please see the guideline: https://github.com/mpdf/mpdf/blob/development/.github/CONTRIBUTING.md
>
> *Warning*: Failing to provide necessary information may cause the issue to be closed without consideration
### I found this bug / would like to have this new functionality
### This is mPDF and PHP version and environment (server/fpm/cli etc) I am using
### This is a PHP code snippet I use
```
<?php
```
### This is a HTML/CSS code snippet I use
```
```

View File

@ -5,12 +5,12 @@ dist: xenial
group: edge
php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4snapshot
- 7.1
- 5.6
- 7.4
- 7.2
- 7.0
- nightly
matrix:
@ -31,8 +31,6 @@ install:
- |
if [[ "${TRAVIS_PHP_VERSION:0:7}" == "nightly" ]]; then
composer install --ignore-platform-reqs
elif [[ "${TRAVIS_PHP_VERSION:0:11}" == "7.4snapshot" ]]; then
composer install --ignore-platform-reqs
else
composer install
fi

View File

@ -1,21 +1,28 @@
mPDF 8.1.x
mPDF 8.0.x
===========================
* Ability to customize User-Agent header in the HTTP requests sent by cURL (@samuelecat, #1229)
* Add Page Number Myanmar Language Support (@MinKyawNyunt, #1201)
* new `Mpdf\Exception\FontException` extending base `MpdfException` was introduced and is thrown on Font manipulation
* A bit cleaner exception messages for font-related errors
* Use atomic cache writing. (@PATROMO, #1186)
* Fix: "Undefined index: group" when calling MultiCell when using font without OTL data (@Kekos, #1213, #941)
* Add C128RAW barcode type to create any barcode (ex: subtype change in middle of barcode) (#1124)
* Add proxy support to curl
* Fixed date and time format in the informations dictionary (#1083, @peterdevpl)
* Checking allowed stream wrappers in CssManager
* PHP 7.4 support (until final 7.4 release with composer --ignore-platform-reqs)
* Improve debugging of remote content issues (@ribeirobreno)
mPDF 8.0.x
===========================
* Added `exposeVersion` configuration variable allowing to hide mPDF version from Producer tag and HTTP headers
* Added the check for JPEG SOF header 0xFF 0xC1 (extended) (@jamiejones85)
* Allows setting `none` as zoom mode in `SetDisplayMode` method, so that OpenAction is not written (#602)
* Allowed image stream whitelist to be customised (#1005, thanks @jakejackson)
* Fixed parsing of top-left-bottom-right CSS rules with !important (#1009)
* Fixed skipping ordered list numbering with page-break-inside: avoid (#339)
* Compound classes selector support, like `.one.two` or `div.message.special` (#538, @peterdevpl)
* Fixed CMYK colors in text-shadow (#1115, @lexilya)
* Skip non supported wrappers when resolving paths (#1204, @MarkVaughn)
* Fixed SVGs using a style tag, has styles ignored ( Requires ext-dom ) (#450, @antman3351)
mPDF 8.0.0
===========================

View File

@ -21,7 +21,7 @@ PHP versions and extensions
- `mPDF >=7.0` is supported on PHP `^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0`
- `PHP 7.3` is supported since `mPDF v7.1.7`
- `PHP 7.4` is supported in `development` branch, official release will be out with stable PHP
- `PHP 7.4` is supported since `mPDF v8.0.4`
PHP `mbstring` and `gd` extensions have to be loaded.

View File

@ -31,7 +31,7 @@
"require": {
"php": "^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0",
"php": "^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0",
"ext-gd": "*",
"ext-mbstring": "*",

View File

@ -96,6 +96,9 @@ class Barcode
case 'C128C': // CODE 128 C
return new Barcode\Code128($code, 'C');
case 'C128RAW': // CODE 128 RAW -- code is a space separated list of codes with startcode but without checkdigit,stop,end ex: "105 12 34"
return new Barcode\Code128($code, 'RAW');
case 'EAN128A': // EAN 128 A
return new Barcode\Code128($code, 'A', true);

View File

@ -148,6 +148,36 @@ class Code128 extends \Mpdf\Barcode\AbstractBarcode implements \Mpdf\Barcode\Bar
];
switch (strtoupper($type)) {
case 'RAW':
$newCode='';
$startid = false;
foreach (explode(" ", $code) as $v) {
if (is_numeric($v) && round($v, 0) == $v) {
if ($v>=0 && $v<=105) {
if ($startid===false) {
$startid=$v;
} else {
$newCode.=chr($v);
}
} else {
throw new \Mpdf\Barcode\BarcodeException('Invalid CODE128RAW barcode value. 0-105 needed');
}
} else {
//double spaces generates empty $v any other is not allowed
if ($v!='') {
throw new \Mpdf\Barcode\BarcodeException('Invalid CODE128RAW barcode value. 0-105 needed');
}
}
}
if ($startid<103 || $startid>105) {
throw new \Mpdf\Barcode\BarcodeException('Invalid CODE128RAW startid value. Must 103,104 or 105 (for A,B or C)');
}
$keys='';
for ($i = 0; $i <= 105; ++$i) {
$keys .= chr($i);
}
$code=$newCode;
break;
case 'A':
$startid = 103;
$keys = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_';
@ -172,6 +202,9 @@ class Code128 extends \Mpdf\Barcode\AbstractBarcode implements \Mpdf\Barcode\Bar
$newCode = '';
$hclen = (strlen($code) / 2);
for ($i = 0; $i < $hclen; ++$i) {
if ($code[2 * $i]<"0" || $code[2 * $i]>"9" || $code[2 * $i + 1]<"0" || $code[2 * $i + 1]>"9") {
throw new \Mpdf\Barcode\BarcodeException(sprintf('Invalid character "%s" in CODE128C barcode value', $code[$i]));
}
$newCode .= chr((int) ($code[2 * $i] . $code[2 * $i + 1]));
}
$code = $newCode;
@ -192,6 +225,9 @@ class Code128 extends \Mpdf\Barcode\AbstractBarcode implements \Mpdf\Barcode\Bar
if ($ean && $i == 0) {
$sum += 102;
} else {
if (strpos($keys, $code[$i]) === false) {
throw new \Mpdf\Barcode\BarcodeException(sprintf('Invalid character "%s" in CODE128'.$type.' barcode value', $code[$i]));
}
$sum += (strpos($keys, $code[$i]) * ($i + 1));
}
}

View File

@ -70,9 +70,11 @@ class Cache
public function write($filename, $data)
{
$path = $this->getFilePath($filename);
$tempFile = tempnam($this->basePath, 'cache_tmp_');
file_put_contents($tempFile, $data);
file_put_contents($path, $data);
$path = $this->getFilePath($filename);
rename($tempFile, $path);
return $path;
}

View File

@ -514,6 +514,9 @@ class ConfigVariables
'curlTimeout' => 5,
'curlProxy' => null,
'curlProxyAuth' => null,
'curlUserAgent' => 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1',
'exposeVersion' => true,
];
}

View File

@ -60,6 +60,7 @@ class DecToOther
'khmer' => 0x17E0,
'cambodian' => 0x17E0,
'lao' => 0x0ED0,
'myanmar' => 0x1040
];
return isset($codePages[$script]) ? $codePages[$script] : 0;

View File

@ -1117,37 +1117,57 @@ class CssManager
{
$sh = [];
$c = preg_match_all('/(rgba|rgb|device-cmyka|cmyka|device-cmyk|cmyk|hsla|hsl)\(.*?\)/', $v, $x); // mPDF 5.6.05
for ($i = 0; $i < $c; $i++) {
$col = preg_replace('/,/', '*', $x[0][$i]);
$col = preg_replace('/,\s/', '*', $x[0][$i]);
$v = str_replace($x[0][$i], $col, $v);
}
$ss = explode(',', $v);
foreach ($ss as $s) {
$new = ['blur' => 0];
$p = explode(' ', trim($s));
if (isset($p[0])) {
$new['x'] = $this->sizeConverter->convert(trim($p[0]), $this->mpdf->FontSize, $this->mpdf->FontSize, false);
}
if (isset($p[1])) {
$new['y'] = $this->sizeConverter->convert(trim($p[1]), $this->mpdf->FontSize, $this->mpdf->FontSize, false);
}
if (isset($p[2])) {
if (preg_match('/^\s*[\.\-0-9]/', $p[2])) {
$new['blur'] = $this->sizeConverter->convert(trim($p[2]), $this->mpdf->blk[$this->mpdf->blklvl]['inner_width'], $this->mpdf->FontSize, false);
$new['blur'] = $this->sizeConverter->convert(
trim($p[2]),
isset($this->mpdf->blk[$this->mpdf->blklvl]['inner_width']) ? $this->mpdf->blk[$this->mpdf->blklvl]['inner_width'] : 0,
$this->mpdf->FontSize,
false
);
} else {
$new['col'] = $this->colorConverter->convert(preg_replace('/\*/', ',', $p[2]), $this->mpdf->PDFAXwarnings);
}
if (isset($p[3])) {
$new['col'] = $this->colorConverter->convert(preg_replace('/\*/', ',', $p[3]), $this->mpdf->PDFAXwarnings);
}
}
if (!isset($new['col']) || !$new['col']) {
$new['col'] = $this->colorConverter->convert('#888888', $this->mpdf->PDFAXwarnings);
}
if (isset($new['y'])) {
array_unshift($sh, $new);
}
}
return $sh;
}

View File

@ -0,0 +1,8 @@
<?php
namespace Mpdf\Exception;
class FontException extends \Mpdf\MpdfException
{
}

View File

@ -53,9 +53,7 @@ class FontCache
public function binaryWrite($filename, $data)
{
$handle = fopen($this->tempFilename($filename), 'wb');
fwrite($handle, $data);
fclose($handle);
return $this->cache->write($filename, $data);
}
public function jsonWrite($filename, $data)

View File

@ -2824,6 +2824,91 @@ class Svg
$this->svg_string .= $content;
}
/**
* SVGs made with Adobe Illustrator use a style tag and classes instead of inline styles
* See: https://github.com/mpdf/mpdf/issues/450
*
* This function brutally copies the styles inline
* ( Currently only looks for classes as a selector )
*
* @param string $data svg contents
* @return string svg contents
* @author Antonio Norman - softcodex.ch
*/
function mergeStyles($data)
{
$xml = new \DOMDocument();
if (!$xml->loadXML($data, LIBXML_NOERROR)) {
return $data;
}
// Check it's an SVG
$svgNode = $xml->getElementsByTagName('svg');
if ($svgNode->length === 0) {
return $data;
}
// Find the style node
$styles = [];
/** @var $styleNode \DOMNode */
foreach ($svgNode->item(0)->getElementsByTagName('style') as $styleNode) {
preg_match_all('/(\.[^{]+)\s*\{\s*([^}]+)\s*}/m', $styleNode->nodeValue, $matches, PREG_SET_ORDER);
foreach ($matches as $cssBlock) {
$css = preg_replace('/\s{2,}/', ' ', $cssBlock[2]); // Clean spaces or new lines
$selector = trim($cssBlock[1]);
$styles[$selector] = isset($styles[$cssBlock[1]]) ?
$styles[$selector] . ' ' . $css : // Append if the selector is already defined
$css;
}
}
if (empty($styles)) {
return $data;
}
// Recursively loop the nodes inserting the styles inline
$setStylesInline = function (\DOMNode $xml) use ($styles, &$setStylesInline) {
// Apply the styles to the elements
foreach ($xml->childNodes as $node) {
if ($node->hasChildNodes()) {
$setStylesInline($node);
}
if (!$node instanceof \DOMElement) {
continue;
}
// Check the node has the a class with a style
if (!$node->hasAttribute('class')) {
continue;
}
// Allow for class=" class1 class2 "
$classes = explode(' ', $node->getAttribute('class'));
foreach ($classes as $class) {
$class = '.' . trim($class);
if (!empty($class) && isset($styles[$class])) {
$style = $node->hasAttribute('style') ?
$styles[$class] . ' ' . $node->getAttribute('style') :
$styles[$class];
$node->setAttribute('style', $style);
}
}
}
};
$setStylesInline($xml);
return $xml->saveXML();
}
/**
* analise le svg et renvoie aux fonctions precedente our le traitement
*/
@ -2835,6 +2920,8 @@ class Svg
// Converts < to &lt; when not a tag
$data = preg_replace('/<([^!?\/a-zA-Z_:])/i', '&lt;\\1', $data); // mPDF 5.7.4
$data = $this->mergeStyles($data);
if ($this->mpdf->svgAutoFont) {
$data = $this->markScriptToLang($data);
}

View File

@ -39,7 +39,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
use Strict;
use FpdiTrait;
const VERSION = '8.0.3';
const VERSION = '8.0.7';
const SCALE = 72 / 25.4;
@ -719,6 +719,15 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
*/
var $curlProxyAuth;
/**
* Set the User-Agent header in the HTTP requests sent by cURL.
*
* @see https://curl.haxx.se/libcurl/c/CURLOPT_USERAGENT.html
*
* @var string User Agent header
*/
var $curlUserAgent;
// Private properties FROM FPDF
var $DisplayPreferences;
var $flowingBlockAttr;
@ -815,6 +824,8 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
var $outerblocktags;
var $innerblocktags;
public $exposeVersion;
/**
* @var string
*/
@ -1070,8 +1081,8 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$this->tableBackgrounds = [];
$this->uniqstr = '20110230'; // mPDF 5.7.2
$this->kt_y00 = '';
$this->kt_p00 = '';
$this->kt_y00 = 0;
$this->kt_p00 = 0;
$this->BMPonly = [];
$this->page = 0;
$this->n = 2;
@ -5788,28 +5799,49 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
return $s;
}
function MultiCell($w, $h, $txt, $border = 0, $align = '', $fill = 0, $link = '', $directionality = 'ltr', $encoded = false, $OTLdata = false, $maxrows = false)
{
function MultiCell(
$w,
$h,
$txt,
$border = 0,
$align = '',
$fill = 0,
$link = '',
$directionality = 'ltr',
$encoded = false,
$OTLdata = false,
$maxrows = false
) {
// maxrows is called from mpdfform->TEXTAREA
// Parameter (pre-)encoded - When called internally from form::textarea - mb_encoding already done and OTL - but not reverse RTL
// Parameter (pre-)encoded - When called internally from form::textarea -
// mb_encoding already done and OTL - but not reverse RTL
if (!$encoded) {
$txt = $this->purify_utf8_text($txt);
if ($this->text_input_as_HTML) {
$txt = $this->all_entities_to_utf8($txt);
}
if ($this->usingCoreFont) {
$txt = mb_convert_encoding($txt, $this->mb_enc, 'UTF-8');
}
if (preg_match("/([" . $this->pregRTLchars . "])/u", $txt)) {
$this->biDirectional = true;
} // *OTL*
}
/* -- OTL -- */
$OTLdata = [];
if (!is_array($OTLdata)) {
unset($OTLdata);
}
// Use OTL OpenType Table Layout - GSUB & GPOS
if (isset($this->CurrentFont['useOTL']) && $this->CurrentFont['useOTL']) {
$txt = $this->otl->applyOTL($txt, $this->CurrentFont['useOTL']);
$OTLdata = $this->otl->OTLdata;
}
if ($directionality == 'rtl' || $this->biDirectional) {
if (!isset($OTLdata)) {
$unicode = $this->UTF8StringToArray($txt, false);
@ -5819,17 +5851,20 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
}
/* -- END OTL -- */
}
if (!$align) {
$align = $this->defaultAlign;
}
// Output text with automatic or explicit line breaks
$cw = &$this->CurrentFont['cw'];
if ($w == 0) {
$w = $this->w - $this->rMargin - $this->x;
}
$wmax = ($w - ($this->cMarginL + $this->cMarginR));
if ($this->usingCoreFont) {
$s = str_replace("\r", '', $txt);
$nb = strlen($s);
@ -5843,8 +5878,11 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$nb--;
}
}
$b = 0;
if ($border) {
if ($border == 1) {
$border = 'LTRB';
$b = 'LRT';
@ -5860,6 +5898,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$b = is_int(strpos($border, 'T')) ? $b2 . 'T' : $b2;
}
}
$sep = -1;
$i = 0;
$j = 0;
@ -5871,19 +5910,25 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$start_y = $this->y;
if (!$this->usingCoreFont) {
$inclCursive = false;
if (preg_match("/([" . $this->pregCURSchars . "])/u", $s)) {
$inclCursive = true;
}
while ($i < $nb) {
// Get next character
$c = mb_substr($s, $i, 1, $this->mb_enc);
if ($c == "\n") {
// Explicit line break
if ($c === "\n") { // Explicit line break
// WORD SPACING
$this->ResetSpacing();
$tmp = rtrim(mb_substr($s, $j, $i - $j, $this->mb_enc));
$tmpOTLdata = false;
/* -- OTL -- */
if (isset($OTLdata)) {
$tmpOTLdata = $this->otl->sliceOTLdata($OTLdata, $j, $i - $j);
@ -5891,21 +5936,27 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$this->magic_reverse_dir($tmp, $directionality, $tmpOTLdata);
}
/* -- END OTL -- */
$this->Cell($w, $h, $tmp, $b, 2, $align, $fill, $link, 0, 0, 0, 'M', 0, false, $tmpOTLdata);
if ($maxrows != false && isset($this->form) && ($this->y - $start_y) / $h > $maxrows) {
return false;
}
$i++;
$sep = -1;
$j = $i;
$l = 0;
$ns = 0;
$nl++;
if ($border and $nl == 2) {
$b = $b2;
}
continue;
}
if ($c == " ") {
$sep = $i;
$ls = $l;
@ -5915,15 +5966,19 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$l += $this->GetCharWidthNonCore($c);
if ($l > $wmax) {
// Automatic line break
if ($sep == -1) { // Only one word
if ($i == $j) {
$i++;
}
// WORD SPACING
$this->ResetSpacing();
$tmp = rtrim(mb_substr($s, $j, $i - $j, $this->mb_enc));
$tmpOTLdata = false;
/* -- OTL -- */
if (isset($OTLdata)) {
$tmpOTLdata = $this->otl->sliceOTLdata($OTLdata, $j, $i - $j);
@ -5931,27 +5986,35 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$this->magic_reverse_dir($tmp, $directionality, $tmpOTLdata);
}
/* -- END OTL -- */
$this->Cell($w, $h, $tmp, $b, 2, $align, $fill, $link, 0, 0, 0, 'M', 0, false, $tmpOTLdata);
} else {
$tmp = rtrim(mb_substr($s, $j, $sep - $j, $this->mb_enc));
$tmpOTLdata = false;
/* -- OTL -- */
if (isset($OTLdata)) {
$tmpOTLdata = $this->otl->sliceOTLdata($OTLdata, $j, $sep - $j);
$this->otl->trimOTLdata($tmpOTLdata, false, true);
}
/* -- END OTL -- */
if ($align == 'J') {
//////////////////////////////////////////
if ($align === 'J') {
// JUSTIFY J using Unicode fonts (Word spacing doesn't work)
// WORD SPACING UNICODE
// Change NON_BREAKING SPACE to spaces so they are 'spaced' properly
$tmp = str_replace(chr(194) . chr(160), chr(32), $tmp);
$len_ligne = $this->GetStringWidth($tmp, false, $tmpOTLdata);
$nb_carac = mb_strlen($tmp, $this->mb_enc);
$nb_spaces = mb_substr_count($tmp, ' ', $this->mb_enc);
// Take off number of Marks
// Use GPOS OTL
if (isset($this->CurrentFont['useOTL']) && ($this->CurrentFont['useOTL'])) {
if (isset($tmpOTLdata['group']) && $tmpOTLdata['group']) {
$nb_carac -= substr_count($tmpOTLdata['group'], 'M');
@ -5960,118 +6023,153 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
list($charspacing, $ws, $kashida) = $this->GetJspacing($nb_carac, $nb_spaces, ((($wmax) - $len_ligne) * Mpdf::SCALE), $inclCursive, $tmpOTLdata);
$this->SetSpacing($charspacing, $ws);
//////////////////////////////////////////
}
if (isset($OTLdata)) {
$this->magic_reverse_dir($tmp, $directionality, $tmpOTLdata);
}
$this->Cell($w, $h, $tmp, $b, 2, $align, $fill, $link, 0, 0, 0, 'M', 0, false, $tmpOTLdata);
$i = $sep + 1;
}
if ($maxrows != false && isset($this->form) && ($this->y - $start_y) / $h > $maxrows) {
return false;
}
$sep = -1;
$j = $i;
$l = 0;
$ns = 0;
$nl++;
if ($border and $nl == 2) {
$b = $b2;
}
} else {
$i++;
}
}
// Last chunk
// WORD SPACING
$this->ResetSpacing();
} else {
while ($i < $nb) {
// Get next character
$c = $s[$i];
if ($c == "\n") {
if ($c === "\n") {
// Explicit line break
// WORD SPACING
$this->ResetSpacing();
$this->Cell($w, $h, substr($s, $j, $i - $j), $b, 2, $align, $fill, $link);
if ($maxrows != false && isset($this->form) && ($this->y - $start_y) / $h > $maxrows) {
return false;
}
$i++;
$sep = -1;
$j = $i;
$l = 0;
$ns = 0;
$nl++;
if ($border and $nl == 2) {
$b = $b2;
}
continue;
}
if ($c == " ") {
if ($c === ' ') {
$sep = $i;
$ls = $l;
$ns++;
}
$l += $this->GetCharWidthCore($c);
if ($l > $wmax) {
// Automatic line break
if ($sep == -1) {
if ($i == $j) {
$i++;
}
// WORD SPACING
$this->ResetSpacing();
$this->Cell($w, $h, substr($s, $j, $i - $j), $b, 2, $align, $fill, $link);
} else {
if ($align == 'J') {
if ($align === 'J') {
$tmp = rtrim(substr($s, $j, $sep - $j));
//////////////////////////////////////////
// JUSTIFY J using Unicode fonts (Word spacing doesn't work)
// WORD SPACING NON_UNICODE/CJK
// Change NON_BREAKING SPACE to spaces so they are 'spaced' properly
$tmp = str_replace(chr(160), chr(32), $tmp);
$len_ligne = $this->GetStringWidth($tmp);
$nb_carac = strlen($tmp);
$nb_spaces = substr_count($tmp, ' ');
$tmpOTLdata = [];
list($charspacing, $ws, $kashida) = $this->GetJspacing($nb_carac, $nb_spaces, ((($wmax) - $len_ligne) * Mpdf::SCALE), false, $tmpOTLdata);
$this->SetSpacing($charspacing, $ws);
//////////////////////////////////////////
}
$this->Cell($w, $h, substr($s, $j, $sep - $j), $b, 2, $align, $fill, $link);
$i = $sep + 1;
}
if ($maxrows != false && isset($this->form) && ($this->y - $start_y) / $h > $maxrows) {
return false;
}
$sep = -1;
$j = $i;
$l = 0;
$ns = 0;
$nl++;
if ($border and $nl == 2) {
$b = $b2;
}
} else {
$i++;
}
}
// Last chunk
// WORD SPACING
$this->ResetSpacing();
}
// Last chunk
if ($border and is_int(strpos($border, 'B'))) {
$b .= 'B';
}
if (!$this->usingCoreFont) {
$tmp = rtrim(mb_substr($s, $j, $i - $j, $this->mb_enc));
$tmpOTLdata = false;
/* -- OTL -- */
if (isset($OTLdata)) {
$tmpOTLdata = $this->otl->sliceOTLdata($OTLdata, $j, $i - $j);
@ -6079,10 +6177,12 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$this->magic_reverse_dir($tmp, $directionality, $tmpOTLdata);
}
/* -- END OTL -- */
$this->Cell($w, $h, $tmp, $b, 2, $align, $fill, $link, 0, 0, 0, 'M', 0, false, $tmpOTLdata);
} else {
$this->Cell($w, $h, substr($s, $j, $i - $j), $b, 2, $align, $fill, $link);
}
$this->x = $this->lMargin;
}
@ -7303,8 +7403,8 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
} elseif ($objattr['btype'] === 'QR') {
if (!class_exists('Mpdf\QrCode\QrCode')) {
throw new \Mpdf\MpdfException('Class Mpdf\QrCode\QrCode does not exists. Install the package from Packagist with "composer require mpdf/qrcode"');
if (!class_exists('Mpdf\QrCode\QrCode') || !class_exists('Mpdf\QrCode\Output\Mpdf')) {
throw new \Mpdf\MpdfException('Mpdf\QrCode package was not found. Install the package from Packagist with "composer require mpdf/qrcode"');
}
$barcodeContent = str_replace('\r\n', "\r\n", $objattr['code']);
@ -9428,7 +9528,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
header('Content-disposition: inline; filename="' . $name . '"');
header('Cache-Control: public, must-revalidate, max-age=0');
header('Pragma: public');
header('X-Generator: mPDF ' . static::VERSION);
header('X-Generator: mPDF' . ($this->exposeVersion ? (' ' . static::VERSION) : ''));
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
}
@ -9447,7 +9547,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
header('Content-Transfer-Encoding: binary');
header('Cache-Control: public, must-revalidate, max-age=0');
header('Pragma: public');
header('X-Generator: mPDF ' . static::VERSION);
header('X-Generator: mPDF' . ($this->exposeVersion ? (' ' . static::VERSION) : ''));
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Content-Type: application/pdf');
@ -11325,7 +11425,10 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
return;
}
if (preg_match('@^(mailto|tel|fax):.*@i', $path)) {
// Skip schemes not supported by installed stream wrappers
$wrappers = stream_get_wrappers();
$pattern = sprintf('@^(?!%s)[a-z0-9\.\-+]+:.*@i', implode('|', $wrappers));
if (preg_match($pattern, $path)) {
return;
}
@ -11512,7 +11615,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$ppgno = $decToHebrew->convert($ppgno, $reverse);
} elseif (preg_match('/(arabic-indic|bengali|devanagari|gujarati|gurmukhi|kannada|malayalam|oriya|persian|tamil|telugu|thai|urdu|cambodian|khmer|lao)/i', $lowertype, $m)) {
} elseif (preg_match('/(arabic-indic|bengali|devanagari|gujarati|gurmukhi|kannada|malayalam|oriya|persian|tamil|telugu|thai|urdu|cambodian|khmer|lao|myanmar)/i', $lowertype, $m)) {
$cp = $decToOther->getCodePage($m[1]);
$ppgno = $decToOther->convert($ppgno, $cp, $checkfont);
@ -12374,7 +12477,9 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$lContent = (isset($arr['L']['content']) ? $arr['L']['content'] : '');
$cContent = (isset($arr['C']['content']) ? $arr['C']['content'] : '');
$rContent = (isset($arr['R']['content']) ? $arr['R']['content'] : '');
list($lw, $cw, $rw) = $this->_shareHeaderFooterWidth($lContent, $cContent, $rContent);
if ($hf == 'H') {
$valign = 'bottom';
$vpadding = '0 0 ' . $this->header_line_spacing . 'em 0';
@ -12382,6 +12487,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$valign = 'top';
$vpadding = '' . $this->footer_line_spacing . 'em 0 0 0';
}
if ($this->directionality == 'rtl') { // table columns get reversed so need different text-alignment
$talignL = 'right';
$talignR = 'left';
@ -12389,22 +12495,29 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$talignL = 'left';
$talignR = 'right';
}
$html = '<table width="100%" style="border-collapse: collapse; margin: 0; vertical-align: ' . $valign . '; color: #000000; ';
if (isset($arr['line']) && $arr['line']) {
$html .= ' border-' . $valign . ': 0.1mm solid #000000;';
}
$html .= '">';
$html .= '<tr>';
$html .= '<td width="' . $lw . '%" style="padding: ' . $vpadding . '; text-align: ' . $talignL . '; ';
if (isset($arr['L']['font-family'])) {
$html .= ' font-family: ' . $arr['L']['font-family'] . ';';
}
if (isset($arr['L']['color'])) {
$html .= ' color: ' . $arr['L']['color'] . ';';
}
if (isset($arr['L']['font-size'])) {
$html .= ' font-size: ' . $arr['L']['font-size'] . 'pt;';
}
if (isset($arr['L']['font-style'])) {
if ($arr['L']['font-style'] == 'B' || $arr['L']['font-style'] == 'BI') {
$html .= ' font-weight: bold;';
@ -12413,17 +12526,22 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$html .= ' font-style: italic;';
}
}
$html .= '">' . $lContent . '</td>';
$html .= '<td width="' . $cw . '%" style="padding: ' . $vpadding . '; text-align: center; ';
if (isset($arr['C']['font-family'])) {
$html .= ' font-family: ' . $arr['C']['font-family'] . ';';
}
if (isset($arr['C']['color'])) {
$html .= ' color: ' . $arr['C']['color'] . ';';
}
if (isset($arr['C']['font-size'])) {
$html .= ' font-size: ' . $arr['L']['font-size'] . 'pt;';
$html .= ' font-size: ' . $arr['C']['font-size'] . 'pt;';
}
if (isset($arr['C']['font-style'])) {
if ($arr['C']['font-style'] == 'B' || $arr['C']['font-style'] == 'BI') {
$html .= ' font-weight: bold;';
@ -12432,17 +12550,22 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$html .= ' font-style: italic;';
}
}
$html .= '">' . $cContent . '</td>';
$html .= '<td width="' . $rw . '%" style="padding: ' . $vpadding . '; text-align: ' . $talignR . '; ';
if (isset($arr['R']['font-family'])) {
$html .= ' font-family: ' . $arr['R']['font-family'] . ';';
}
if (isset($arr['R']['color'])) {
$html .= ' color: ' . $arr['R']['color'] . ';';
}
if (isset($arr['R']['font-size'])) {
$html .= ' font-size: ' . $arr['R']['font-size'] . 'pt;';
}
if (isset($arr['R']['font-style'])) {
if ($arr['R']['font-style'] == 'B' || $arr['R']['font-style'] == 'BI') {
$html .= ' font-weight: bold;';
@ -12451,8 +12574,10 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$html .= ' font-style: italic;';
}
}
$html .= '">' . $rContent . '</td>';
$html .= '</tr></table>';
return $html;
}
@ -12885,7 +13010,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$this->SetFont('arial', '', 7.5, true, true);
$this->x = $this->page_box['outer_width_LR'] + 1.5;
$this->y = 1;
$this->Cell($headerpgwidth, $this->FontSize, $hd, 0, 0, 'L', 0, '', 0, 0, 0, 'M');
$this->Cell(0, $this->FontSize, $hd, 0, 0, 'L', 0, '', 0, 0, 0, 'M');
$this->SetFont($this->default_font, '', $this->original_default_font_size);
}
}
@ -14663,7 +14788,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$prop[1] = $tmp;
}
} else {
return [];
return ['w' => 0, 's' => 0];
}
// Size
$bsize = $this->sizeConverter->convert($prop[0], $refw, $this->FontSize, false);
@ -17942,7 +18067,8 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
// Set font size first so that e.g. MARGIN 0.83em works on font size for this element
if (isset($arrayaux['FONT-SIZE'])) {
$v = $arrayaux['FONT-SIZE'];
if (is_numeric($v[0]) || ($v[0] === '.')) {
$firstLetter = substr($v, 0, 1);
if (is_numeric($firstLetter) || ($firstLetter === '.')) {
if ($type == 'BLOCK' && $this->blklvl > 0 && isset($this->blk[$this->blklvl - 1]['InlineProperties']) && isset($this->blk[$this->blklvl - 1]['InlineProperties']['size'])) {
$mmsize = $this->sizeConverter->convert($v, $this->blk[$this->blklvl - 1]['InlineProperties']['size']);
} elseif ($type == 'TABLECELL') {
@ -26316,7 +26442,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$rlm = $arrcode['quietR'] / $k; // Right Quiet margin
$tlm = $blm = $arrcode['quietTB'] / $k;
$height = 1; // Overrides
} elseif (in_array($btype, ['C128A', 'C128B', 'C128C', 'EAN128A', 'EAN128B', 'EAN128C', 'C39', 'C39+', 'C39E', 'C39E+', 'S25', 'S25+', 'I25', 'I25+', 'I25B', 'I25B+', 'C93', 'MSI', 'MSI+', 'CODABAR', 'CODE11'])) {
} elseif (in_array($btype, ['C128A', 'C128B', 'C128C', 'C128RAW', 'EAN128A', 'EAN128B', 'EAN128C', 'C39', 'C39+', 'C39E', 'C39E+', 'S25', 'S25+', 'I25', 'I25+', 'I25B', 'I25B+', 'C93', 'MSI', 'MSI+', 'CODABAR', 'CODE11'])) {
$llm = $arrcode['lightmL'] * $xres; // Left Quiet margin
$rlm = $arrcode['lightmR'] * $xres; // Right Quiet margin
$tlm = $blm = $arrcode['lightTB'] * $xres * $height;

View File

@ -178,7 +178,7 @@ class OtlDump
$this->fh = fopen($file, 'rb');
if (!$this->fh) {
throw new \Mpdf\MpdfException(sprintf('Unable to open file "%s"', $file));
throw new \Mpdf\Exception\FontException(sprintf('Unable to open file "%s"', $file));
}
$this->_pos = 0;
@ -196,21 +196,21 @@ class OtlDump
$this->panose = [];
if ($version == 0x4F54544F) {
throw new \Mpdf\MpdfException("Postscript outlines are not supported");
throw new \Mpdf\Exception\FontException("Postscript outlines are not supported");
}
if ($version == 0x74746366 && !$TTCfontID) {
throw new \Mpdf\MpdfException("TTCfontID for a TrueType Collection has to be defined in ttfontdata configuration key (" . $file . ")");
throw new \Mpdf\Exception\FontException("TTCfontID for a TrueType Collection has to be defined in ttfontdata configuration key (" . $file . ")");
}
if (!in_array($version, [0x00010000, 0x74727565]) && !$TTCfontID) {
throw new \Mpdf\MpdfException("Not a TrueType font: version=" . $version);
throw new \Mpdf\Exception\FontException("Not a TrueType font: version=" . $version);
}
if ($TTCfontID > 0) {
$this->version = $version = $this->read_ulong(); // TTC Header version now
if (!in_array($version, [0x00010000, 0x00020000])) {
throw new \Mpdf\MpdfException("Error parsing TrueType Collection: version=" . $version . " - " . $file);
throw new \Mpdf\Exception\FontException("Error parsing TrueType Collection: version=" . $version . " - " . $file);
}
$this->numTTCFonts = $this->read_ulong();
for ($i = 1; $i <= $this->numTTCFonts; $i++) {
@ -259,7 +259,7 @@ class OtlDump
}
$xchecksum = $t['checksum'];
if ($xchecksum != $checksum) {
throw new \Mpdf\MpdfException(sprintf('TTF file "%s": invalid checksum %s table: %s (expected %s)', $this->filename, dechex($checksum[0]) . dechex($checksum[1]), $t['tag'], dechex($xchecksum[0]) . dechex($xchecksum[1])));
throw new \Mpdf\Exception\FontException(sprintf('TTF file "%s": invalid checksum %s table: %s (expected %s)', $this->filename, dechex($checksum[0]) . dechex($checksum[1]), $t['tag'], dechex($xchecksum[0]) . dechex($xchecksum[1])));
}
}
}
@ -473,7 +473,7 @@ class OtlDump
$name_offset = $this->seek_table("name");
$format = $this->read_ushort();
if ($format != 0 && $format != 1) {
throw new \Mpdf\MpdfException("Unknown name table format " . $format);
throw new \Mpdf\Exception\FontException("Error loading font: Unknown name table format " . $format);
}
$numRecords = $this->read_ushort();
$string_data_offset = $name_offset + $this->read_ushort();
@ -495,7 +495,7 @@ class OtlDump
$opos = $this->_pos;
$this->seek($string_data_offset + $offset);
if ($length % 2 != 0) {
throw new \Mpdf\MpdfException("PostScript name is UTF-16BE string of odd length");
throw new \Mpdf\Exception\FontException("Error loading font: PostScript name is UTF-16BE string of odd length");
}
$length /= 2;
$N = '';
@ -536,14 +536,14 @@ class OtlDump
}
}
if (!$psName) {
throw new \Mpdf\MpdfException("Could not find PostScript font name: " . $this->filename);
throw new \Mpdf\Exception\FontException("Error loading font: Could not find PostScript font name: " . $this->filename);
}
if ($debug) {
for ($i = 0; $i < count($psName); $i++) {
$c = $psName[$i];
$oc = ord($c);
if ($oc > 126 || strpos(' [](){}<>/%', $c) !== false) {
throw new \Mpdf\MpdfException("psName=" . $psName . " contains invalid character " . $c . " ie U+" . ord(c));
throw new \Mpdf\Exception\FontException("psName=" . $psName . " contains invalid character " . $c . " ie U+" . ord(c));
}
}
}
@ -581,14 +581,14 @@ class OtlDump
$ver_maj = $this->read_ushort();
$ver_min = $this->read_ushort();
if ($ver_maj != 1) {
throw new \Mpdf\MpdfException('Unknown head table version ' . $ver_maj . '.' . $ver_min);
throw new \Mpdf\Exception\FontException('Error loading font: Unknown head table version ' . $ver_maj . '.' . $ver_min);
}
$this->fontRevision = $this->read_ushort() . $this->read_ushort();
$this->skip(4);
$magic = $this->read_ulong();
if ($magic != 0x5F0F3CF5) {
throw new \Mpdf\MpdfException('Invalid head table magic ' . $magic);
throw new \Mpdf\Exception\FontException('Error loading font: Invalid head table magic ' . $magic);
}
$this->skip(2);
} else {
@ -606,7 +606,7 @@ class OtlDump
$indexToLocFormat = $this->read_ushort();
$glyphDataFormat = $this->read_ushort();
if ($glyphDataFormat != 0) {
throw new \Mpdf\MpdfException('Unknown glyph data format ' . $glyphDataFormat);
throw new \Mpdf\Exception\FontException('Error loading font: Unknown glyph data format ' . $glyphDataFormat);
}
///////////////////////////////////
@ -635,7 +635,7 @@ class OtlDump
if ($fsType == 0x0002 || ($fsType & 0x0300) != 0) {
global $overrideTTFFontRestriction;
if (!$overrideTTFFontRestriction) {
throw new \Mpdf\MpdfException('ERROR - Font file ' . $this->filename . ' cannot be embedded due to copyright restrictions.');
throw new \Mpdf\Exception\FontException('Font file ' . $this->filename . ' cannot be embedded due to copyright restrictions.');
}
$this->restrictedUse = true;
}
@ -685,7 +685,7 @@ class OtlDump
$ver_maj = $this->read_ushort();
$ver_min = $this->read_ushort();
if ($ver_maj < 1 || $ver_maj > 4) {
throw new \Mpdf\MpdfException('Unknown post table version ' . $ver_maj);
throw new \Mpdf\Exception\FontException('Error loading font: Unknown post table version ' . $ver_maj);
}
} else {
$this->skip(4);
@ -715,7 +715,7 @@ class OtlDump
$ver_maj = $this->read_ushort();
$ver_min = $this->read_ushort();
if ($ver_maj != 1) {
throw new \Mpdf\MpdfException('Unknown hhea table version ' . $ver_maj);
throw new \Mpdf\Exception\FontException(sprintf('Error loading font: Unknown hhea table version %s', $ver_maj));
}
$this->skip(28);
} else {
@ -723,11 +723,11 @@ class OtlDump
}
$metricDataFormat = $this->read_ushort();
if ($metricDataFormat != 0) {
throw new \Mpdf\MpdfException('Unknown horizontal metric data format ' . $metricDataFormat);
throw new \Mpdf\Exception\FontException('Error loading font: Unknown horizontal metric data format ' . $metricDataFormat);
}
$numberOfHMetrics = $this->read_ushort();
if ($numberOfHMetrics == 0) {
throw new \Mpdf\MpdfException('Number of horizontal metrics is 0');
throw new \Mpdf\Exception\FontException('Error loading font: Number of horizontal metrics is 0');
}
///////////////////////////////////
@ -738,7 +738,7 @@ class OtlDump
$ver_maj = $this->read_ushort();
$ver_min = $this->read_ushort();
if ($ver_maj != 1) {
throw new \Mpdf\MpdfException('Unknown maxp table version ' . $ver_maj);
throw new \Mpdf\Exception\FontException('Error loading font: Unknown maxp table version ' . $ver_maj);
}
} else {
$this->skip(4);
@ -781,7 +781,7 @@ class OtlDump
}
if (!$unicode_cmap_offset) {
throw new \Mpdf\MpdfException('Font (' . $this->filename . ') does not have cmap for Unicode (platform 3, encoding 1, format 4, or platform 0, any encoding, format 4)');
throw new \Mpdf\Exception\FontException('Font (' . $this->filename . ') does not have cmap for Unicode (platform 3, encoding 1, format 4, or platform 0, any encoding, format 4)');
}
$sipset = false;
@ -858,7 +858,7 @@ class OtlDump
$bctr++;
}
} else {
throw new \Mpdf\MpdfException($names[1] . " : WARNING - The font does not have enough space to map all (unmapped) included glyphs into Private Use Area U+E000 - U+F8FF");
throw new \Mpdf\Exception\FontException(sprintf('Font "%s" does not have cmap for Unicode (platform 3, encoding 1, format 4, or platform 0, any encoding, format 4)', $this->filename));
}
}
$glyphToChar[$gid][] = $bctr;
@ -1568,7 +1568,7 @@ $MarkAttachmentType = ' . var_export($this->MarkAttachmentType, true) . ';
}
}
} else {
throw new \Mpdf\MpdfException("GPOS Lookup Type " . $Lookup[$i]['Type'] . ", Format " . $SubstFormat . " not supported (ttfontsuni.php).");
throw new \Mpdf\Exception\FontException("GPOS Lookup Type " . $Lookup[$i]['Type'] . ", Format " . $SubstFormat . " not supported (ttfontsuni.php).");
}
}
} // LookupType 6: Chaining Contextual Substitution Subtable
@ -1625,7 +1625,7 @@ $MarkAttachmentType = ' . var_export($this->MarkAttachmentType, true) . ';
}
}
} else {
throw new \Mpdf\MpdfException("Lookup Type " . $Lookup[$i]['Type'] . " not supported.");
throw new \Mpdf\Exception\FontException("Lookup Type " . $Lookup[$i]['Type'] . " not supported.");
}
}
}
@ -1807,7 +1807,7 @@ $MarkAttachmentType = ' . var_export($this->MarkAttachmentType, true) . ';
$glyphs = $this->_getCoverage();
$Lookup[$i]['Subtable'][$c]['CoverageInputGlyphs'][] = implode("|", $glyphs);
}
throw new \Mpdf\MpdfException("Lookup Type 5, SubstFormat 3 not tested. Please report this with the name of font used - " . $this->fontkey);
throw new \Mpdf\Exception\FontException("Lookup Type 5, SubstFormat 3 not tested. Please report this with the name of font used - " . $this->fontkey);
}
}
}
@ -2728,7 +2728,7 @@ $MarkAttachmentType = ' . var_export($this->MarkAttachmentType, true) . ';
// Flag & 0x0010 = UseMarkFilteringSet
if ($flag & 0x0010) {
throw new \Mpdf\MpdfException("This font " . $this->fontkey . " contains MarkGlyphSets");
throw new \Mpdf\Exception\FontException("This font " . $this->fontkey . " contains MarkGlyphSets");
$str = "Mark Glyph Set: ";
$str .= $this->MarkGlyphSets[$MarkFilteringSet];
}
@ -3757,21 +3757,21 @@ $MarkAttachmentType = ' . var_export($this->MarkAttachmentType, true) . ';
// Format 1:
//===========
if ($PosFormat == 1) {
throw new \Mpdf\MpdfException("GPOS Lookup Type " . $Type . " Format " . $PosFormat . " not YET TESTED.");
throw new \Mpdf\Exception\FontException("GPOS Lookup Type " . $Type . " Format " . $PosFormat . " not YET TESTED.");
} //===========
// Format 2:
//===========
else {
if ($PosFormat == 2) {
throw new \Mpdf\MpdfException("GPOS Lookup Type " . $Type . " Format " . $PosFormat . " not YET TESTED.");
throw new \Mpdf\Exception\FontException("GPOS Lookup Type " . $Type . " Format " . $PosFormat . " not YET TESTED.");
} //===========
// Format 3:
//===========
else {
if ($PosFormat == 3) {
throw new \Mpdf\MpdfException("GPOS Lookup Type " . $Type . " Format " . $PosFormat . " not YET TESTED.");
throw new \Mpdf\Exception\FontException("GPOS Lookup Type " . $Type . " Format " . $PosFormat . " not YET TESTED.");
} else {
throw new \Mpdf\MpdfException("GPOS Lookup Type " . $Type . ", Format " . $PosFormat . " not supported.");
throw new \Mpdf\Exception\FontException("GPOS Lookup Type " . $Type . ", Format " . $PosFormat . " not supported.");
}
}
}
@ -3785,7 +3785,7 @@ $MarkAttachmentType = ' . var_export($this->MarkAttachmentType, true) . ';
// Format 1:
//===========
if ($PosFormat == 1) {
throw new \Mpdf\MpdfException("GPOS Lookup Type " . $Type . " Format " . $PosFormat . " not TESTED YET.");
throw new \Mpdf\Exception\FontException("GPOS Lookup Type " . $Type . " Format " . $PosFormat . " not TESTED YET.");
} //===========
// Format 2:
//===========
@ -3794,7 +3794,7 @@ $MarkAttachmentType = ' . var_export($this->MarkAttachmentType, true) . ';
$html .= '<div>GPOS Lookup Type 8: Format 2 not yet supported in OTL dump</div>';
continue;
/* NB When developing - cf. GSUB 6.2 */
throw new \Mpdf\MpdfException("GPOS Lookup Type " . $Type . " Format " . $PosFormat . " not TESTED YET.");
throw new \Mpdf\Exception\FontException("GPOS Lookup Type " . $Type . " Format " . $PosFormat . " not TESTED YET.");
} //===========
// Format 3:
//===========
@ -4179,7 +4179,7 @@ $MarkAttachmentType = ' . var_export($this->MarkAttachmentType, true) . ';
$this->glyphPos[] = ($arr[$n + 1]);
}
} else {
throw new \Mpdf\MpdfException('Unknown location table format ' . $indexToLocFormat);
throw new \Mpdf\Exception\FontException('Unknown location table format ' . $indexToLocFormat);
}
}
}

View File

@ -31,7 +31,7 @@ class RemoteContentFetcher implements \Psr\Log\LoggerAwareInterface
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1'); // mPDF 5.7.4
curl_setopt($ch, CURLOPT_USERAGENT, $this->mpdf->curlUserAgent);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_NOBODY, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

View File

@ -228,7 +228,7 @@ class TTFontFile
$this->fh = fopen($file, 'rb');
if (!$this->fh) {
throw new \Mpdf\MpdfException(sprintf('Unable to open font file "%s"', $file));
throw new \Mpdf\Exception\FontException(sprintf('Unable to open font file "%s"', $file));
}
$this->_pos = 0;
@ -265,21 +265,21 @@ class TTFontFile
$this->panose = [];
if ($version === 0x4F54544F) {
throw new \Mpdf\MpdfException('Postscript outlines are not supported');
throw new \Mpdf\Exception\FontException('Postscript outlines are not supported');
}
if ($version === 0x74746366 && !$TTCfontID) {
throw new \Mpdf\MpdfException(sprintf('TTCfontID for a TrueType Collection is not defined in mPDF "fontdata" configuration (%s)', $file));
throw new \Mpdf\Exception\FontException(sprintf('TTCfontID for a TrueType Collection is not defined in mPDF "fontdata" configuration (%s)', $file));
}
if (!in_array($version, [0x00010000, 0x74727565], true) && !$TTCfontID) {
throw new \Mpdf\MpdfException(sprintf('Not a TrueType font: version=%s)', $version));
throw new \Mpdf\Exception\FontException(sprintf('Not a TrueType font: version=%s)', $version));
}
if ($TTCfontID > 0) {
$this->version = $version = $this->read_ulong(); // TTC Header version now
if (!in_array($version, [0x00010000, 0x00020000], true)) {
throw new \Mpdf\MpdfException(sprintf('Error parsing TrueType Collection: version=%s - (%s)', $version, $file));
throw new \Mpdf\Exception\FontException(sprintf('Error parsing TrueType Collection: version=%s - (%s)', $version, $file));
}
$this->numTTCFonts = $this->read_ulong();
for ($i = 1; $i <= $this->numTTCFonts; $i++) {
@ -332,7 +332,7 @@ class TTFontFile
}
$xchecksum = $t['checksum'];
if ($xchecksum != $checksum) {
throw new \Mpdf\MpdfException(sprintf('TTF file "%s": invalid checksum %s table: %s (expected %s)', $this->filename, dechex($checksum[0]) . dechex($checksum[1]), $t['tag'], dechex($xchecksum[0]) . dechex($xchecksum[1])));
throw new \Mpdf\Exception\FontException(sprintf('TTF file "%s": invalid checksum %s table: %s (expected %s)', $this->filename, dechex($checksum[0]) . dechex($checksum[1]), $t['tag'], dechex($xchecksum[0]) . dechex($xchecksum[1])));
}
}
}
@ -548,7 +548,7 @@ class TTFontFile
$this->fh = fopen($file, 'rb');
if (!$this->fh) {
throw new \Mpdf\MpdfException(sprintf('Unable to open file "%s"', $file));
throw new \Mpdf\Exception\FontException(sprintf('Unable to open file "%s"', $file));
}
$this->_pos = 0;
@ -563,7 +563,7 @@ class TTFontFile
if ($TTCfontID > 0) {
$this->version = $version = $this->read_ulong(); // TTC Header version now
if (!in_array($version, [0x00010000, 0x00020000], true)) {
throw new \Mpdf\MpdfException(sprintf("Error parsing TrueType Collection: version=%s (%s)", $version, $file));
throw new \Mpdf\Exception\FontException(sprintf("Error parsing TrueType Collection: version=%s (%s)", $version, $file));
}
$this->numTTCFonts = $this->read_ulong();
for ($i = 1; $i <= $this->numTTCFonts; $i++) {
@ -616,7 +616,7 @@ class TTFontFile
$bctr++;
} // Avoid overwriting a glyph already mapped in PUA
if ($bctr > 0xF8FF) {
throw new \Mpdf\MpdfException(sprintf('Font "%s" cannot map all included glyphs into Private Use Area U+E000-U+F8FF; cannot use useOTL on this font', $file));
throw new \Mpdf\Exception\FontException(sprintf('Font "%s" cannot map all included glyphs into Private Use Area U+E000-U+F8FF; cannot use useOTL on this font', $file));
}
$glyphToChar[$gid][] = $bctr;
$charToGlyph[$bctr] = $gid;
@ -636,7 +636,7 @@ class TTFontFile
$this->fh = fopen($file, 'rb');
if (!$this->fh) {
throw new \Mpdf\MpdfException(sprintf('Unable to open file "%s"', $file));
throw new \Mpdf\Exception\FontException(sprintf('Unable to open file "%s"', $file));
}
$this->numTTCFonts = 0;
@ -645,10 +645,10 @@ class TTFontFile
if ($version === 0x74746366) {
$this->version = $version = $this->read_ulong(); // TTC Header version now
if (!in_array($version, [0x00010000, 0x00020000], true)) {
throw new \Mpdf\MpdfException(sprintf("Error parsing TrueType Collection: version=%s (%s)", $version, $file));
throw new \Mpdf\Exception\FontException(sprintf("Error parsing TrueType Collection: version=%s (%s)", $version, $file));
}
} else {
throw new \Mpdf\MpdfException(sprintf("Not a TrueType Collection: version=%s (%s)", $version, $file));
throw new \Mpdf\Exception\FontException(sprintf("Not a TrueType Collection: version=%s (%s)", $version, $file));
}
$this->numTTCFonts = $this->read_ulong();
@ -664,7 +664,7 @@ class TTFontFile
$name_offset = $this->seek_table("name");
$format = $this->read_ushort();
if ($format != 0 && $format != 1) {
throw new \Mpdf\MpdfException("Unknown name table format " . $format);
throw new \Mpdf\Exception\FontException("Error loading font: Unknown name table format $format for font $this->filename");
}
$numRecords = $this->read_ushort();
@ -691,7 +691,7 @@ class TTFontFile
$opos = $this->_pos;
$this->seek($string_data_offset + $offset);
if ($length % 2 != 0) {
throw new \Mpdf\MpdfException("PostScript name is UTF-16BE string of odd length");
throw new \Mpdf\Exception\FontException("Error loading font: PostScript name is UTF-16BE string of odd length for font $this->filename");
}
$length /= 2;
$N = '';
@ -728,7 +728,7 @@ class TTFontFile
}
if (!$psName) {
throw new \Mpdf\MpdfException("Could not find PostScript font name: " . $this->filename);
throw new \Mpdf\Exception\FontException("Error loading font: Could not find PostScript font name '$this->filename'");
}
// CHECK IF psName valid (PadaukBook contains illegal characters in Name ID 6 i.e. Postscript Name)
@ -738,7 +738,7 @@ class TTFontFile
$c = $psName[$i];
$oc = ord($c);
if ($oc > 126 || strpos(' [](){}<>/%', $c) !== false) {
//throw new \Mpdf\MpdfException("psName=".$psName." contains invalid character ".$c." ie U+".ord(c));
//throw new \Mpdf\Exception\FontException("psName=".$psName." contains invalid character ".$c." ie U+".ord(c));
$psNameInvalid = true;
break;
}
@ -780,14 +780,14 @@ class TTFontFile
$ver_maj = $this->read_ushort();
$ver_min = $this->read_ushort();
if ($ver_maj != 1) {
throw new \Mpdf\MpdfException('Unknown head table version ' . $ver_maj . '.' . $ver_min);
throw new \Mpdf\Exception\FontException('Error loading font: Unknown head table version ' . $ver_maj . '.' . $ver_min);
}
$this->fontRevision = $this->read_ushort() . $this->read_ushort();
$this->skip(4);
$magic = $this->read_ulong();
if ($magic !== 0x5F0F3CF5) {
throw new \Mpdf\MpdfException('Invalid head table magic ' . $magic);
throw new \Mpdf\Exception\FontException('Error loading font: Invalid head table magic ' . $magic);
}
$this->skip(2);
} else {
@ -806,7 +806,7 @@ class TTFontFile
$indexToLocFormat = $this->read_ushort();
$glyphDataFormat = $this->read_ushort();
if ($glyphDataFormat != 0) {
throw new \Mpdf\MpdfException(sprintf('Unknown glyph data format %s', $glyphDataFormat));
throw new \Mpdf\Exception\FontException(sprintf('Error loading font: Unknown glyph data format %s', $glyphDataFormat));
}
// hhea metrics table
@ -938,7 +938,7 @@ class TTFontFile
if ($debug) {
$ver_maj = $this->read_ushort();
if ($ver_maj < 1 || $ver_maj > 4) {
throw new \Mpdf\MpdfException(sprintf('Unknown post table version %s', $ver_maj));
throw new \Mpdf\Exception\FontException(sprintf('Error loading font: Unknown post table version %s', $ver_maj));
}
} else {
$this->skip(4);
@ -966,7 +966,7 @@ class TTFontFile
if ($debug) {
$ver_maj = $this->read_ushort();
if ($ver_maj != 1) {
throw new \Mpdf\MpdfException(sprintf('Unknown hhea table version %s', $ver_maj));
throw new \Mpdf\Exception\FontException(sprintf('Error loading font: Unknown hhea table version %s', $ver_maj));
}
$this->skip(28);
} else {
@ -976,13 +976,13 @@ class TTFontFile
$metricDataFormat = $this->read_ushort();
if ($metricDataFormat != 0) {
throw new \Mpdf\MpdfException(sprintf('Unknown horizontal metric data format "%s"', $metricDataFormat));
throw new \Mpdf\Exception\FontException(sprintf('Error loading font: Unknown horizontal metric data format "%s"', $metricDataFormat));
}
$numberOfHMetrics = $this->read_ushort();
if ($numberOfHMetrics == 0) {
throw new \Mpdf\MpdfException('Number of horizontal metrics is 0');
throw new \Mpdf\Exception\FontException('Error loading font: Number of horizontal metrics is 0');
}
// maxp - Maximum profile table
@ -990,7 +990,7 @@ class TTFontFile
if ($debug) {
$ver_maj = $this->read_ushort();
if ($ver_maj != 1) {
throw new \Mpdf\MpdfException(sprintf('Unknown maxp table version ', $ver_maj));
throw new \Mpdf\Exception\FontException(sprintf('Error loading font: Unknown maxp table version %s', $ver_maj));
}
} else {
$this->skip(4);
@ -1028,7 +1028,7 @@ class TTFontFile
}
if (!$unicode_cmap_offset) {
throw new \Mpdf\MpdfException(sprintf('Font "%s" does not have cmap for Unicode (platform 3, encoding 1, format 4, or platform 0, any encoding, format 4)', $this->filename));
throw new \Mpdf\Exception\FontException(sprintf('Font "%s" does not have cmap for Unicode (platform 3, encoding 1, format 4, or platform 0, any encoding, format 4)', $this->filename));
}
$sipset = false;
@ -1108,7 +1108,7 @@ class TTFontFile
$bctr++;
}
} else {
throw new \Mpdf\MpdfException(sprintf('The font "%s" does not have enough space to map all (unmapped) included glyphs into Private Use Area U+E000-U+F8FF', $names[1]));
throw new \Mpdf\Exception\FontException(sprintf('The font "%s" does not have enough space to map all (unmapped) included glyphs into Private Use Area U+E000-U+F8FF', $names[1]));
}
}
@ -1340,7 +1340,7 @@ class TTFontFile
$this->MarkGlyphSets = [];
}
} else {
throw new \Mpdf\MpdfException(sprintf('Unable to set font "%s" to use OTL as it does not include OTL tables (or at least not a GDEF table).', $this->filename));
throw new \Mpdf\Exception\FontException(sprintf('Unable to set font "%s" to use OTL as it does not include OTL tables (or at least not a GDEF table).', $this->filename));
}
$GSUB_offset = 0;
@ -1779,7 +1779,7 @@ class TTFontFile
}
}
} else {
throw new \Mpdf\MpdfException("GPOS Lookup Type " . $Lookup[$i]['Type'] . ", Format " . $SubstFormat . " not supported (ttfontsuni.php).");
throw new \Mpdf\Exception\FontException("GPOS Lookup Type " . $Lookup[$i]['Type'] . ", Format " . $SubstFormat . " not supported (ttfontsuni.php).");
}
} // LookupType 6: Chaining Contextual Substitution Subtable
elseif ($Lookup[$i]['Type'] == 6) {
@ -1831,7 +1831,7 @@ class TTFontFile
}
}
} else {
throw new \Mpdf\MpdfException(sprintf('Lookup Type "%s" not supported.', $Lookup[$i]['Type']));
throw new \Mpdf\Exception\FontException(sprintf('Lookup Type "%s" not supported.', $Lookup[$i]['Type']));
}
}
}
@ -1995,7 +1995,7 @@ class TTFontFile
$glyphs = $this->_getCoverage();
$Lookup[$i]['Subtable'][$c]['CoverageInputGlyphs'][] = implode("|", $glyphs);
}
throw new \Mpdf\MpdfException("Lookup Type 5, SubstFormat 3 not tested. Please report this with the name of font used - " . $this->fontkey);
throw new \Mpdf\Exception\FontException("Lookup Type 5, SubstFormat 3 not tested. Please report this with the name of font used - " . $this->fontkey);
}
} // LookupType 6: Chaining Contextual Substitution Subtable
elseif ($Lookup[$i]['Type'] == 6) {
@ -2960,7 +2960,7 @@ class TTFontFile
// Flag & 0x0010 = UseMarkFilteringSet
if ($flag & 0x0010) {
throw new \Mpdf\MpdfException("This font " . $this->fontkey . " contains MarkGlyphSets - Not tested yet");
throw new \Mpdf\Exception\FontException("This font " . $this->fontkey . " contains MarkGlyphSets - Not tested yet");
$str = $this->MarkGlyphSets[$MarkFilteringSet];
}
@ -3449,7 +3449,7 @@ class TTFontFile
$this->fh = fopen($file, 'rb');
if (!$this->fh) {
throw new \Mpdf\MpdfException(sprintf('Unable to open file %s', $file));
throw new \Mpdf\Exception\FontException(sprintf('Unable to open file %s', $file));
}
$this->_pos = 0;
@ -3470,7 +3470,7 @@ class TTFontFile
if ($TTCfontID > 0) {
$this->version = $version = $this->read_ulong(); // TTC Header version now
if (!in_array($version, [0x00010000, 0x00020000], true)) {
throw new \Mpdf\MpdfException(sprintf('Error parsing TrueType Collection: version=%s - %s', $version, $file));
throw new \Mpdf\Exception\FontException(sprintf('Error parsing TrueType Collection: version=%s - %s', $version, $file));
}
$this->numTTCFonts = $this->read_ulong();
for ($i = 1; $i <= $this->numTTCFonts; $i++) {
@ -3519,7 +3519,7 @@ class TTFontFile
}
if (!$unicode_cmap_offset) {
throw new \Mpdf\MpdfException(sprintf('Font "%s" does not have Unicode cmap (platform 3, encoding 1, format 4, or platform 0 [any encoding] format 4)', $this->filename));
throw new \Mpdf\Exception\FontException(sprintf('Font "%s" does not have Unicode cmap (platform 3, encoding 1, format 4, or platform 0 [any encoding] format 4)', $this->filename));
}
$glyphToChar = [];
@ -3535,7 +3535,7 @@ class TTFontFile
$bctr++;
} // Avoid overwriting a glyph already mapped in PUA
if ($bctr > 0xF8FF) {
throw new \Mpdf\MpdfException($file . " : WARNING - Font cannot map all included glyphs into Private Use Area U+E000 - U+F8FF; cannot use useOTL on this font");
throw new \Mpdf\Exception\FontException($file . " : WARNING - Font cannot map all included glyphs into Private Use Area U+E000 - U+F8FF; cannot use useOTL on this font");
}
$glyphToChar[$gid][] = $bctr;
$charToGlyph[$bctr] = $gid;
@ -3940,7 +3940,7 @@ class TTFontFile
$this->fh = fopen($file, 'rb');
if (!$this->fh) {
throw new \Mpdf\MpdfException(sprintf('Unable to open file "%s"', $file));
throw new \Mpdf\Exception\FontException(sprintf('Unable to open file "%s"', $file));
}
$this->filename = $file;
@ -3962,7 +3962,7 @@ class TTFontFile
if ($TTCfontID > 0) {
$this->version = $version = $this->read_ulong(); // TTC Header version now
if (!in_array($version, [0x00010000, 0x00020000])) {
throw new \Mpdf\MpdfException("ERROR - Error parsing TrueType Collection: version=" . $version . " - " . $file);
throw new \Mpdf\Exception\FontException("ERROR - Error parsing TrueType Collection: version=" . $version . " - " . $file);
}
$this->numTTCFonts = $this->read_ulong();
for ($i = 1; $i <= $this->numTTCFonts; $i++) {
@ -4021,7 +4021,7 @@ class TTFontFile
}
if (!$unicode_cmap_offset) {
throw new \Mpdf\MpdfException(sprintf('Font "%s" does not have cmap for Unicode (platform 3, encoding 1, format 4, or platform 0, any encoding, format 4)', $file));
throw new \Mpdf\Exception\FontException(sprintf('Font "%s" does not have cmap for Unicode (platform 3, encoding 1, format 4, or platform 0, any encoding, format 4)', $file));
}
// Format 12 CMAP does characters above Unicode BMP i.e. some HKCS characters U+20000 and above
@ -4627,7 +4627,7 @@ class TTFontFile
$this->glyphPos[] = ($arr[$n + 1]);
}
} else {
throw new \Mpdf\MpdfException('Unknown location table format ' . $indexToLocFormat);
throw new \Mpdf\Exception\FontException('Unknown location table format ' . $indexToLocFormat);
}
}
@ -4753,7 +4753,7 @@ class TTFontFile
$this->fh = fopen($file, 'rb');
if (!$this->fh) {
throw new \Mpdf\MpdfException(sprintf('Unable to open file "%s"', $file));
throw new \Mpdf\Exception\FontException(sprintf('Unable to open file "%s"', $file));
}
$this->_pos = 0;
@ -4774,7 +4774,7 @@ class TTFontFile
if ($TTCfontID > 0) {
$this->version = $version = $this->read_ulong(); // TTC Header version now
if (!in_array($version, [0x00010000, 0x00020000], true)) {
throw new \Mpdf\MpdfException(sprintf('Error parsing TrueType Collection: version=%s - %s', $version, $file));
throw new \Mpdf\Exception\FontException(sprintf('Error parsing TrueType Collection: version=%s - %s', $version, $file));
}
$this->numTTCFonts = $this->read_ulong();
for ($i = 1; $i <= $this->numTTCFonts; $i++) {
@ -4821,7 +4821,7 @@ class TTFontFile
}
if (!$unicode_cmap_offset) {
throw new \Mpdf\MpdfException(sprintf('Font "%s" does not have cmap for Unicode (platform 3, encoding 1, format 4, or platform 0, any encoding, format 4)', $this->filename));
throw new \Mpdf\Exception\FontException(sprintf('Font "%s" does not have cmap for Unicode (platform 3, encoding 1, format 4, or platform 0, any encoding, format 4)', $this->filename));
}
$glyphToChar = [];
@ -4836,7 +4836,7 @@ class TTFontFile
$bctr++;
} // Avoid overwriting a glyph already mapped in PUA (6,400)
if ($bctr > 0xF8FF) {
throw new \Mpdf\MpdfException("Problem. Trying to repackage TF file; not enough space for unmapped glyphs");
throw new \Mpdf\Exception\FontException("Problem. Trying to repackage TF file; not enough space for unmapped glyphs");
}
$glyphToChar[$gid][] = $bctr;
$charToGlyph[$bctr] = $gid;

View File

@ -151,7 +151,7 @@ class BarCode extends Tag
}
if (isset($properties['VERTICAL-ALIGN'])) {
$objattr['vertical-align'] = self::ALIGN[strtolower($properties['VERTICAL-ALIGN'])];
$objattr['vertical-align'] = $this->getAlign($properties['VERTICAL-ALIGN']);
}
if (isset($properties['COLOR']) && $properties['COLOR'] != '') {
$objattr['color'] = $this->colorConverter->convert($properties['COLOR'], $this->mpdf->PDFAXwarnings);
@ -205,7 +205,7 @@ class BarCode extends Tag
$w = ($arrcode['maxw'] * $arrcode['nom-X'] * $objattr['bsize']) + $arrcode['quietL'] + $arrcode['quietR'];
$h = ($arrcode['nom-H'] * $objattr['bsize']) + (2 * $arrcode['quietTB']);
} elseif (in_array($objattr['btype'], ['C128A', 'C128B', 'C128C', 'EAN128A', 'EAN128B', 'EAN128C',
} elseif (in_array($objattr['btype'], ['C128A', 'C128B', 'C128C', 'C128RAW', 'EAN128A', 'EAN128B', 'EAN128C',
'C39', 'C39+', 'C39E', 'C39E+', 'S25', 'S25+', 'I25', 'I25+', 'I25B',
'I25B+', 'C93', 'MSI', 'MSI+', 'CODABAR', 'CODE11'])) {

View File

@ -126,7 +126,7 @@ abstract class BlockTag extends Tag
}
// Cannot set block properties inside table - use Bold to indicate h1-h6
if ($tag === 'CENTER' && $this->mpdf->tdbegin) {
$this->mpdf->cell[$this->mpdf->row][$this->mpdf->col]['a'] = self::ALIGN['center'];
$this->mpdf->cell[$this->mpdf->row][$this->mpdf->col]['a'] = $this->getAlign('center');
}
$this->mpdf->InlineProperties['BLOCKINTABLE'] = $this->mpdf->saveInlineProperties();
@ -398,7 +398,7 @@ abstract class BlockTag extends Tag
// mPDF 6
if (!empty($attr['ALIGN'])) {
$currblk['block-align'] = self::ALIGN[strtolower($attr['ALIGN'])];
$currblk['block-align'] = $this->getAlign($attr['ALIGN']);
}
@ -447,7 +447,7 @@ abstract class BlockTag extends Tag
// Cancel Keep-Block-together
$currblk['keep_block_together'] = false;
$this->mpdf->kt_y00 = '';
$this->mpdf->kt_y00 = 0;
$this->mpdf->keep_block_together = 0;
$this->mpdf->blockContext++;
@ -498,7 +498,7 @@ abstract class BlockTag extends Tag
} elseif (isset($properties['FLOAT']) && strtoupper($properties['FLOAT']) === 'LEFT' && !$this->mpdf->ColActive) {
// Cancel Keep-Block-together
$currblk['keep_block_together'] = false;
$this->mpdf->kt_y00 = '';
$this->mpdf->kt_y00 = 0;
$this->mpdf->keep_block_together = 0;
$this->mpdf->blockContext++;
@ -1257,6 +1257,7 @@ abstract class BlockTag extends Tag
$this->mpdf->pageoutput[$this->mpdf->page] = [];
$this->mpdf->y = $this->mpdf->kt_y00;
$ihtml = $this->mpdf->blk[$this->mpdf->blklvl]['array_i'] - 1;
$ahtml[$ihtml + 1] .= ' pagebreakavoidchecked="true";'; // avoid re-iterating; read in OpenTag()

View File

@ -47,7 +47,7 @@ class Columns extends Tag
if ($attr['VALIGN'] === 'J') {
$valign = 'J';
} else {
$valign = self::ALIGN[$attr['VALIGN']];
$valign = $this->getAlign($attr['VALIGN']);
}
} else {
$valign = '';

View File

@ -54,9 +54,9 @@ class Hr extends Tag
$objattr['width'] = $this->sizeConverter->convert($attr['WIDTH'], $this->mpdf->blk[$this->mpdf->blklvl]['inner_width']);
}
if (isset($properties['TEXT-ALIGN'])) {
$objattr['align'] = self::ALIGN[strtolower($properties['TEXT-ALIGN'])];
$objattr['align'] = $this->getAlign($properties['TEXT-ALIGN']);
} elseif (isset($attr['ALIGN']) && $attr['ALIGN'] != '') {
$objattr['align'] = self::ALIGN[strtolower($attr['ALIGN'])];
$objattr['align'] = $this->getAlign($attr['ALIGN']);
}
if (isset($properties['MARGIN-LEFT']) && strtolower($properties['MARGIN-LEFT']) === 'auto') {

View File

@ -128,7 +128,7 @@ class Img extends Tag
}
if (isset($properties['VERTICAL-ALIGN'])) {
$objattr['vertical-align'] = self::ALIGN[strtolower($properties['VERTICAL-ALIGN'])];
$objattr['vertical-align'] = $this->getAlign($properties['VERTICAL-ALIGN']);
}
$w = 0;
$h = 0;

View File

@ -81,9 +81,9 @@ class Input extends Tag
$objattr['fontsize'] = $this->mpdf->FontSizePt;
if ($this->mpdf->useActiveForms) {
if (isset($attr['ALIGN'])) {
$objattr['text_align'] = self::ALIGN[strtolower($attr['ALIGN'])];
$objattr['text_align'] = $this->getAlign($attr['ALIGN']);
} elseif (isset($properties['TEXT-ALIGN'])) {
$objattr['text_align'] = self::ALIGN[strtolower($properties['TEXT-ALIGN'])];
$objattr['text_align'] = $this->getAlign($properties['TEXT-ALIGN']);
}
if (isset($properties['BORDER-TOP-COLOR'])) {
$objattr['border-col'] = $this->colorConverter->convert($properties['BORDER-TOP-COLOR'], $this->mpdf->PDFAXwarnings);
@ -105,7 +105,7 @@ class Input extends Tag
}
if ($properties['VERTICAL-ALIGN']) {
$objattr['vertical-align'] = self::ALIGN[strtolower($properties['VERTICAL-ALIGN'])];
$objattr['vertical-align'] = $this->getAlign($properties['VERTICAL-ALIGN']);
}
switch (strtoupper($attr['TYPE'])) {
@ -199,7 +199,7 @@ class Input extends Tag
$objattr['padding_right'] = 0;
if (isset($properties['VERTICAL-ALIGN'])) {
$objattr['vertical-align'] = self::ALIGN[strtolower($properties['VERTICAL-ALIGN'])];
$objattr['vertical-align'] = $this->getAlign($properties['VERTICAL-ALIGN']);
}
$w = 0;

View File

@ -176,7 +176,7 @@ class Meter extends InlineTag
}
if (isset($properties['VERTICAL-ALIGN'])) {
$objattr['vertical-align'] = self::ALIGN[strtolower($properties['VERTICAL-ALIGN'])];
$objattr['vertical-align'] = $this->getAlign($properties['VERTICAL-ALIGN']);
}
$w = 0;
$h = 0;

View File

@ -163,7 +163,7 @@ class Table extends Tag
}
if (isset($attr['ALIGN']) && array_key_exists(strtolower($attr['ALIGN']), self::ALIGN)) {
$table['a'] = self::ALIGN[strtolower($attr['ALIGN'])];
$table['a'] = $this->getAlign($attr['ALIGN']);
}
if (!$table['a']) {
if ($table['direction'] === 'rtl') {
@ -190,10 +190,10 @@ class Table extends Tag
}
if (isset($properties['VERTICAL-ALIGN']) && array_key_exists(strtolower($properties['VERTICAL-ALIGN']), self::ALIGN)) {
$table['va'] = self::ALIGN[strtolower($properties['VERTICAL-ALIGN'])];
$table['va'] = $this->getAlign($properties['VERTICAL-ALIGN']);
}
if (isset($properties['TEXT-ALIGN']) && array_key_exists(strtolower($properties['TEXT-ALIGN']), self::ALIGN)) {
$table['txta'] = self::ALIGN[strtolower($properties['TEXT-ALIGN'])];
$table['txta'] = $this->getAlign($properties['TEXT-ALIGN']);
}
if (!empty($properties['AUTOSIZE']) && $this->mpdf->tableLevel == 1) {

View File

@ -114,6 +114,12 @@ abstract class Tag
return strtoupper(str_replace('Mpdf\Tag\\', '', $tag));
}
protected function getAlign($property)
{
$property = strtolower($property);
return array_key_exists($property, self::ALIGN) ? self::ALIGN[$property] : '';
}
abstract public function open($attr, &$ahtml, &$ihtml);
abstract public function close(&$ahtml, &$ihtml);

View File

@ -12,14 +12,18 @@ class Td extends Tag
public function open($attr, &$ahtml, &$ihtml)
{
$tag = $this->getTagName();
$this->mpdf->ignorefollowingspaces = true;
$this->mpdf->lastoptionaltag = $tag; // Save current HTML specified optional endtag
$this->cssManager->tbCSSlvl++;
$this->mpdf->InlineProperties = [];
$this->mpdf->InlineBDF = []; // mPDF 6
$this->mpdf->InlineBDFctr = 0; // mPDF 6
$this->mpdf->tdbegin = true;
$this->mpdf->col++;
while (isset($this->mpdf->cell[$this->mpdf->row][$this->mpdf->col])) {
$this->mpdf->col++;
}
@ -114,10 +118,10 @@ class Td extends Tag
// INHERITED THEAD CSS Properties
if ($this->mpdf->tablethead) {
if ($this->mpdf->thead_valign_default) {
$c['va'] = self::ALIGN[strtolower($this->mpdf->thead_valign_default)];
$c['va'] = $this->getAlign($this->mpdf->thead_valign_default);
}
if ($this->mpdf->thead_textalign_default) {
$c['a'] = self::ALIGN[strtolower($this->mpdf->thead_textalign_default)];
$c['a'] = $this->getAlign($this->mpdf->thead_textalign_default);
}
if ($this->mpdf->thead_font_weight === 'B') {
$this->mpdf->SetStyle('B', true);
@ -133,10 +137,10 @@ class Td extends Tag
// INHERITED TFOOT CSS Properties
if ($this->mpdf->tabletfoot) {
if ($this->mpdf->tfoot_valign_default) {
$c['va'] = self::ALIGN[strtolower($this->mpdf->tfoot_valign_default)];
$c['va'] = $this->getAlign($this->mpdf->tfoot_valign_default);
}
if ($this->mpdf->tfoot_textalign_default) {
$c['a'] = self::ALIGN[strtolower($this->mpdf->tfoot_textalign_default)];
$c['a'] = $this->getAlign($this->mpdf->tfoot_textalign_default);
}
if ($this->mpdf->tfoot_font_weight === 'B') {
$this->mpdf->SetStyle('B', true);
@ -195,9 +199,9 @@ class Td extends Tag
}
/* -- END BACKGROUNDS -- */
if (isset($properties['VERTICAL-ALIGN'])) {
$c['va'] = self::ALIGN[strtolower($properties['VERTICAL-ALIGN'])];
$c['va'] = $this->getAlign($properties['VERTICAL-ALIGN']);
} elseif (isset($attr['VALIGN'])) {
$c['va'] = self::ALIGN[strtolower($attr['VALIGN'])];
$c['va'] = $this->getAlign($attr['VALIGN']);
}
@ -205,7 +209,7 @@ class Td extends Tag
if (0 === strpos($properties['TEXT-ALIGN'], 'D')) {
$c['a'] = $properties['TEXT-ALIGN'];
} else {
$c['a'] = self::ALIGN[strtolower($properties['TEXT-ALIGN'])];
$c['a'] = $this->getAlign($properties['TEXT-ALIGN']);
}
}
if (!empty($attr['ALIGN'])) {
@ -221,7 +225,7 @@ class Td extends Tag
$c['a'] = 'DPR';
}
} else {
$c['a'] = self::ALIGN[strtolower($attr['ALIGN'])];
$c['a'] = $this->getAlign($attr['ALIGN']);
}
}

View File

@ -75,9 +75,9 @@ class TextArea extends Tag
$objattr['fontsize'] = $this->mpdf->FontSizePt;
if ($this->mpdf->useActiveForms) {
if (isset($properties['TEXT-ALIGN'])) {
$objattr['text_align'] = self::ALIGN[strtolower($properties['TEXT-ALIGN'])];
$objattr['text_align'] = $this->getAlign($properties['TEXT-ALIGN']);
} elseif (isset($attr['ALIGN'])) {
$objattr['text_align'] = self::ALIGN[strtolower($attr['ALIGN'])];
$objattr['text_align'] = $this->getAlign($attr['ALIGN']);
}
if (isset($properties['OVERFLOW']) && strtolower($properties['OVERFLOW']) === 'hidden') {
$objattr['donotscroll'] = true;
@ -110,7 +110,7 @@ class TextArea extends Tag
);
}
if (isset($properties['VERTICAL-ALIGN'])) {
$objattr['vertical-align'] = self::ALIGN[strtolower($properties['VERTICAL-ALIGN'])];
$objattr['vertical-align'] = $this->getAlign($properties['VERTICAL-ALIGN']);
}
$colsize = 20; //HTML default value

View File

@ -54,7 +54,7 @@ class MetadataWriter implements \Psr\Log\LoggerAwareInterface
{
$this->writer->object();
$this->mpdf->MetadataRoot = $this->mpdf->n;
$Producer = 'mPDF ' . Mpdf::VERSION;
$Producer = 'mPDF' . ($this->mpdf->exposeVersion ? (' ' . Mpdf::VERSION) : '');
$z = date('O'); // +0200
$offset = substr($z, 0, 3) . ':' . substr($z, 3, 2);
$CreationDate = date('Y-m-d\TH:i:s') . $offset; // 2006-03-10T10:47:26-05:00 2006-06-19T09:05:17Z
@ -151,7 +151,7 @@ class MetadataWriter implements \Psr\Log\LoggerAwareInterface
public function writeInfo() // _putinfo
{
$this->writer->write('/Producer ' . $this->writer->utf16BigEndianTextString('mPDF ' . $this->getVersionString()));
$this->writer->write('/Producer ' . $this->writer->utf16BigEndianTextString('mPDF' . ($this->mpdf->exposeVersion ? (' ' . $this->getVersionString()) : '')));
if (!empty($this->mpdf->title)) {
$this->writer->write('/Title ' . $this->writer->utf16BigEndianTextString($this->mpdf->title));
@ -455,23 +455,29 @@ class MetadataWriter implements \Psr\Log\LoggerAwareInterface
}
if ($this->mpdf->hasOC || count($this->mpdf->layers)) {
$p = $v = $h = $l = $loff = $lall = $as = '';
if ($this->mpdf->hasOC) {
if (($this->mpdf->hasOC & 1) === 1) {
$p = $this->mpdf->n_ocg_print . ' 0 R';
}
if (($this->mpdf->hasOC & 2) === 2) {
$v = $this->mpdf->n_ocg_view . ' 0 R';
}
if (($this->mpdf->hasOC & 4) === 4) {
$h = $this->mpdf->n_ocg_hidden . ' 0 R';
}
$as = "<</Event /Print /OCGs [$p $v $h] /Category [/Print]>> <</Event /View /OCGs [$p $v $h] /Category [/View]>>";
}
if (count($this->mpdf->layers)) {
foreach ($this->mpdf->layers as $k => $layer) {
if (strtolower($this->mpdf->layerDetails[$k]['state']) === 'hidden') {
if (isset($this->mpdf->layerDetails[$k]) && strtolower($this->mpdf->layerDetails[$k]['state']) === 'hidden') {
$loff .= $layer['n'] . ' 0 R ';
} else {
$l .= $layer['n'] . ' 0 R ';
@ -479,11 +485,14 @@ class MetadataWriter implements \Psr\Log\LoggerAwareInterface
$lall .= $layer['n'] . ' 0 R ';
}
}
$this->writer->write("/OCProperties <</OCGs [$p $v $h $lall] /D <</ON [$p $l] /OFF [$v $h $loff] ");
$this->writer->write("/Order [$v $p $h $lall] ");
if ($as) {
$this->writer->write("/AS [$as] ");
}
$this->writer->write('>>>>');
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,94 @@
Copyright (c) 2010, Vernon Adams (vern@newtypography.co.uk),
with Reserved Font Names "Dhyana".
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,108 @@
-*-text-*-
GNU FreeFont
The GNU FreeFont project aims to provide a useful set of free scalable
(i.e., OpenType) fonts covering as much as possible of the ISO 10646/Unicode
UCS (Universal Character Set).
Statement of Purpose
--------------------
The practical reason for putting glyphs together in a single font face is
to conveniently mix symbols and characters from different writing systems,
without having to switch fonts.
Coverage
--------
FreeFont covers the following character sets
* ISO 8859 parts 1-15
* CEN MES-3 European Unicode Subset
http://www.evertype.com/standards/iso10646/pdf/cwa13873.pdf
* IBM/Microsoft code pages 437, 850, 852, 1250, 1252 and more
* Microsoft/Adobe Windows Glyph List 4 (WGL4)
http://www.microsoft.com/typography/otspec/WGL4.htm
* KOI8-R and KOI8-RU
* DEC VT100 graphics symbols
* International Phonetic Alphabet
* Arabic, Hebrew, Armenian, Georgian, Ethiopian and Thai alphabets,
including Arabic presentation forms A/B
* mathematical symbols, including the whole TeX repertoire of symbols
* APL symbols
etc.
Editing
-------
The free outline font editor, George Williams's FontForge
<http://fontforge.sourceforge.net/> is used for editing the fonts.
Design Issues
-------------
Which font shapes should be made? Historical style terms like Renaissance
or Baroque letterforms cannot be applied beyond Latin/Cyrillic/Greek
scripts to any greater extent than Kufi or Nashki can be applied beyond
Arabic script; "italic" is really only meaningful for Latin letters.
However, most modern writing systems have typographic formulations for
contrasting uniform and modulated character stroke widths, and have some
history with "oblique", faces. Since the advent of the typewriter, most
have developed a typographic style with uniform-width characters.
Accordingly, the FreeFont family has one monospaced - FreeMono - and two
proportional faces (one with uniform stroke - FreeSans - and one with
modulated stroke - FreeSerif).
To make text from different writing systems look good side-by-side, each
FreeFont face is meant to contain characters of similar style and weight.
Licensing
---------
Free UCS scalable fonts is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
The fonts are distributed in the hope that they will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, if you create a document which uses this font, and
embed this font or unaltered portions of this font into the document, this
font does not by itself cause the resulting document to be covered by the
GNU General Public License. This exception does not however invalidate any
other reasons why the document might be covered by the GNU General Public
License. If you modify this font, you may extend this exception to your
version of the font, but you are not obligated to do so. If you do not
wish to do so, delete this exception statement from your version.
Files and their suffixes
------------------------
The files with .sfd (Spline Font Database) are in FontForge's native format.
Please use these if you plan to modify the font files.
TrueType fonts for immediate consumption are the files with the .ttf
(TrueType Font) suffix. These are ready to use in Xwindows based
systems using FreeType, on Mac OS, and on older Windows systems.
OpenType fonts (with suffix .otf) are for use in Windows Vista.
Note that although they can be installed on Linux, but many applications
in Linux still don't support them.
--------------------------------------------------------------------------
Primoz Peterlin, <primoz.peterlin@biofiz.mf.uni-lj.si>
Steve White <stevan.white@googlemail.com>
Free UCS scalable fonts: http://savannah.gnu.org/projects/freefont/
$Id: README,v 1.6 2008/12/25 12:51:41 Stevan_White Exp $

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,98 @@
This Font Software is Copyright (c) 2006, Christopher J Fynn
All Rights Reserved.
"Jomolhari" is a Reserved Font Name for this Font Software.
This Font Software is licensed under the SIL Open Font License, Version 1.0.
No modification of the license is permitted, only verbatim copy is allowed.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.0 - 22 November 2005
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of cooperative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide an open
framework in which fonts may be shared and improved in partnership with
others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and sold with any software provided that the font
names of derivative works are changed. The fonts and derivatives,
however, cannot be released under any other type of license.
DEFINITIONS
"Font Software" refers to any and all of the following:
- font files
- data files
- source code
- build scripts
- documentation
"Reserved Font Name" refers to the Font Software name as seen by
users and any other names as specified after the copyright statement.
"Standard Version" refers to the collection of Font Software
components as distributed by the Copyright Holder.
"Modified Version" refers to any derivative font software made by
adding to, deleting, or substituting -- in part or in whole --
any of the components of the Standard Version, by changing formats
or by porting the Font Software to a new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Standard or Modified Versions, may be sold by itself.
2) Standard or Modified Versions of the Font Software may be bundled,
redistributed and sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s), in part or in whole, unless explicit written permission is
granted by the Copyright Holder. This restriction applies to all
references stored in the Font Software, such as the font menu name and
other font description fields, which are used to differentiate the
font from others.
4) The name(s) of the Copyright Holder or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed using this license, and may not be distributed
under any other license.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

Binary file not shown.

View File

@ -0,0 +1,93 @@
Copyright (c) 2010, Danh Hong (khmertype.blogspot.com),
with Reserved Font Name Khmer.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

Binary file not shown.

View File

@ -0,0 +1,93 @@
Copyright (c) 2004-2011, SIL International (http://www.sil.org/),
with Reserved Font Names "Scheherazade" and "SIL".
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,94 @@
Copyright 2011-12 Lohit Fonts Project contributors
<http://fedorahosted.org/lohit>
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,61 @@
This license is derived from the Bigelow & Holmes Font License
found at http://www.xfree86.org/current/LICENSE2.html
The following reasonable modifications have been made to the
Bigelow & Holmes Font License:
* All references to Luxi have been replaced with Meltho
* All references to Bigelow & Holmes Inc. and URW++ GmbH haven
been replaced with Beth Mardutho: The Syriac Institute
* The registered trademark notice belonging to Bigelow & Holmes
Inc. has been removed
* Contact information has been modified to show that the
contact person for these fonts is the Director of the
Institute, George Kiraz.
-------------------------------------------------------------
Meltho fonts and font code copyright © 2002 by Beth Mardutho:
The Syriac Institute. All Right Reserved.
Permission is hereby granted, free of charge, to any person
obtaining a copy of these Fonts and associated documentation
files (the "Font Software"), to deal in the Font Software,
including without limitation the rights to use, copy, merge,
publish, distribute, sublicense, and/or sell copies of the
Font Software, and to permit persons to whom the Font Software
is furnished to do so, subject to the following conditions:
The above copyright and trademark notices and this permission
notice shall be included in all copies of one or more of the
Font Software.
The Font Software may not be modified, altered, or added to,
and in particular the designs of glyphs or characters in the
Fonts may not be modified nor may additional glyphs or
characters be added to the Fonts. This License becomes null
and void when the Fonts or Font Software have been modified.
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER
RIGHT. IN NO EVENT SHALL BETH MARDUTHO: THE SYRIAC INSTITUTE BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY
GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR
FROM OTHER DEALINGS IN THE FONT SOFTWARE.
Except as contained in this notice, the name of Beth Mardutho:
The Syriac Institute shall not be used in advertising or otherwise
to promote the sale, use or other dealings in this Font Software
without prior written authorization from Beth Mardutho: The
Syriac Institute.
For further information, contact:
George Kiraz, Director of Beth Mardutho
gkiraz@bethmardutho.org

View File

@ -0,0 +1,17 @@
This package is distributed under the terms of GNU General Public License
version 2 (see file GNU-GPL).
---------------------------------------------------------------------
"Taamey David CLM" fonts are copyright (C) 2010 by Yoram Gnat
(gyoramg@users.sourceforge.net). All rights reserved.
As a special exception, if you create a document which uses
this font, and embed this font or unaltered portions of this
font into the document, this font does not by itself cause
the resulting document to be covered by the
GNU General Public License. This exception does not however
invalidate any other reasons why the document might be covered
by the GNU General Public License. If you modify this font,
you may extend this exception to your version of the font,
but you are not obligated to do so. If you do not wish to do so,
delete this exception statement from your version.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,93 @@
Copyright (c) 2010-2012, Sai Zin Di Di Zone (www.yunghkio.com/unicode|saiddzone@gmail.com), with Reserved Font Name 'Yunghkio'. Copyright (c) 2012, Google, Inc (http://code.google.com/p/googlefontdirectory/), with Reserved Font Name 'Arimo'. Copyright (c) 2012, Sun Tun, Ngwe Tun, Solveware Solution (http://code.google.com/p/tharlon-font|info@parabaik.info), with Reserved Font Name 'TharLon'.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More