Changeset 3024399
- Timestamp:
- 01/20/2024 08:47:22 AM (2 years ago)
- Location:
- wpwing-pdf-invoice-packing-slip-for-woocommerce
- Files:
-
- 108 edited
- 1 copied
-
tags/1.4.1 (copied) (copied from wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk)
-
tags/1.4.1/readme.txt (modified) (3 diffs)
-
tags/1.4.1/vendor/autoload.php (modified) (1 diff)
-
tags/1.4.1/vendor/composer/autoload_real.php (modified) (3 diffs)
-
tags/1.4.1/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/1.4.1/vendor/composer/installed.json (modified) (12 diffs)
-
tags/1.4.1/vendor/composer/installed.php (modified) (2 diffs)
-
tags/1.4.1/vendor/dompdf/dompdf/VERSION (modified) (1 diff)
-
tags/1.4.1/vendor/dompdf/dompdf/src/Image/Cache.php (modified) (5 diffs)
-
tags/1.4.1/vendor/masterminds/html5/README.md (modified) (1 diff)
-
tags/1.4.1/vendor/masterminds/html5/composer.json (modified) (1 diff)
-
tags/1.4.1/vendor/masterminds/html5/src/HTML5/Elements.php (modified) (1 diff)
-
tags/1.4.1/vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php (modified) (4 diffs)
-
tags/1.4.1/vendor/masterminds/html5/src/HTML5/Parser/UTF8Utils.php (modified) (2 diffs)
-
tags/1.4.1/vendor/phenx/php-font-lib/README.md (modified) (3 diffs)
-
tags/1.4.1/vendor/phenx/php-font-lib/composer.json (modified) (2 diffs)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/AdobeFontMetrics.php (modified) (4 diffs)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/BinaryStream.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/EOT/File.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/EOT/Header.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/EncodingMap.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Font.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Glyph/Outline.php (modified) (2 diffs)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Glyph/OutlineComponent.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Glyph/OutlineComposite.php (modified) (4 diffs)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Glyph/OutlineSimple.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Header.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/OpenType/File.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/OpenType/TableDirectoryEntry.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/DirectoryEntry.php (modified) (4 diffs)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Table.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/cmap.php (modified) (6 diffs)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/glyf.php (modified) (5 diffs)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/head.php (modified) (2 diffs)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/hhea.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/hmtx.php (modified) (2 diffs)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/kern.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/loca.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/maxp.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/name.php (modified) (3 diffs)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/nameRecord.php (modified) (2 diffs)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/os2.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/post.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/TrueType/Collection.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/TrueType/File.php (modified) (7 diffs)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/TrueType/Header.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/TrueType/TableDirectoryEntry.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/WOFF/File.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/WOFF/Header.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/WOFF/TableDirectoryEntry.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-svg-lib/src/Svg/Document.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-svg-lib/src/Svg/Style.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-svg-lib/src/Svg/Tag/Image.php (modified) (1 diff)
-
tags/1.4.1/vendor/phenx/php-svg-lib/src/Svg/Tag/UseTag.php (modified) (6 diffs)
-
tags/1.4.1/wpwing-pdf-invoice-packing-slip-for-woocommerce.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (3 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.json (modified) (12 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/vendor/dompdf/dompdf/VERSION (modified) (1 diff)
-
trunk/vendor/dompdf/dompdf/src/Image/Cache.php (modified) (5 diffs)
-
trunk/vendor/masterminds/html5/README.md (modified) (1 diff)
-
trunk/vendor/masterminds/html5/composer.json (modified) (1 diff)
-
trunk/vendor/masterminds/html5/src/HTML5/Elements.php (modified) (1 diff)
-
trunk/vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php (modified) (4 diffs)
-
trunk/vendor/masterminds/html5/src/HTML5/Parser/UTF8Utils.php (modified) (2 diffs)
-
trunk/vendor/phenx/php-font-lib/README.md (modified) (3 diffs)
-
trunk/vendor/phenx/php-font-lib/composer.json (modified) (2 diffs)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/AdobeFontMetrics.php (modified) (4 diffs)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/BinaryStream.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/EOT/File.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/EOT/Header.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/EncodingMap.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/Font.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/Glyph/Outline.php (modified) (2 diffs)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/Glyph/OutlineComponent.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/Glyph/OutlineComposite.php (modified) (4 diffs)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/Glyph/OutlineSimple.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/Header.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/OpenType/File.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/OpenType/TableDirectoryEntry.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/Table/DirectoryEntry.php (modified) (4 diffs)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Table.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/cmap.php (modified) (6 diffs)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/glyf.php (modified) (5 diffs)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/head.php (modified) (2 diffs)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/hhea.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/hmtx.php (modified) (2 diffs)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/kern.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/loca.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/maxp.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/name.php (modified) (3 diffs)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/nameRecord.php (modified) (2 diffs)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/os2.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/post.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/TrueType/Collection.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/TrueType/File.php (modified) (7 diffs)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/TrueType/Header.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/TrueType/TableDirectoryEntry.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/WOFF/File.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/WOFF/Header.php (modified) (1 diff)
-
trunk/vendor/phenx/php-font-lib/src/FontLib/WOFF/TableDirectoryEntry.php (modified) (1 diff)
-
trunk/vendor/phenx/php-svg-lib/src/Svg/Document.php (modified) (1 diff)
-
trunk/vendor/phenx/php-svg-lib/src/Svg/Style.php (modified) (1 diff)
-
trunk/vendor/phenx/php-svg-lib/src/Svg/Tag/Image.php (modified) (1 diff)
-
trunk/vendor/phenx/php-svg-lib/src/Svg/Tag/UseTag.php (modified) (6 diffs)
-
trunk/wpwing-pdf-invoice-packing-slip-for-woocommerce.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/readme.txt
r2927383 r3024399 5 5 Tags: PDF, Invoice, Packing Slip, Packing List, Proforma Invoice, Delivery Notes, Shipping Labels, WooCommerce, WPWing 6 6 Requires at least: 4.8 7 Tested up to: 6. 27 Tested up to: 6.4 8 8 Requires PHP: 7.1 9 Stable tag: 1.4. 09 Stable tag: 1.4.1 10 10 License: GPL-3.0-or-later 11 11 License URI: https://www.gnu.org/licenses/gpl-3.0.html 12 12 13 Want to print your WooCommerce order invoice or packing slip? Or download them in PDF format? You are in the right place! With WooCommerce you will feel the lack ingof print invoices or packing lists, which we are happy to fulfill. **WPWing PDF Invoice and Packing Slip for WooCommerce** can download your WooCommerce order invoice and packing slip in PDF format for print or email.13 Want to print your WooCommerce order invoice or packing slip? Or download them in PDF format? You are in the right place! With WooCommerce you will feel the lack of print invoices or packing lists, which we are happy to fulfill. **WPWing PDF Invoice and Packing Slip for WooCommerce** can download your WooCommerce order invoice and packing slip in PDF format for print or email. 14 14 15 15 … … 18 18 = Must have plugin for WooCommerce with tremendous support = 19 19 20 Want to print your WooCommerce order invoice or packing slip? Or download them in PDF format? You are in the right place! With WooCommerce you will feel the lack ingof print invoices or packing lists, which we are happy to fulfill. **WPWing PDF Invoice and Packing Slip for WooCommerce** can download your WooCommerce order invoice and packing slip in PDF format for print or email.20 Want to print your WooCommerce order invoice or packing slip? Or download them in PDF format? You are in the right place! With WooCommerce you will feel the lack of print invoices or packing lists, which we are happy to fulfill. **WPWing PDF Invoice and Packing Slip for WooCommerce** can download your WooCommerce order invoice and packing slip in PDF format for print or email. 21 21 22 ✅ Tested OK with WooCommerce 6.522 ✅ Tested OK with WooCommerce 8.5 23 23 24 24 ### 🔥 FEATURES: ### … … 73 73 == Changelog == 74 74 75 = 1.4.1 - 20/01/2024 76 77 * Update: DOM PDF version 2.0.4 78 * Compatibility check with WP's latest version. 79 * Compatibility check with WC's latest version. 80 * Few minor improvements. 81 75 82 = 1.4.0 - 17/06/2023 76 83 77 * Update: Remove WPWing prefix from plugin name84 * Update: Remove WPWing prefix from the plugin name 78 85 * Update: Invoice and Packing slip open in new tab 79 86 * Few minor improvements. -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/autoload.php
r2900363 r3024399 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit 02775e21763226d85a226d55c9acfc98::getLoader();7 return ComposerAutoloaderInitbf78a1f8678d210391362580614bce81::getLoader(); -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/composer/autoload_real.php
r2900363 r3024399 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 02775e21763226d85a226d55c9acfc985 class ComposerAutoloaderInitbf78a1f8678d210391362580614bce81 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 02775e21763226d85a226d55c9acfc98', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInitbf78a1f8678d210391362580614bce81', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); 29 spl_autoload_unregister(array('ComposerAutoloaderInit 02775e21763226d85a226d55c9acfc98', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInitbf78a1f8678d210391362580614bce81', 'loadClassLoader')); 30 30 31 31 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 33 33 require __DIR__ . '/autoload_static.php'; 34 34 35 call_user_func(\Composer\Autoload\ComposerStaticInit 02775e21763226d85a226d55c9acfc98::getInitializer($loader));35 call_user_func(\Composer\Autoload\ComposerStaticInitbf78a1f8678d210391362580614bce81::getInitializer($loader)); 36 36 } else { 37 37 $map = require __DIR__ . '/autoload_namespaces.php'; -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/composer/autoload_static.php
r2900363 r3024399 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 02775e21763226d85a226d55c9acfc987 class ComposerStaticInitbf78a1f8678d210391362580614bce81 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 58 58 { 59 59 return \Closure::bind(function () use ($loader) { 60 $loader->prefixLengthsPsr4 = ComposerStaticInit 02775e21763226d85a226d55c9acfc98::$prefixLengthsPsr4;61 $loader->prefixDirsPsr4 = ComposerStaticInit 02775e21763226d85a226d55c9acfc98::$prefixDirsPsr4;62 $loader->classMap = ComposerStaticInit 02775e21763226d85a226d55c9acfc98::$classMap;60 $loader->prefixLengthsPsr4 = ComposerStaticInitbf78a1f8678d210391362580614bce81::$prefixLengthsPsr4; 61 $loader->prefixDirsPsr4 = ComposerStaticInitbf78a1f8678d210391362580614bce81::$prefixDirsPsr4; 62 $loader->classMap = ComposerStaticInitbf78a1f8678d210391362580614bce81::$classMap; 63 63 64 64 }, null, ClassLoader::class); -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/composer/installed.json
r2900363 r3024399 3 3 { 4 4 "name": "dompdf/dompdf", 5 "version": "v2.0. 3",6 "version_normalized": "2.0. 3.0",5 "version": "v2.0.4", 6 "version_normalized": "2.0.4.0", 7 7 "source": { 8 8 "type": "git", 9 9 "url": "https://github.com/dompdf/dompdf.git", 10 "reference": " e8d2d5e37e8b0b30f0732a011295ab80680d7e85"11 }, 12 "dist": { 13 "type": "zip", 14 "url": "https://api.github.com/repos/dompdf/dompdf/zipball/ e8d2d5e37e8b0b30f0732a011295ab80680d7e85",15 "reference": " e8d2d5e37e8b0b30f0732a011295ab80680d7e85",10 "reference": "093f2d9739cec57428e39ddadedfd4f3ae862c0f" 11 }, 12 "dist": { 13 "type": "zip", 14 "url": "https://api.github.com/repos/dompdf/dompdf/zipball/093f2d9739cec57428e39ddadedfd4f3ae862c0f", 15 "reference": "093f2d9739cec57428e39ddadedfd4f3ae862c0f", 16 16 "shasum": "" 17 17 }, … … 37 37 "ext-zlib": "Needed for pdf stream compression" 38 38 }, 39 "time": "2023- 02-07T12:51:48+00:00",39 "time": "2023-12-12T20:19:39+00:00", 40 40 "type": "library", 41 41 "installation-source": "dist", … … 62 62 "support": { 63 63 "issues": "https://github.com/dompdf/dompdf/issues", 64 "source": "https://github.com/dompdf/dompdf/tree/v2.0. 3"64 "source": "https://github.com/dompdf/dompdf/tree/v2.0.4" 65 65 }, 66 66 "install-path": "../dompdf/dompdf" … … 68 68 { 69 69 "name": "masterminds/html5", 70 "version": "2. 7.6",71 "version_normalized": "2. 7.6.0",70 "version": "2.8.1", 71 "version_normalized": "2.8.1.0", 72 72 "source": { 73 73 "type": "git", 74 74 "url": "https://github.com/Masterminds/html5-php.git", 75 "reference": "897eb517a343a2281f11bc5556d6548db7d93947" 76 }, 77 "dist": { 78 "type": "zip", 79 "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/897eb517a343a2281f11bc5556d6548db7d93947", 80 "reference": "897eb517a343a2281f11bc5556d6548db7d93947", 81 "shasum": "" 82 }, 83 "require": { 84 "ext-ctype": "*", 75 "reference": "f47dcf3c70c584de14f21143c55d9939631bc6cf" 76 }, 77 "dist": { 78 "type": "zip", 79 "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f47dcf3c70c584de14f21143c55d9939631bc6cf", 80 "reference": "f47dcf3c70c584de14f21143c55d9939631bc6cf", 81 "shasum": "" 82 }, 83 "require": { 85 84 "ext-dom": "*", 86 "ext-libxml": "*",87 85 "php": ">=5.3.0" 88 86 }, 89 87 "require-dev": { 90 "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 "91 }, 92 "time": "202 2-08-18T16:18:26+00:00",88 "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8" 89 }, 90 "time": "2023-05-10T11:58:31+00:00", 93 91 "type": "library", 94 92 "extra": { … … 134 132 "support": { 135 133 "issues": "https://github.com/Masterminds/html5-php/issues", 136 "source": "https://github.com/Masterminds/html5-php/tree/2. 7.6"134 "source": "https://github.com/Masterminds/html5-php/tree/2.8.1" 137 135 }, 138 136 "install-path": "../masterminds/html5" … … 140 138 { 141 139 "name": "phenx/php-font-lib", 142 "version": "0.5. 4",143 "version_normalized": "0.5. 4.0",140 "version": "0.5.5", 141 "version_normalized": "0.5.5.0", 144 142 "source": { 145 143 "type": "git", 146 144 "url": "https://github.com/dompdf/php-font-lib.git", 147 "reference": " dd448ad1ce34c63d09baccd05415e361300c35b4"148 }, 149 "dist": { 150 "type": "zip", 151 "url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/ dd448ad1ce34c63d09baccd05415e361300c35b4",152 "reference": " dd448ad1ce34c63d09baccd05415e361300c35b4",145 "reference": "671df0f3516252011aa94f9e8e3b3b66199339f8" 146 }, 147 "dist": { 148 "type": "zip", 149 "url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/671df0f3516252011aa94f9e8e3b3b66199339f8", 150 "reference": "671df0f3516252011aa94f9e8e3b3b66199339f8", 153 151 "shasum": "" 154 152 }, … … 157 155 }, 158 156 "require-dev": { 159 "symfony/phpunit-bridge": "^3 || ^4 || ^5 "160 }, 161 "time": "202 1-12-17T19:44:54+00:00",157 "symfony/phpunit-bridge": "^3 || ^4 || ^5 || ^6" 158 }, 159 "time": "2024-01-07T18:13:29+00:00", 162 160 "type": "library", 163 161 "installation-source": "dist", … … 169 167 "notification-url": "https://packagist.org/downloads/", 170 168 "license": [ 171 "LGPL- 3.0"169 "LGPL-2.1-or-later" 172 170 ], 173 171 "authors": [ … … 181 179 "support": { 182 180 "issues": "https://github.com/dompdf/php-font-lib/issues", 183 "source": "https://github.com/dompdf/php-font-lib/tree/0.5. 4"181 "source": "https://github.com/dompdf/php-font-lib/tree/0.5.5" 184 182 }, 185 183 "install-path": "../phenx/php-font-lib" … … 187 185 { 188 186 "name": "phenx/php-svg-lib", 189 "version": "0.5. 0",190 "version_normalized": "0.5. 0.0",187 "version": "0.5.1", 188 "version_normalized": "0.5.1.0", 191 189 "source": { 192 190 "type": "git", 193 191 "url": "https://github.com/dompdf/php-svg-lib.git", 194 "reference": " 76876c6cf3080bcb6f249d7d59705108166a6685"195 }, 196 "dist": { 197 "type": "zip", 198 "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/ 76876c6cf3080bcb6f249d7d59705108166a6685",199 "reference": " 76876c6cf3080bcb6f249d7d59705108166a6685",192 "reference": "8a8a1ebcf6aea861ef30197999f096f7bd4b4456" 193 }, 194 "dist": { 195 "type": "zip", 196 "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/8a8a1ebcf6aea861ef30197999f096f7bd4b4456", 197 "reference": "8a8a1ebcf6aea861ef30197999f096f7bd4b4456", 200 198 "shasum": "" 201 199 }, … … 208 206 "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5" 209 207 }, 210 "time": "202 2-09-06T12:16:56+00:00",208 "time": "2023-12-11T20:56:08+00:00", 211 209 "type": "library", 212 210 "installation-source": "dist", … … 230 228 "support": { 231 229 "issues": "https://github.com/dompdf/php-svg-lib/issues", 232 "source": "https://github.com/dompdf/php-svg-lib/tree/0.5. 0"230 "source": "https://github.com/dompdf/php-svg-lib/tree/0.5.1" 233 231 }, 234 232 "install-path": "../phenx/php-svg-lib" -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/composer/installed.php
r2927383 r3024399 6 6 'install_path' => __DIR__ . '/../../', 7 7 'aliases' => array(), 8 'reference' => ' 73e7da86a1b51ee4c3594d66d3281f361cd3753d',8 'reference' => 'feb79eda7375cc2bdf54e38dc5c640dd62a0b663', 9 9 'name' => '__root__', 10 10 'dev' => true, … … 17 17 'install_path' => __DIR__ . '/../../', 18 18 'aliases' => array(), 19 'reference' => ' 73e7da86a1b51ee4c3594d66d3281f361cd3753d',19 'reference' => 'feb79eda7375cc2bdf54e38dc5c640dd62a0b663', 20 20 'dev_requirement' => false, 21 21 ), 22 22 'dompdf/dompdf' => array( 23 'pretty_version' => 'v2.0. 3',24 'version' => '2.0. 3.0',23 'pretty_version' => 'v2.0.4', 24 'version' => '2.0.4.0', 25 25 'type' => 'library', 26 26 'install_path' => __DIR__ . '/../dompdf/dompdf', 27 27 'aliases' => array(), 28 'reference' => ' e8d2d5e37e8b0b30f0732a011295ab80680d7e85',28 'reference' => '093f2d9739cec57428e39ddadedfd4f3ae862c0f', 29 29 'dev_requirement' => false, 30 30 ), 31 31 'masterminds/html5' => array( 32 'pretty_version' => '2. 7.6',33 'version' => '2. 7.6.0',32 'pretty_version' => '2.8.1', 33 'version' => '2.8.1.0', 34 34 'type' => 'library', 35 35 'install_path' => __DIR__ . '/../masterminds/html5', 36 36 'aliases' => array(), 37 'reference' => ' 897eb517a343a2281f11bc5556d6548db7d93947',37 'reference' => 'f47dcf3c70c584de14f21143c55d9939631bc6cf', 38 38 'dev_requirement' => false, 39 39 ), 40 40 'phenx/php-font-lib' => array( 41 'pretty_version' => '0.5. 4',42 'version' => '0.5. 4.0',41 'pretty_version' => '0.5.5', 42 'version' => '0.5.5.0', 43 43 'type' => 'library', 44 44 'install_path' => __DIR__ . '/../phenx/php-font-lib', 45 45 'aliases' => array(), 46 'reference' => ' dd448ad1ce34c63d09baccd05415e361300c35b4',46 'reference' => '671df0f3516252011aa94f9e8e3b3b66199339f8', 47 47 'dev_requirement' => false, 48 48 ), 49 49 'phenx/php-svg-lib' => array( 50 'pretty_version' => '0.5. 0',51 'version' => '0.5. 0.0',50 'pretty_version' => '0.5.1', 51 'version' => '0.5.1.0', 52 52 'type' => 'library', 53 53 'install_path' => __DIR__ . '/../phenx/php-svg-lib', 54 54 'aliases' => array(), 55 'reference' => ' 76876c6cf3080bcb6f249d7d59705108166a6685',55 'reference' => '8a8a1ebcf6aea861ef30197999f096f7bd4b4456', 56 56 'dev_requirement' => false, 57 57 ), -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/dompdf/dompdf/VERSION
r2900363 r3024399 1 2.0. 31 2.0.4 -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/dompdf/dompdf/src/Image/Cache.php
r2900363 r3024399 33 33 34 34 /** 35 * Array of image references from an SVG document. 36 * Used to detect circular references across SVG documents. 37 * 38 * @var array 39 */ 40 protected static $svgRefs = []; 41 42 /** 35 43 * The url to the "broken image" used when images can't be loaded 36 44 * … … 135 143 function ($parser, $name, $attributes) use ($options, $parsed_url, $full_url) { 136 144 if (strtolower($name) === "image") { 145 if (!\array_key_exists($full_url, self::$svgRefs)) { 146 self::$svgRefs[$full_url] = []; 147 } 137 148 $attributes = array_change_key_case($attributes, CASE_LOWER); 138 149 $urls = []; … … 140 151 $urls[] = $attributes["href"] ?? ""; 141 152 foreach ($urls as $url) { 142 if (!empty($url)) { 143 $inner_full_url = Helpers::build_url($parsed_url["protocol"], $parsed_url["host"], $parsed_url["path"], $url); 144 if ($inner_full_url === $full_url) { 145 throw new ImageException("SVG self-reference is not allowed", E_WARNING); 146 } 147 [$resolved_url, $type, $message] = self::resolve_url($url, $parsed_url["protocol"], $parsed_url["host"], $parsed_url["path"], $options); 148 if (!empty($message)) { 149 throw new ImageException("This SVG document references a restricted resource. $message", E_WARNING); 150 } 153 if (empty($url)) { 154 continue; 155 } 156 157 $inner_full_url = Helpers::build_url($parsed_url["protocol"], $parsed_url["host"], $parsed_url["path"], $url); 158 if (empty($inner_full_url)) { 159 continue; 160 } 161 162 self::detectCircularRef($full_url, $inner_full_url); 163 self::$svgRefs[$full_url][] = $inner_full_url; 164 [$resolved_url, $type, $message] = self::resolve_url($url, $parsed_url["protocol"], $parsed_url["host"], $parsed_url["path"], $options); 165 if (!empty($message)) { 166 throw new ImageException("This SVG document references a restricted resource. $message", E_WARNING); 151 167 } 152 168 } … … 179 195 } 180 196 197 static function detectCircularRef(string $src, string $target) 198 { 199 if (!\array_key_exists($target, self::$svgRefs)) { 200 return; 201 } 202 foreach (self::$svgRefs[$target] as $ref) { 203 if ($ref === $src) { 204 throw new ImageException("Circular external SVG image reference detected.", E_WARNING); 205 } 206 self::detectCircularRef($src, $ref); 207 } 208 } 209 181 210 /** 182 211 * Register a temp file for the given original image file. … … 240 269 self::$_cache = []; 241 270 self::$tempImages = []; 271 self::$svgRefs = []; 242 272 } 243 273 -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/masterminds/html5/README.md
r2900365 r3024399 190 190 interpreter. While one may be supplied, not all features will be 191 191 supported. 192 - Re ntrance: The current parser is not re-entrant. (Thus you can't pause192 - Reentrance: The current parser is not re-entrant. (Thus you can't pause 193 193 the parser to modify the HTML string mid-parse.) 194 194 - Validation: The current tree builder is **not** a validating parser. -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/masterminds/html5/composer.json
r2900365 r3024399 21 21 ], 22 22 "require" : { 23 "ext-ctype": "*",24 23 "ext-dom": "*", 25 "ext-libxml" : "*",26 24 "php" : ">=5.3.0" 27 25 }, 28 26 "require-dev": { 29 "phpunit/phpunit" : "^4.8.35 || ^5.7.21 || ^6 || ^7 "27 "phpunit/phpunit" : "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8" 30 28 }, 31 29 "autoload": { -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/masterminds/html5/src/HTML5/Elements.php
r2900365 r3024399 186 186 'ul' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG 187 187 'var' => 1, 188 'video' => 65, // NORMAL | BLOCK_TAG188 'video' => 1, 189 189 'wbr' => 9, // NORMAL | VOID_TAG 190 190 -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php
r2900365 r3024399 132 132 $tok = $this->scanner->next(); 133 133 134 if ('!' === $tok) { 134 if (false === $tok) { 135 // end of string 136 $this->parseError('Illegal tag opening'); 137 } elseif ('!' === $tok) { 135 138 $this->markupDeclaration(); 136 139 } elseif ('/' === $tok) { … … 138 141 } elseif ('?' === $tok) { 139 142 $this->processingInstruction(); 140 } elseif ( ctype_alpha($tok)) {143 } elseif ($this->is_alpha($tok)) { 141 144 $this->tagName(); 142 145 } else { … … 348 351 // EOF -> parse error 349 352 // -> parse error 350 if (! ctype_alpha($tok)) {353 if (!$this->is_alpha($tok)) { 351 354 $this->parseError("Expected tag name, got '%s'", $tok); 352 355 if ("\0" == $tok || false === $tok) { … … 1195 1198 return '&'; 1196 1199 } 1200 1201 /** 1202 * Checks whether a (single-byte) character is an ASCII letter or not. 1203 * 1204 * @param string $input A single-byte string 1205 * 1206 * @return bool True if it is a letter, False otherwise 1207 */ 1208 protected function is_alpha($input) 1209 { 1210 $code = ord($input); 1211 1212 return ($code >= 97 && $code <= 122) || ($code >= 65 && $code <= 90); 1213 } 1197 1214 } -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/masterminds/html5/src/HTML5/Parser/UTF8Utils.php
r2900365 r3024399 39 39 /** 40 40 * Count the number of characters in a string. 41 * UTF-8 aware. This will try (in order) iconv, MB, libxml,and finally a custom counter.41 * UTF-8 aware. This will try (in order) iconv, MB, and finally a custom counter. 42 42 * 43 43 * @param string $string … … 54 54 if (function_exists('iconv_strlen')) { 55 55 return iconv_strlen($string, 'utf-8'); 56 }57 58 if (function_exists('utf8_decode')) {59 // MPB: Will this work? Won't certain decodes lead to two chars60 // extrapolated out of 2-byte chars?61 return strlen(utf8_decode($string));62 56 } 63 57 -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/README.md
r2672742 r3024399 9 9 * Make an Adobe Font Metrics (AFM) file from a font 10 10 11 You can find a demo GUI [here](http://pxd.me/php-font-lib/www/font_explorer.html).12 13 11 This project was initiated by the need to read font files in the [DOMPDF project](https://github.com/dompdf/dompdf). 14 12 … … 16 14 ------------- 17 15 18 ``` 19 $font = \FontLib\Font::load('../../fontfile.ttf'); 16 ### Base font information 17 18 ```php 19 $font = \FontLib\Font::load('fontfile.ttf'); 20 20 $font->parse(); // for getFontWeight() to work this call must be done first! 21 21 echo $font->getFontName() .'<br>'; … … 26 26 echo $font->getFontWeight() .'<br>'; 27 27 echo $font->getFontPostscriptName() .'<br>'; 28 $font->close(); 28 29 ``` 30 31 ### Font Metrics Generation 32 33 ```php 34 $font = FontLib\Font::load('fontfile.ttf'); 35 $font->parse(); 36 $font->saveAdobeFontMetrics('fontfile.ufm'); 37 ``` 38 39 ### Create a font subset 40 41 ```php 42 $font = FontLib\Font::load('fontfile.ttf'); 43 $font->parse(); 44 $font->setSubset("abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ.:,;' (!?)+-*/== 1234567890"); // characters to include 45 $font->reduce(); 46 touch('fontfile.subset.ttf'); 47 $font->open('fontfile.subset.ttf', FontLib\BinaryStream::modeReadWrite); 48 $font->encode(array("OS/2")); 49 $font->close(); 50 ``` -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/composer.json
r2672742 r3024399 4 4 "description": "A library to read, parse, export and make subsets of different types of font files.", 5 5 "homepage": "https://github.com/PhenX/php-font-lib", 6 "license": "LGPL- 3.0",6 "license": "LGPL-2.1-or-later", 7 7 "authors": [ 8 8 { … … 28 28 }, 29 29 "require-dev": { 30 "symfony/phpunit-bridge" : "^3 || ^4 || ^5 "30 "symfony/phpunit-bridge" : "^3 || ^4 || ^5 || ^6" 31 31 } 32 32 } -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/AdobeFontMetrics.php
r2672742 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 49 49 $this->startSection("FontMetrics", 4.1); 50 50 $this->addPair("Notice", "Converted by PHP-font-lib"); 51 $this->addPair("Comment", "https://github.com/ PhenX/php-font-lib");51 $this->addPair("Comment", "https://github.com/dompdf/php-font-lib"); 52 52 53 53 $encoding_scheme = ($encoding ? $encoding : "FontSpecific"); … … 76 76 if (isset($hhea["ascent"])) { 77 77 $this->addPair("FontHeightOffset", $font->normalizeFUnit($hhea["lineGap"])); 78 $this->addPair("Ascender", $font->normalizeFUnit($hhea["ascent"]));79 $this->addPair("Descender", $font->normalizeFUnit($hhea["descent"]));80 78 } 81 79 else { 82 80 $this->addPair("FontHeightOffset", $font->normalizeFUnit($os2["typoLineGap"])); 81 } 82 83 $glyf = $font->getData("glyf"); 84 $glyphIndexArray = $font->getUnicodeCharMap(); 85 86 // capHeight is based on capital H 87 if (\array_key_exists(72, $glyphIndexArray)) { 88 $upperH = $glyf[$glyphIndexArray[72]]; 89 $upperH->parseData(); 90 $this->addPair("CapHeight", $font->normalizeFUnit($upperH->yMax)); 91 } 92 93 // xHeight is based on lowercase x 94 if (\array_key_exists(120, $glyphIndexArray)) { 95 $lowerX = $glyf[$glyphIndexArray[120]]; 96 $lowerX->parseData(); 97 $this->addPair("XHeight", $font->normalizeFUnit($lowerX->yMax)); 98 } 99 100 // ascender is based on lowercase d 101 if (\array_key_exists(100, $glyphIndexArray)) { 102 $lowerD = $glyf[$glyphIndexArray[100]]; 103 $lowerD->parseData(); 104 $this->addPair("Ascender", $font->normalizeFUnit($lowerD->yMax)); 105 } elseif (isset($hhea["ascent"])) { 106 $this->addPair("Ascender", $font->normalizeFUnit($hhea["ascent"])); 107 } 108 else { 83 109 $this->addPair("Ascender", $font->normalizeFUnit($os2["typoAscender"])); 110 } 111 112 // descender is based on lowercase p 113 if (\array_key_exists(112, $glyphIndexArray)) { 114 $lowerP = $glyf[$glyphIndexArray[112]]; 115 $lowerP->parseData(); 116 $this->addPair("Descender", $font->normalizeFUnit($lowerP->yMin)); 117 } elseif (isset($hhea["ascent"])) { 118 $this->addPair("Descender", $font->normalizeFUnit($hhea["descent"])); 119 } 120 else { 84 121 $this->addPair("Descender", -abs($font->normalizeFUnit($os2["typoDescender"]))); 85 122 } … … 93 130 )); 94 131 95 $glyphIndexArray = $font->getUnicodeCharMap();96 97 132 if ($glyphIndexArray) { 98 133 $hmtx = $font->getData("hmtx"); -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/BinaryStream.php
r2672742 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/EOT/File.php
r2672742 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/EOT/Header.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/EncodingMap.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Font.php
r2672742 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Glyph/Outline.php
r2672742 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 49 49 $font->seek($offset); 50 50 51 if ($ font->readInt16() > -1) {51 if ($size === 0 || $font->readInt16() > -1) { 52 52 /** @var OutlineSimple $glyph */ 53 53 $glyph = new OutlineSimple($table, $offset, $size); -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Glyph/OutlineComponent.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Glyph/OutlineComposite.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 130 130 $this->components[] = $component; 131 131 } while ($flags & self::MORE_COMPONENTS); 132 if ($flags & self::WE_HAVE_INSTRUCTIONS) { 133 $numInstr = $font->readUInt16(); 134 $instr = $font->read($numInstr); 135 $this->components[count($this->components) - 1]->instructions = pack('n', $numInstr) . $instr; 136 } 132 137 } 133 138 … … 172 177 if ($_i < count($this->components) - 1) { 173 178 $flags |= self::MORE_COMPONENTS; 179 } elseif($_component->instructions !== null) { 180 $flags |= self::WE_HAVE_INSTRUCTIONS; 174 181 } 175 182 … … 215 222 } 216 223 224 if($_component->instructions !== null) { 225 $size += $font->write($_component->instructions, strlen($_component->instructions)); 226 } 227 217 228 return $size; 218 229 } -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Glyph/OutlineSimple.php
r2672742 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Header.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/OpenType/File.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/OpenType/TableDirectoryEntry.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/DirectoryEntry.php
r2672742 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 50 50 } 51 51 52 $len = mb_strlen($data, '8bit'); 53 54 $hi = 0x0000; 55 $lo = 0x0000; 56 57 for ($i = 0; $i < $len; $i += 4) { 58 $hi += (ord($data[$i]) << 8) + ord($data[$i + 1]); 59 $lo += (ord($data[$i + 2]) << 8) + ord($data[$i + 3]); 60 $hi += $lo >> 16; 61 $lo = $lo & 0xFFFF; 62 $hi = $hi & 0xFFFF; 63 } 64 65 return ($hi << 8) + $lo; 52 $table = unpack("N*", $data); 53 return array_sum($table); 66 54 } 67 55 … … 94 82 $table_length = $data->encode(); 95 83 84 $font->seek($table_offset + $table_length); 85 $pad = 0; 86 $mod = $table_length % 4; 87 if ($mod != 0) { 88 $pad = 4 - $mod; 89 $font->write(str_pad("", $pad, "\0"), $pad); 90 } 91 96 92 $font->seek($table_offset); 97 93 $table_data = $font->read($table_length); … … 106 102 Font::d("Bytes written = $table_length"); 107 103 108 $font->seek($table_offset + $table_length );104 $font->seek($table_offset + $table_length + $pad); 109 105 } 110 106 -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Table.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/cmap.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 27 27 ); 28 28 29 private static $subtable_v2_format = array( 30 "length" => self::uint16, 31 "language" => self::uint16 32 ); 33 34 private static $subtable_v2_format_subheader = array( 35 "firstCode" => self::uint16, 36 "entryCount" => self::uint16, 37 "idDelta" => self::int16, 38 "idRangeOffset" => self::uint16 39 ); 40 29 41 private static $subtable_v4_format = array( 30 42 "length" => self::uint16, … … 39 51 "length" => self::uint32, 40 52 "language" => self::uint32, 41 "ngroups" => self::uint3253 "ngroups" => self::uint32 42 54 ); 43 55 … … 61 73 $subtable["format"] = $font->readUInt16(); 62 74 63 // @todo Only CMAP version 4 and 12 64 if (($subtable["format"] != 4) && ($subtable["format"] != 12)) { 65 unset($data["subtables"][$i]); 66 $data["numberSubtables"]--; 67 continue; 68 } 69 70 if ($subtable["format"] == 12) { 71 72 $font->readUInt16(); 73 74 $subtable += $font->unpack(self::$subtable_v12_format); 75 76 $glyphIndexArray = array(); 77 $endCodes = array(); 78 $startCodes = array(); 79 80 for ($p = 0; $p < $subtable['ngroups']; $p++) { 81 82 $startCode = $startCodes[] = $font->readUInt32(); 83 $endCode = $endCodes[] = $font->readUInt32(); 84 $startGlyphCode = $font->readUInt32(); 85 86 for ($c = $startCode; $c <= $endCode; $c++) { 87 $glyphIndexArray[$c] = $startGlyphCode; 88 $startGlyphCode++; 75 switch ($subtable["format"]) { 76 case 0: 77 case 6: 78 case 8: 79 case 10: 80 case 13: 81 case 14: 82 unset($data["subtables"][$i]); 83 $data["numberSubtables"]--; 84 continue 2; 85 86 case 2: 87 $subtable += $font->unpack(self::$subtable_v2_format); 88 89 $subHeaderKeys = array_map(function($val) { return $val / 8; }, $font->readUInt16Many(256)); 90 $subHeaders = array(); 91 92 $glyphIdArray = array(); 93 $maxSubHeaderIndex = max($subHeaderKeys); 94 for ($i = 0; $i <= $maxSubHeaderIndex; $i++) { 95 $subHeader = $font->unpack(self::$subtable_v2_format_subheader); 96 $offset = $font->pos(); 97 $subHeader["glyphIdArrayOffset"] = $offset + $subHeader["idRangeOffset"] - 2; 98 $subHeaders[$i] = $subHeader; 99 100 if (!\array_key_exists($subHeader["glyphIdArrayOffset"], $glyphIdArray) || count($glyphIdArray[$subHeader["glyphIdArrayOffset"]]) < $subHeader["entryCount"]) { 101 $font->seek($subHeader["glyphIdArrayOffset"]); 102 $glyphIdArray[$subHeader["glyphIdArrayOffset"]] = $font->readUInt16Many($subHeader["entryCount"]); 103 $font->seek($offset); 104 } 89 105 } 90 } 91 92 $subtable += array( 93 "startCode" => $startCodes, 94 "endCode" => $endCodes, 95 "glyphIndexArray" => $glyphIndexArray, 96 ); 97 98 } 99 else if ($subtable["format"] == 4) { 100 101 $subtable += $font->unpack(self::$subtable_v4_format); 102 103 $segCount = $subtable["segCountX2"] / 2; 104 $subtable["segCount"] = $segCount; 105 106 $endCode = $font->readUInt16Many($segCount); 107 108 $font->readUInt16(); // reservedPad 109 110 $startCode = $font->readUInt16Many($segCount); 111 $idDelta = $font->readInt16Many($segCount); 112 113 $ro_start = $font->pos(); 114 $idRangeOffset = $font->readUInt16Many($segCount); 115 116 $glyphIndexArray = array(); 117 for ($i = 0; $i < $segCount; $i++) { 118 $c1 = $startCode[$i]; 119 $c2 = $endCode[$i]; 120 $d = $idDelta[$i]; 121 $ro = $idRangeOffset[$i]; 122 123 if ($ro > 0) { 124 $font->seek($subtable["offset"] + 2 * $i + $ro); 106 107 $glyphIndexArray = array(); 108 foreach ($subHeaderKeys as $highByte => $subHeaderKey) { 109 $subHeader = $subHeaders[$subHeaderKey]; 110 if ($subHeaderKey === 0) { 111 $c = $highByte; 112 if ($c < $subHeader["firstCode"] || $c >= ($subHeader["firstCode"] + $subHeader["entryCount"])) { 113 $glyphIndexArray[$c] = 0; 114 continue; 115 } 116 $c = $highByte; 117 $index = $c - $subHeader["firstCode"]; 118 $glyphId = $glyphIdArray[$subHeader["glyphIdArrayOffset"]][$index]; 119 if ($glyphId === 0) { 120 $glyphIndexArray[$c] = 0; 121 } else { 122 $glyphIndexArray[$c] = ($glyphId + $subHeader["idDelta"]) & 0xFFFF; 123 } 124 } else { 125 for ($index = 0; $index < $subHeader["entryCount"]; $index++) { 126 $c = null; 127 $lowByte = $subHeader["firstCode"] + $index; 128 $c = (($highByte & 0xFF) << 8) | ($lowByte & 0xFF); 129 $glyphId = $glyphIdArray[$subHeader["glyphIdArrayOffset"]][$index]; 130 if ($glyphId === 0) { 131 $glyphIndexArray[$c] = 0; 132 } else { 133 $glyphIndexArray[$c] = ($glyphId + $subHeader["idDelta"]) & 0xFFFF; 134 } 135 } 136 } 125 137 } 126 138 127 for ($c = $c1; $c <= $c2; $c++) { 128 if ($ro == 0) { 129 $gid = ($c + $d) & 0xFFFF; 130 } 131 else { 132 $offset = ($c - $c1) * 2 + $ro; 133 $offset = $ro_start + 2 * $i + $offset; 134 135 $font->seek($offset); 136 $gid = $font->readUInt16(); 137 138 if ($gid != 0) { 139 $gid = ($gid + $d) & 0xFFFF; 140 } 141 } 142 143 if ($gid > 0) { 144 $glyphIndexArray[$c] = $gid; 139 $subtable += array( 140 "subHeaderKeys" => $subHeaderKeys, 141 "subHeaders" => $subHeaders, 142 "glyphIdArray" => $glyphIdArray, 143 "glyphIndexArray" => $glyphIndexArray 144 ); 145 146 break; 147 148 case 4: 149 $subtable += $font->unpack(self::$subtable_v4_format); 150 151 $segCount = $subtable["segCountX2"] / 2; 152 $subtable["segCount"] = $segCount; 153 154 $endCode = $font->readUInt16Many($segCount); 155 156 $font->readUInt16(); // reservedPad 157 158 $startCode = $font->readUInt16Many($segCount); 159 $idDelta = $font->readInt16Many($segCount); 160 161 $ro_start = $font->pos(); 162 $idRangeOffset = $font->readUInt16Many($segCount); 163 164 $glyphIndexArray = array(); 165 for ($i = 0; $i < $segCount; $i++) { 166 $c1 = $startCode[$i]; 167 $c2 = $endCode[$i]; 168 $d = $idDelta[$i]; 169 $ro = $idRangeOffset[$i]; 170 171 if ($ro > 0) { 172 $font->seek($subtable["offset"] + 2 * $i + $ro); 173 } 174 175 for ($c = $c1; $c <= $c2; $c++) { 176 if ($c === 0xFFFF) { 177 continue; 178 } 179 180 if ($ro == 0) { 181 $gid = ($c + $d) & 0xFFFF; 182 } 183 else { 184 $offset = ($c - $c1) * 2 + $ro; 185 $offset = $ro_start + 2 * $i + $offset; 186 187 $gid = 0; 188 if ($font->seek($offset) === true) { 189 $gid = $font->readUInt16(); 190 } 191 192 if ($gid != 0) { 193 $gid = ($gid + $d) & 0xFFFF; 194 } 195 } 196 197 if ($gid >= 0) { 198 $glyphIndexArray[$c] = $gid; 199 } 145 200 } 146 201 } 147 } 148 149 $subtable += array( 150 "endCode" => $endCode, 151 "startCode" => $startCode, 152 "idDelta" => $idDelta, 153 "idRangeOffset" => $idRangeOffset, 154 "glyphIndexArray" => $glyphIndexArray, 155 ); 202 203 $subtable += array( 204 "endCode" => $endCode, 205 "startCode" => $startCode, 206 "idDelta" => $idDelta, 207 "idRangeOffset" => $idRangeOffset, 208 "glyphIndexArray" => $glyphIndexArray 209 ); 210 break; 211 212 case 12: 213 $font->readUInt16(); 214 215 $subtable += $font->unpack(self::$subtable_v12_format); 216 217 $glyphIndexArray = array(); 218 $endCodes = array(); 219 $startCodes = array(); 220 221 for ($p = 0; $p < $subtable['ngroups']; $p++) { 222 223 $startCode = $startCodes[] = $font->readUInt32(); 224 $endCode = $endCodes[] = $font->readUInt32(); 225 $startGlyphCode = $font->readUInt32(); 226 227 for ($c = $startCode; $c <= $endCode; $c++) { 228 $glyphIndexArray[$c] = $startGlyphCode; 229 $startGlyphCode++; 230 } 231 } 232 233 $subtable += array( 234 "startCode" => $startCodes, 235 "endCode" => $endCodes, 236 "glyphIndexArray" => $glyphIndexArray, 237 ); 238 break; 156 239 } 157 240 } … … 197 280 } 198 281 199 $segments[][] = array(0xFFFF, 0xFFFF);282 $segments[][] = array(0xFFFF, null); 200 283 201 284 $startCode = array(); … … 283 366 $subtable["length"] = $length - $length_before; 284 367 $font->seek($before_subheader); 285 $ length += $font->pack(self::$subtable_v4_format, $subtable);368 $font->pack(self::$subtable_v4_format, $subtable); 286 369 287 370 $font->seek($after_subtable); -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/glyf.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 49 49 } 50 50 51 public function toHTML( ) {51 public function toHTML($n = 500) { 52 52 $max = 160; 53 53 $font = $this->getFont(); … … 74 74 $height = round($height / $ratio); 75 75 } 76 77 $n = 500;78 76 79 77 $s = "<h3>" . "Only the first $n simple glyphs are shown (" . count($this->data) . " total) … … 112 110 $char = $char ? "&#{$glyphIndexArray[$g]};" : ""; 113 111 112 if ($char === "" && empty($shape["SVGContours"])) { 113 $n++; 114 continue; 115 } 116 114 117 $s .= "<div class='glyph-view $type' id='glyph-$g'> 115 118 <span class='glyph-id'>$g</span> … … 144 147 foreach ($subset as $gid) { 145 148 $loca[] = $length; 146 $length += $data[$gid]->encode(); 149 150 $bytes = $data[$gid]->encode(); 151 152 $pad = 0; 153 $mod = $bytes % 4; 154 if ($mod != 0) { 155 $pad = 4 - $mod; 156 $font->write(str_pad("", $pad, "\0"), $pad); 157 } 158 $length += $bytes + $pad; 147 159 } 148 160 -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/head.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 44 44 } 45 45 } 46 47 function _encode() { 48 $this->data["checkSumAdjustment"] = 0; 49 return parent::_encode(); 50 } 46 51 } -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/hhea.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/hmtx.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 36 36 37 37 if ($numOfLongHorMetrics < $numGlyphs) { 38 $lastWidth = end($data); 39 $data = array_pad($data, $numGlyphs, $lastWidth); 38 $lastWidth = end($data)[0]; 39 $numLeft = $numGlyphs - $numOfLongHorMetrics; 40 $metrics = $font->readUInt16Many($numLeft); 41 for($i = 0; $i < $numLeft; $i++) { 42 $gid = $numOfLongHorMetrics + $i; 43 $leftSideBearing = isset($metrics[$i]) ? $metrics[$i] : 0; 44 $data[$gid] = array($lastWidth, $leftSideBearing); 45 } 40 46 } 41 47 -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/kern.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/loca.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/maxp.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/name.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 151 151 } 152 152 153 $system_encodings = mb_list_encodings(); 154 $system_encodings = array_change_key_case(array_fill_keys($system_encodings, true), CASE_UPPER); 155 153 156 $names = array(); 154 157 foreach ($records as $record) { 155 158 $font->seek($tableOffset + $data["stringOffset"] + $record->offset); 156 $s = $font->read($record->length); 157 $record->string = Font::UTF16ToUTF8($s); 159 $record->stringRaw = $font->read($record->length); 160 161 $encoding = null; 162 switch ($record->platformID) { 163 case 3: 164 switch ($record->platformSpecificID) { 165 case 2: 166 if (\array_key_exists("SJIS", $system_encodings)) { 167 $encoding = "SJIS"; 168 } 169 break; 170 case 3: 171 if (\array_key_exists("GB18030", $system_encodings)) { 172 $encoding = "GB18030"; 173 } 174 break; 175 case 4: 176 if (\array_key_exists("BIG-5", $system_encodings)) { 177 $encoding = "BIG-5"; 178 } 179 break; 180 case 5: 181 if (\array_key_exists("UHC", $system_encodings)) { 182 $encoding = "UHC"; 183 } 184 break; 185 } 186 break; 187 } 188 if ($encoding === null) { 189 $encoding = "UTF-16"; 190 } 191 192 $record->string = mb_convert_encoding($record->stringRaw, "UTF-8", $encoding); 193 if (strpos($record->string, "\0") !== false) { 194 $record->string = str_replace("\0", "", $record->string); 195 } 158 196 $names[$record->nameID] = $record; 159 197 } … … 169 207 /** @var nameRecord[] $records */ 170 208 $records = $this->data["records"]; 171 $count_records = count($records);209 $count_records = \count($records); 172 210 173 211 $this->data["count"] = $count_records; 174 $this->data["stringOffset"] = 6 + $count_records * 12; // 6 => uint16 * 3, 12 => sizeof self::$record_format212 $this->data["stringOffset"] = 6 + ($count_records * 12); // 6 => uint16 * 3, 12 => sizeof self::$record_format 175 213 176 214 $length = $font->pack(self::$header_format, $this->data); 177 215 178 216 $offset = 0; 217 218 /** @var nameRecord[] $records_to_encode */ 219 $records_to_encode = array(); 179 220 foreach ($records as $record) { 180 $record->length = mb_strlen($record->getUTF16(), "8bit"); 181 $record->offset = $offset; 182 $offset += $record->length; 183 $length += $font->pack(nameRecord::$format, (array)$record); 184 } 185 186 foreach ($records as $record) { 221 $encoded_record = new nameRecord(); 222 $encoded_record->platformID = 3; 223 $encoded_record->platformSpecificID = 1; 224 $encoded_record->languageID = $record->languageID; 225 $encoded_record->nameID = $record->nameID; 226 $encoded_record->offset = $offset; 227 $encoded_record->string = $record->string; 228 $encoded_record->length = mb_strlen($encoded_record->getUTF16(), "8bit"); 229 $records_to_encode[] = $encoded_record; 230 231 $offset += $encoded_record->length; 232 $length += $font->pack(nameRecord::$format, (array)$encoded_record); 233 } 234 235 foreach ($records_to_encode as $record) { 187 236 $str = $record->getUTF16(); 188 237 $length += $font->write($str, mb_strlen($str, "8bit")); -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/nameRecord.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 24 24 public $offset; 25 25 public $string; 26 public $stringRaw; 26 27 27 28 public static $format = array( -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/os2.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/Table/Type/post.php
r2672742 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/TrueType/Collection.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/TrueType/File.php
r2672742 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 102 102 ); 103 103 104 private function uniord (string $c, string $encoding = null) { 105 if (function_exists("mb_ord")) { 106 if (PHP_VERSION_ID < 80000 && $encoding === null) { 107 // in PHP < 8 the encoding argument, if supplied, must be a valid encoding 108 $encoding = "UTF-8"; 109 } 110 return mb_ord($c, $encoding); 111 } 112 113 if ($encoding != "UTF-8" && $encoding !== null) { 114 $c = mb_convert_encoding($c, "UTF-8", $encoding); 115 } 116 117 $length = mb_strlen(mb_substr($c, 0, 1), '8bit'); 118 $ord = false; 119 $bytes = []; 120 $numbytes = 1; 121 for ($i = 0; $i < $length; $i++) { 122 $o = \ord($c[$i]); // get one string character at time 123 if (\count($bytes) === 0) { // get starting octect 124 if ($o <= 0x7F) { 125 $ord = $o; 126 $numbytes = 1; 127 } elseif (($o >> 0x05) === 0x06) { // 2 bytes character (0x06 = 110 BIN) 128 $bytes[] = ($o - 0xC0) << 0x06; 129 $numbytes = 2; 130 } elseif (($o >> 0x04) === 0x0E) { // 3 bytes character (0x0E = 1110 BIN) 131 $bytes[] = ($o - 0xE0) << 0x0C; 132 $numbytes = 3; 133 } elseif (($o >> 0x03) === 0x1E) { // 4 bytes character (0x1E = 11110 BIN) 134 $bytes[] = ($o - 0xF0) << 0x12; 135 $numbytes = 4; 136 } else { 137 $ord = false; 138 break; 139 } 140 } elseif (($o >> 0x06) === 0x02) { // bytes 2, 3 and 4 must start with 0x02 = 10 BIN 141 $bytes[] = $o - 0x80; 142 if (\count($bytes) === $numbytes) { 143 // compose UTF-8 bytes to a single unicode value 144 $o = $bytes[0]; 145 for ($j = 1; $j < $numbytes; $j++) { 146 $o += ($bytes[$j] << (($numbytes - $j - 1) * 0x06)); 147 } 148 if ((($o >= 0xD800) and ($o <= 0xDFFF)) or ($o >= 0x10FFFF)) { 149 // The definition of UTF-8 prohibits encoding character numbers between 150 // U+D800 and U+DFFF, which are reserved for use with the UTF-16 151 // encoding form (as surrogate pairs) and do not directly represent 152 // characters. 153 return false; 154 } else { 155 $ord = $o; // add char to array 156 } 157 // reset data for next char 158 $bytes = []; 159 $numbytes = 1; 160 } 161 } else { 162 $ord = false; 163 break; 164 } 165 } 166 167 return $ord; 168 } 169 104 170 function getTable() { 105 171 $this->parseTableEntries(); … … 158 224 $subtable = null; 159 225 foreach ($this->getData("cmap", "subtables") as $_subtable) { 160 if ($_subtable["platformID"] == 0 || $_subtable["platformID"] == 3 && $_subtable["platformSpecificID"] == 1) {226 if ($_subtable["platformID"] == 0 || ($_subtable["platformID"] == 3 && $_subtable["platformSpecificID"] == 1)) { 161 227 $subtable = $_subtable; 162 228 break; … … 168 234 } 169 235 236 $system_encodings = mb_list_encodings(); 237 $system_encodings = array_change_key_case(array_fill_keys($system_encodings, true), CASE_UPPER); 238 foreach ($this->getData("cmap", "subtables") as $_subtable) { 239 $encoding = null; 240 switch ($_subtable["platformID"]) { 241 case 3: 242 switch ($_subtable["platformSpecificID"]) { 243 case 2: 244 if (\array_key_exists("SJIS", $system_encodings)) { 245 $encoding = "SJIS"; 246 } 247 break; 248 case 3: 249 if (\array_key_exists("GB18030", $system_encodings)) { 250 $encoding = "GB18030"; 251 } 252 break; 253 case 4: 254 if (\array_key_exists("BIG-5", $system_encodings)) { 255 $encoding = "BIG-5"; 256 } 257 break; 258 case 5: 259 if (\array_key_exists("UHC", $system_encodings)) { 260 $encoding = "UHC"; 261 } 262 break; 263 } 264 break; 265 } 266 if ($encoding) { 267 $glyphIndexArray = array(); 268 foreach ($_subtable["glyphIndexArray"] as $c => $gid) { 269 $str = trim(pack("N", $c)); 270 if (\strlen($str) > 0) { 271 $ord = $this->uniord($str, $encoding); 272 if ($ord > 0) { 273 $glyphIndexArray[$ord] = $gid; 274 } 275 } 276 } 277 return $glyphIndexArray; 278 } 279 } 280 170 281 return null; 171 282 } … … 218 329 function encode($tags = array()) { 219 330 if (!self::$raw) { 220 $tags = array_merge(array("head", "hhea", "cmap", "hmtx", "maxp", "glyf", "loca", "name", "post" ), $tags);331 $tags = array_merge(array("head", "hhea", "cmap", "hmtx", "maxp", "glyf", "loca", "name", "post", "cvt ", "fpgm", "prep"), $tags); 221 332 } 222 333 else { … … 224 335 } 225 336 226 $num_tables = count($tags);227 337 $n = 16; // @todo 228 338 … … 240 350 } 241 351 352 $num_tables = count($entries); 353 $exponent = floor(log($num_tables, 2)); 354 $power_of_two = pow(2, $exponent); 355 242 356 $this->header->data["numTables"] = $num_tables; 357 $this->header->data["searchRange"] = $power_of_two * 16; 358 $this->header->data["entrySelector"] = log($power_of_two, 2); 359 $this->header->data["rangeShift"] = $num_tables * 16 - $this->header->data["searchRange"]; 243 360 $this->header->encode(); 244 361 -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/TrueType/Header.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/TrueType/TableDirectoryEntry.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/WOFF/File.php
r2672742 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/WOFF/Header.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-font-lib/src/FontLib/WOFF/TableDirectoryEntry.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-svg-lib/src/Svg/Document.php
r2900363 r3024399 53 53 /** @var \Sabberworm\CSS\CSSList\Document[] */ 54 54 protected $styleSheets = array(); 55 56 public $allowExternalReferences = true; 55 57 56 58 public function loadFile($filename) -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-svg-lib/src/Svg/Style.php
r2900363 r3024399 139 139 break; 140 140 } 141 } 142 143 if ( 144 \array_key_exists("font-family", $styles) 145 && ( 146 \strtolower(\substr($this->href, 0, 7)) === "phar://" 147 || ($this->document->allowExternalReferences === false && \strtolower(\substr($this->href, 0, 5)) !== "data:") 148 ) 149 ) { 150 unset($style["font-family"]); 141 151 } 142 152 } -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-svg-lib/src/Svg/Tag/Image.php
r2900363 r3024399 59 59 $this->document->getSurface()->transform(1, 0, 0, -1, 0, $height); 60 60 61 if (\strtolower(\substr($this->href, 0, 7)) === "phar://" || ($this->document->allowExternalReferences === false && \strtolower(\substr($this->href, 0, 5) !== "data:"))) { 62 return; 63 } 64 61 65 $this->document->getSurface()->drawImage($this->href, $this->x, $this->y, $this->width, $this->height); 62 66 } -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/vendor/phenx/php-svg-lib/src/Svg/Tag/UseTag.php
r2900363 r3024399 15 15 protected $width; 16 16 protected $height; 17 protected $instances = 0; 17 18 18 19 /** @var AbstractTag */ … … 21 22 protected function before($attributes) 22 23 { 24 $this->instances++; 25 if ($this->instances > 1) { 26 //TODO: log circular reference error state 27 return; 28 } 29 23 30 if (isset($attributes['x'])) { 24 31 $this->x = $attributes['x']; … … 53 60 54 61 protected function after() { 62 if ($this->instances > 0) { 63 return; 64 } 55 65 parent::after(); 56 66 … … 64 74 public function handle($attributes) 65 75 { 76 if ($this->instances > 1) { 77 //TODO: log circular reference error state 78 return; 79 } 80 66 81 parent::handle($attributes); 67 82 … … 71 86 72 87 $mergedAttributes = $this->reference->attributes; 73 $attributesToNotMerge = ['x', 'y', 'width', 'height' ];88 $attributesToNotMerge = ['x', 'y', 'width', 'height', 'href', 'xlink:href', 'id']; 74 89 foreach ($attributes as $attrKey => $attrVal) { 75 90 if (!in_array($attrKey, $attributesToNotMerge) && !isset($mergedAttributes[$attrKey])) { … … 88 103 public function handleEnd() 89 104 { 105 $this->instances--; 106 if ($this->instances > 0) { 107 return; 108 } 109 90 110 parent::handleEnd(); 91 111 -
wpwing-pdf-invoice-packing-slip-for-woocommerce/tags/1.4.1/wpwing-pdf-invoice-packing-slip-for-woocommerce.php
r2927383 r3024399 5 5 * Plugin URI: https://wpwing.com/ 6 6 * Description: Download your WooCommerce order invoice and packing slip as PDF format for print or email. 7 * Version: 1.4. 07 * Version: 1.4.1 8 8 * Author: WPWing 9 9 * Author URI: https://wpwing.com/ 10 10 * Requires PHP: 7.1 11 11 * Requires at least: 4.8 12 * Tested up to: 6. 212 * Tested up to: 6.4 13 13 * WC requires at least: 4.5 14 * WC tested up to: 7.814 * WC tested up to: 8.5 15 15 * License: GPL-3.0-or-later 16 16 * License URI: https://www.gnu.org/licenses/gpl-3.0.html -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/readme.txt
r2927383 r3024399 5 5 Tags: PDF, Invoice, Packing Slip, Packing List, Proforma Invoice, Delivery Notes, Shipping Labels, WooCommerce, WPWing 6 6 Requires at least: 4.8 7 Tested up to: 6. 27 Tested up to: 6.4 8 8 Requires PHP: 7.1 9 Stable tag: 1.4. 09 Stable tag: 1.4.1 10 10 License: GPL-3.0-or-later 11 11 License URI: https://www.gnu.org/licenses/gpl-3.0.html 12 12 13 Want to print your WooCommerce order invoice or packing slip? Or download them in PDF format? You are in the right place! With WooCommerce you will feel the lack ingof print invoices or packing lists, which we are happy to fulfill. **WPWing PDF Invoice and Packing Slip for WooCommerce** can download your WooCommerce order invoice and packing slip in PDF format for print or email.13 Want to print your WooCommerce order invoice or packing slip? Or download them in PDF format? You are in the right place! With WooCommerce you will feel the lack of print invoices or packing lists, which we are happy to fulfill. **WPWing PDF Invoice and Packing Slip for WooCommerce** can download your WooCommerce order invoice and packing slip in PDF format for print or email. 14 14 15 15 … … 18 18 = Must have plugin for WooCommerce with tremendous support = 19 19 20 Want to print your WooCommerce order invoice or packing slip? Or download them in PDF format? You are in the right place! With WooCommerce you will feel the lack ingof print invoices or packing lists, which we are happy to fulfill. **WPWing PDF Invoice and Packing Slip for WooCommerce** can download your WooCommerce order invoice and packing slip in PDF format for print or email.20 Want to print your WooCommerce order invoice or packing slip? Or download them in PDF format? You are in the right place! With WooCommerce you will feel the lack of print invoices or packing lists, which we are happy to fulfill. **WPWing PDF Invoice and Packing Slip for WooCommerce** can download your WooCommerce order invoice and packing slip in PDF format for print or email. 21 21 22 ✅ Tested OK with WooCommerce 6.522 ✅ Tested OK with WooCommerce 8.5 23 23 24 24 ### 🔥 FEATURES: ### … … 73 73 == Changelog == 74 74 75 = 1.4.1 - 20/01/2024 76 77 * Update: DOM PDF version 2.0.4 78 * Compatibility check with WP's latest version. 79 * Compatibility check with WC's latest version. 80 * Few minor improvements. 81 75 82 = 1.4.0 - 17/06/2023 76 83 77 * Update: Remove WPWing prefix from plugin name84 * Update: Remove WPWing prefix from the plugin name 78 85 * Update: Invoice and Packing slip open in new tab 79 86 * Few minor improvements. -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/autoload.php
r2900363 r3024399 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit 02775e21763226d85a226d55c9acfc98::getLoader();7 return ComposerAutoloaderInitbf78a1f8678d210391362580614bce81::getLoader(); -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/composer/autoload_real.php
r2900363 r3024399 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 02775e21763226d85a226d55c9acfc985 class ComposerAutoloaderInitbf78a1f8678d210391362580614bce81 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 02775e21763226d85a226d55c9acfc98', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInitbf78a1f8678d210391362580614bce81', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); 29 spl_autoload_unregister(array('ComposerAutoloaderInit 02775e21763226d85a226d55c9acfc98', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInitbf78a1f8678d210391362580614bce81', 'loadClassLoader')); 30 30 31 31 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 33 33 require __DIR__ . '/autoload_static.php'; 34 34 35 call_user_func(\Composer\Autoload\ComposerStaticInit 02775e21763226d85a226d55c9acfc98::getInitializer($loader));35 call_user_func(\Composer\Autoload\ComposerStaticInitbf78a1f8678d210391362580614bce81::getInitializer($loader)); 36 36 } else { 37 37 $map = require __DIR__ . '/autoload_namespaces.php'; -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/composer/autoload_static.php
r2900363 r3024399 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 02775e21763226d85a226d55c9acfc987 class ComposerStaticInitbf78a1f8678d210391362580614bce81 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 58 58 { 59 59 return \Closure::bind(function () use ($loader) { 60 $loader->prefixLengthsPsr4 = ComposerStaticInit 02775e21763226d85a226d55c9acfc98::$prefixLengthsPsr4;61 $loader->prefixDirsPsr4 = ComposerStaticInit 02775e21763226d85a226d55c9acfc98::$prefixDirsPsr4;62 $loader->classMap = ComposerStaticInit 02775e21763226d85a226d55c9acfc98::$classMap;60 $loader->prefixLengthsPsr4 = ComposerStaticInitbf78a1f8678d210391362580614bce81::$prefixLengthsPsr4; 61 $loader->prefixDirsPsr4 = ComposerStaticInitbf78a1f8678d210391362580614bce81::$prefixDirsPsr4; 62 $loader->classMap = ComposerStaticInitbf78a1f8678d210391362580614bce81::$classMap; 63 63 64 64 }, null, ClassLoader::class); -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/composer/installed.json
r2900363 r3024399 3 3 { 4 4 "name": "dompdf/dompdf", 5 "version": "v2.0. 3",6 "version_normalized": "2.0. 3.0",5 "version": "v2.0.4", 6 "version_normalized": "2.0.4.0", 7 7 "source": { 8 8 "type": "git", 9 9 "url": "https://github.com/dompdf/dompdf.git", 10 "reference": " e8d2d5e37e8b0b30f0732a011295ab80680d7e85"11 }, 12 "dist": { 13 "type": "zip", 14 "url": "https://api.github.com/repos/dompdf/dompdf/zipball/ e8d2d5e37e8b0b30f0732a011295ab80680d7e85",15 "reference": " e8d2d5e37e8b0b30f0732a011295ab80680d7e85",10 "reference": "093f2d9739cec57428e39ddadedfd4f3ae862c0f" 11 }, 12 "dist": { 13 "type": "zip", 14 "url": "https://api.github.com/repos/dompdf/dompdf/zipball/093f2d9739cec57428e39ddadedfd4f3ae862c0f", 15 "reference": "093f2d9739cec57428e39ddadedfd4f3ae862c0f", 16 16 "shasum": "" 17 17 }, … … 37 37 "ext-zlib": "Needed for pdf stream compression" 38 38 }, 39 "time": "2023- 02-07T12:51:48+00:00",39 "time": "2023-12-12T20:19:39+00:00", 40 40 "type": "library", 41 41 "installation-source": "dist", … … 62 62 "support": { 63 63 "issues": "https://github.com/dompdf/dompdf/issues", 64 "source": "https://github.com/dompdf/dompdf/tree/v2.0. 3"64 "source": "https://github.com/dompdf/dompdf/tree/v2.0.4" 65 65 }, 66 66 "install-path": "../dompdf/dompdf" … … 68 68 { 69 69 "name": "masterminds/html5", 70 "version": "2. 7.6",71 "version_normalized": "2. 7.6.0",70 "version": "2.8.1", 71 "version_normalized": "2.8.1.0", 72 72 "source": { 73 73 "type": "git", 74 74 "url": "https://github.com/Masterminds/html5-php.git", 75 "reference": "897eb517a343a2281f11bc5556d6548db7d93947" 76 }, 77 "dist": { 78 "type": "zip", 79 "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/897eb517a343a2281f11bc5556d6548db7d93947", 80 "reference": "897eb517a343a2281f11bc5556d6548db7d93947", 81 "shasum": "" 82 }, 83 "require": { 84 "ext-ctype": "*", 75 "reference": "f47dcf3c70c584de14f21143c55d9939631bc6cf" 76 }, 77 "dist": { 78 "type": "zip", 79 "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f47dcf3c70c584de14f21143c55d9939631bc6cf", 80 "reference": "f47dcf3c70c584de14f21143c55d9939631bc6cf", 81 "shasum": "" 82 }, 83 "require": { 85 84 "ext-dom": "*", 86 "ext-libxml": "*",87 85 "php": ">=5.3.0" 88 86 }, 89 87 "require-dev": { 90 "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 "91 }, 92 "time": "202 2-08-18T16:18:26+00:00",88 "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8" 89 }, 90 "time": "2023-05-10T11:58:31+00:00", 93 91 "type": "library", 94 92 "extra": { … … 134 132 "support": { 135 133 "issues": "https://github.com/Masterminds/html5-php/issues", 136 "source": "https://github.com/Masterminds/html5-php/tree/2. 7.6"134 "source": "https://github.com/Masterminds/html5-php/tree/2.8.1" 137 135 }, 138 136 "install-path": "../masterminds/html5" … … 140 138 { 141 139 "name": "phenx/php-font-lib", 142 "version": "0.5. 4",143 "version_normalized": "0.5. 4.0",140 "version": "0.5.5", 141 "version_normalized": "0.5.5.0", 144 142 "source": { 145 143 "type": "git", 146 144 "url": "https://github.com/dompdf/php-font-lib.git", 147 "reference": " dd448ad1ce34c63d09baccd05415e361300c35b4"148 }, 149 "dist": { 150 "type": "zip", 151 "url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/ dd448ad1ce34c63d09baccd05415e361300c35b4",152 "reference": " dd448ad1ce34c63d09baccd05415e361300c35b4",145 "reference": "671df0f3516252011aa94f9e8e3b3b66199339f8" 146 }, 147 "dist": { 148 "type": "zip", 149 "url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/671df0f3516252011aa94f9e8e3b3b66199339f8", 150 "reference": "671df0f3516252011aa94f9e8e3b3b66199339f8", 153 151 "shasum": "" 154 152 }, … … 157 155 }, 158 156 "require-dev": { 159 "symfony/phpunit-bridge": "^3 || ^4 || ^5 "160 }, 161 "time": "202 1-12-17T19:44:54+00:00",157 "symfony/phpunit-bridge": "^3 || ^4 || ^5 || ^6" 158 }, 159 "time": "2024-01-07T18:13:29+00:00", 162 160 "type": "library", 163 161 "installation-source": "dist", … … 169 167 "notification-url": "https://packagist.org/downloads/", 170 168 "license": [ 171 "LGPL- 3.0"169 "LGPL-2.1-or-later" 172 170 ], 173 171 "authors": [ … … 181 179 "support": { 182 180 "issues": "https://github.com/dompdf/php-font-lib/issues", 183 "source": "https://github.com/dompdf/php-font-lib/tree/0.5. 4"181 "source": "https://github.com/dompdf/php-font-lib/tree/0.5.5" 184 182 }, 185 183 "install-path": "../phenx/php-font-lib" … … 187 185 { 188 186 "name": "phenx/php-svg-lib", 189 "version": "0.5. 0",190 "version_normalized": "0.5. 0.0",187 "version": "0.5.1", 188 "version_normalized": "0.5.1.0", 191 189 "source": { 192 190 "type": "git", 193 191 "url": "https://github.com/dompdf/php-svg-lib.git", 194 "reference": " 76876c6cf3080bcb6f249d7d59705108166a6685"195 }, 196 "dist": { 197 "type": "zip", 198 "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/ 76876c6cf3080bcb6f249d7d59705108166a6685",199 "reference": " 76876c6cf3080bcb6f249d7d59705108166a6685",192 "reference": "8a8a1ebcf6aea861ef30197999f096f7bd4b4456" 193 }, 194 "dist": { 195 "type": "zip", 196 "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/8a8a1ebcf6aea861ef30197999f096f7bd4b4456", 197 "reference": "8a8a1ebcf6aea861ef30197999f096f7bd4b4456", 200 198 "shasum": "" 201 199 }, … … 208 206 "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5" 209 207 }, 210 "time": "202 2-09-06T12:16:56+00:00",208 "time": "2023-12-11T20:56:08+00:00", 211 209 "type": "library", 212 210 "installation-source": "dist", … … 230 228 "support": { 231 229 "issues": "https://github.com/dompdf/php-svg-lib/issues", 232 "source": "https://github.com/dompdf/php-svg-lib/tree/0.5. 0"230 "source": "https://github.com/dompdf/php-svg-lib/tree/0.5.1" 233 231 }, 234 232 "install-path": "../phenx/php-svg-lib" -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/composer/installed.php
r2927383 r3024399 6 6 'install_path' => __DIR__ . '/../../', 7 7 'aliases' => array(), 8 'reference' => ' 73e7da86a1b51ee4c3594d66d3281f361cd3753d',8 'reference' => 'feb79eda7375cc2bdf54e38dc5c640dd62a0b663', 9 9 'name' => '__root__', 10 10 'dev' => true, … … 17 17 'install_path' => __DIR__ . '/../../', 18 18 'aliases' => array(), 19 'reference' => ' 73e7da86a1b51ee4c3594d66d3281f361cd3753d',19 'reference' => 'feb79eda7375cc2bdf54e38dc5c640dd62a0b663', 20 20 'dev_requirement' => false, 21 21 ), 22 22 'dompdf/dompdf' => array( 23 'pretty_version' => 'v2.0. 3',24 'version' => '2.0. 3.0',23 'pretty_version' => 'v2.0.4', 24 'version' => '2.0.4.0', 25 25 'type' => 'library', 26 26 'install_path' => __DIR__ . '/../dompdf/dompdf', 27 27 'aliases' => array(), 28 'reference' => ' e8d2d5e37e8b0b30f0732a011295ab80680d7e85',28 'reference' => '093f2d9739cec57428e39ddadedfd4f3ae862c0f', 29 29 'dev_requirement' => false, 30 30 ), 31 31 'masterminds/html5' => array( 32 'pretty_version' => '2. 7.6',33 'version' => '2. 7.6.0',32 'pretty_version' => '2.8.1', 33 'version' => '2.8.1.0', 34 34 'type' => 'library', 35 35 'install_path' => __DIR__ . '/../masterminds/html5', 36 36 'aliases' => array(), 37 'reference' => ' 897eb517a343a2281f11bc5556d6548db7d93947',37 'reference' => 'f47dcf3c70c584de14f21143c55d9939631bc6cf', 38 38 'dev_requirement' => false, 39 39 ), 40 40 'phenx/php-font-lib' => array( 41 'pretty_version' => '0.5. 4',42 'version' => '0.5. 4.0',41 'pretty_version' => '0.5.5', 42 'version' => '0.5.5.0', 43 43 'type' => 'library', 44 44 'install_path' => __DIR__ . '/../phenx/php-font-lib', 45 45 'aliases' => array(), 46 'reference' => ' dd448ad1ce34c63d09baccd05415e361300c35b4',46 'reference' => '671df0f3516252011aa94f9e8e3b3b66199339f8', 47 47 'dev_requirement' => false, 48 48 ), 49 49 'phenx/php-svg-lib' => array( 50 'pretty_version' => '0.5. 0',51 'version' => '0.5. 0.0',50 'pretty_version' => '0.5.1', 51 'version' => '0.5.1.0', 52 52 'type' => 'library', 53 53 'install_path' => __DIR__ . '/../phenx/php-svg-lib', 54 54 'aliases' => array(), 55 'reference' => ' 76876c6cf3080bcb6f249d7d59705108166a6685',55 'reference' => '8a8a1ebcf6aea861ef30197999f096f7bd4b4456', 56 56 'dev_requirement' => false, 57 57 ), -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/dompdf/dompdf/VERSION
r2900363 r3024399 1 2.0. 31 2.0.4 -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/dompdf/dompdf/src/Image/Cache.php
r2900363 r3024399 33 33 34 34 /** 35 * Array of image references from an SVG document. 36 * Used to detect circular references across SVG documents. 37 * 38 * @var array 39 */ 40 protected static $svgRefs = []; 41 42 /** 35 43 * The url to the "broken image" used when images can't be loaded 36 44 * … … 135 143 function ($parser, $name, $attributes) use ($options, $parsed_url, $full_url) { 136 144 if (strtolower($name) === "image") { 145 if (!\array_key_exists($full_url, self::$svgRefs)) { 146 self::$svgRefs[$full_url] = []; 147 } 137 148 $attributes = array_change_key_case($attributes, CASE_LOWER); 138 149 $urls = []; … … 140 151 $urls[] = $attributes["href"] ?? ""; 141 152 foreach ($urls as $url) { 142 if (!empty($url)) { 143 $inner_full_url = Helpers::build_url($parsed_url["protocol"], $parsed_url["host"], $parsed_url["path"], $url); 144 if ($inner_full_url === $full_url) { 145 throw new ImageException("SVG self-reference is not allowed", E_WARNING); 146 } 147 [$resolved_url, $type, $message] = self::resolve_url($url, $parsed_url["protocol"], $parsed_url["host"], $parsed_url["path"], $options); 148 if (!empty($message)) { 149 throw new ImageException("This SVG document references a restricted resource. $message", E_WARNING); 150 } 153 if (empty($url)) { 154 continue; 155 } 156 157 $inner_full_url = Helpers::build_url($parsed_url["protocol"], $parsed_url["host"], $parsed_url["path"], $url); 158 if (empty($inner_full_url)) { 159 continue; 160 } 161 162 self::detectCircularRef($full_url, $inner_full_url); 163 self::$svgRefs[$full_url][] = $inner_full_url; 164 [$resolved_url, $type, $message] = self::resolve_url($url, $parsed_url["protocol"], $parsed_url["host"], $parsed_url["path"], $options); 165 if (!empty($message)) { 166 throw new ImageException("This SVG document references a restricted resource. $message", E_WARNING); 151 167 } 152 168 } … … 179 195 } 180 196 197 static function detectCircularRef(string $src, string $target) 198 { 199 if (!\array_key_exists($target, self::$svgRefs)) { 200 return; 201 } 202 foreach (self::$svgRefs[$target] as $ref) { 203 if ($ref === $src) { 204 throw new ImageException("Circular external SVG image reference detected.", E_WARNING); 205 } 206 self::detectCircularRef($src, $ref); 207 } 208 } 209 181 210 /** 182 211 * Register a temp file for the given original image file. … … 240 269 self::$_cache = []; 241 270 self::$tempImages = []; 271 self::$svgRefs = []; 242 272 } 243 273 -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/masterminds/html5/README.md
r2900365 r3024399 190 190 interpreter. While one may be supplied, not all features will be 191 191 supported. 192 - Re ntrance: The current parser is not re-entrant. (Thus you can't pause192 - Reentrance: The current parser is not re-entrant. (Thus you can't pause 193 193 the parser to modify the HTML string mid-parse.) 194 194 - Validation: The current tree builder is **not** a validating parser. -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/masterminds/html5/composer.json
r2900365 r3024399 21 21 ], 22 22 "require" : { 23 "ext-ctype": "*",24 23 "ext-dom": "*", 25 "ext-libxml" : "*",26 24 "php" : ">=5.3.0" 27 25 }, 28 26 "require-dev": { 29 "phpunit/phpunit" : "^4.8.35 || ^5.7.21 || ^6 || ^7 "27 "phpunit/phpunit" : "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8" 30 28 }, 31 29 "autoload": { -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/masterminds/html5/src/HTML5/Elements.php
r2900365 r3024399 186 186 'ul' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG 187 187 'var' => 1, 188 'video' => 65, // NORMAL | BLOCK_TAG188 'video' => 1, 189 189 'wbr' => 9, // NORMAL | VOID_TAG 190 190 -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php
r2900365 r3024399 132 132 $tok = $this->scanner->next(); 133 133 134 if ('!' === $tok) { 134 if (false === $tok) { 135 // end of string 136 $this->parseError('Illegal tag opening'); 137 } elseif ('!' === $tok) { 135 138 $this->markupDeclaration(); 136 139 } elseif ('/' === $tok) { … … 138 141 } elseif ('?' === $tok) { 139 142 $this->processingInstruction(); 140 } elseif ( ctype_alpha($tok)) {143 } elseif ($this->is_alpha($tok)) { 141 144 $this->tagName(); 142 145 } else { … … 348 351 // EOF -> parse error 349 352 // -> parse error 350 if (! ctype_alpha($tok)) {353 if (!$this->is_alpha($tok)) { 351 354 $this->parseError("Expected tag name, got '%s'", $tok); 352 355 if ("\0" == $tok || false === $tok) { … … 1195 1198 return '&'; 1196 1199 } 1200 1201 /** 1202 * Checks whether a (single-byte) character is an ASCII letter or not. 1203 * 1204 * @param string $input A single-byte string 1205 * 1206 * @return bool True if it is a letter, False otherwise 1207 */ 1208 protected function is_alpha($input) 1209 { 1210 $code = ord($input); 1211 1212 return ($code >= 97 && $code <= 122) || ($code >= 65 && $code <= 90); 1213 } 1197 1214 } -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/masterminds/html5/src/HTML5/Parser/UTF8Utils.php
r2900365 r3024399 39 39 /** 40 40 * Count the number of characters in a string. 41 * UTF-8 aware. This will try (in order) iconv, MB, libxml,and finally a custom counter.41 * UTF-8 aware. This will try (in order) iconv, MB, and finally a custom counter. 42 42 * 43 43 * @param string $string … … 54 54 if (function_exists('iconv_strlen')) { 55 55 return iconv_strlen($string, 'utf-8'); 56 }57 58 if (function_exists('utf8_decode')) {59 // MPB: Will this work? Won't certain decodes lead to two chars60 // extrapolated out of 2-byte chars?61 return strlen(utf8_decode($string));62 56 } 63 57 -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/README.md
r2672742 r3024399 9 9 * Make an Adobe Font Metrics (AFM) file from a font 10 10 11 You can find a demo GUI [here](http://pxd.me/php-font-lib/www/font_explorer.html).12 13 11 This project was initiated by the need to read font files in the [DOMPDF project](https://github.com/dompdf/dompdf). 14 12 … … 16 14 ------------- 17 15 18 ``` 19 $font = \FontLib\Font::load('../../fontfile.ttf'); 16 ### Base font information 17 18 ```php 19 $font = \FontLib\Font::load('fontfile.ttf'); 20 20 $font->parse(); // for getFontWeight() to work this call must be done first! 21 21 echo $font->getFontName() .'<br>'; … … 26 26 echo $font->getFontWeight() .'<br>'; 27 27 echo $font->getFontPostscriptName() .'<br>'; 28 $font->close(); 28 29 ``` 30 31 ### Font Metrics Generation 32 33 ```php 34 $font = FontLib\Font::load('fontfile.ttf'); 35 $font->parse(); 36 $font->saveAdobeFontMetrics('fontfile.ufm'); 37 ``` 38 39 ### Create a font subset 40 41 ```php 42 $font = FontLib\Font::load('fontfile.ttf'); 43 $font->parse(); 44 $font->setSubset("abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ.:,;' (!?)+-*/== 1234567890"); // characters to include 45 $font->reduce(); 46 touch('fontfile.subset.ttf'); 47 $font->open('fontfile.subset.ttf', FontLib\BinaryStream::modeReadWrite); 48 $font->encode(array("OS/2")); 49 $font->close(); 50 ``` -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/composer.json
r2672742 r3024399 4 4 "description": "A library to read, parse, export and make subsets of different types of font files.", 5 5 "homepage": "https://github.com/PhenX/php-font-lib", 6 "license": "LGPL- 3.0",6 "license": "LGPL-2.1-or-later", 7 7 "authors": [ 8 8 { … … 28 28 }, 29 29 "require-dev": { 30 "symfony/phpunit-bridge" : "^3 || ^4 || ^5 "30 "symfony/phpunit-bridge" : "^3 || ^4 || ^5 || ^6" 31 31 } 32 32 } -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/AdobeFontMetrics.php
r2672742 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 49 49 $this->startSection("FontMetrics", 4.1); 50 50 $this->addPair("Notice", "Converted by PHP-font-lib"); 51 $this->addPair("Comment", "https://github.com/ PhenX/php-font-lib");51 $this->addPair("Comment", "https://github.com/dompdf/php-font-lib"); 52 52 53 53 $encoding_scheme = ($encoding ? $encoding : "FontSpecific"); … … 76 76 if (isset($hhea["ascent"])) { 77 77 $this->addPair("FontHeightOffset", $font->normalizeFUnit($hhea["lineGap"])); 78 $this->addPair("Ascender", $font->normalizeFUnit($hhea["ascent"]));79 $this->addPair("Descender", $font->normalizeFUnit($hhea["descent"]));80 78 } 81 79 else { 82 80 $this->addPair("FontHeightOffset", $font->normalizeFUnit($os2["typoLineGap"])); 81 } 82 83 $glyf = $font->getData("glyf"); 84 $glyphIndexArray = $font->getUnicodeCharMap(); 85 86 // capHeight is based on capital H 87 if (\array_key_exists(72, $glyphIndexArray)) { 88 $upperH = $glyf[$glyphIndexArray[72]]; 89 $upperH->parseData(); 90 $this->addPair("CapHeight", $font->normalizeFUnit($upperH->yMax)); 91 } 92 93 // xHeight is based on lowercase x 94 if (\array_key_exists(120, $glyphIndexArray)) { 95 $lowerX = $glyf[$glyphIndexArray[120]]; 96 $lowerX->parseData(); 97 $this->addPair("XHeight", $font->normalizeFUnit($lowerX->yMax)); 98 } 99 100 // ascender is based on lowercase d 101 if (\array_key_exists(100, $glyphIndexArray)) { 102 $lowerD = $glyf[$glyphIndexArray[100]]; 103 $lowerD->parseData(); 104 $this->addPair("Ascender", $font->normalizeFUnit($lowerD->yMax)); 105 } elseif (isset($hhea["ascent"])) { 106 $this->addPair("Ascender", $font->normalizeFUnit($hhea["ascent"])); 107 } 108 else { 83 109 $this->addPair("Ascender", $font->normalizeFUnit($os2["typoAscender"])); 110 } 111 112 // descender is based on lowercase p 113 if (\array_key_exists(112, $glyphIndexArray)) { 114 $lowerP = $glyf[$glyphIndexArray[112]]; 115 $lowerP->parseData(); 116 $this->addPair("Descender", $font->normalizeFUnit($lowerP->yMin)); 117 } elseif (isset($hhea["ascent"])) { 118 $this->addPair("Descender", $font->normalizeFUnit($hhea["descent"])); 119 } 120 else { 84 121 $this->addPair("Descender", -abs($font->normalizeFUnit($os2["typoDescender"]))); 85 122 } … … 93 130 )); 94 131 95 $glyphIndexArray = $font->getUnicodeCharMap();96 97 132 if ($glyphIndexArray) { 98 133 $hmtx = $font->getData("hmtx"); -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/BinaryStream.php
r2672742 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/EOT/File.php
r2672742 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/EOT/Header.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/EncodingMap.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/Font.php
r2672742 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/Glyph/Outline.php
r2672742 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 49 49 $font->seek($offset); 50 50 51 if ($ font->readInt16() > -1) {51 if ($size === 0 || $font->readInt16() > -1) { 52 52 /** @var OutlineSimple $glyph */ 53 53 $glyph = new OutlineSimple($table, $offset, $size); -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/Glyph/OutlineComponent.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/Glyph/OutlineComposite.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 130 130 $this->components[] = $component; 131 131 } while ($flags & self::MORE_COMPONENTS); 132 if ($flags & self::WE_HAVE_INSTRUCTIONS) { 133 $numInstr = $font->readUInt16(); 134 $instr = $font->read($numInstr); 135 $this->components[count($this->components) - 1]->instructions = pack('n', $numInstr) . $instr; 136 } 132 137 } 133 138 … … 172 177 if ($_i < count($this->components) - 1) { 173 178 $flags |= self::MORE_COMPONENTS; 179 } elseif($_component->instructions !== null) { 180 $flags |= self::WE_HAVE_INSTRUCTIONS; 174 181 } 175 182 … … 215 222 } 216 223 224 if($_component->instructions !== null) { 225 $size += $font->write($_component->instructions, strlen($_component->instructions)); 226 } 227 217 228 return $size; 218 229 } -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/Glyph/OutlineSimple.php
r2672742 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/Header.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/OpenType/File.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/OpenType/TableDirectoryEntry.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/Table/DirectoryEntry.php
r2672742 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 50 50 } 51 51 52 $len = mb_strlen($data, '8bit'); 53 54 $hi = 0x0000; 55 $lo = 0x0000; 56 57 for ($i = 0; $i < $len; $i += 4) { 58 $hi += (ord($data[$i]) << 8) + ord($data[$i + 1]); 59 $lo += (ord($data[$i + 2]) << 8) + ord($data[$i + 3]); 60 $hi += $lo >> 16; 61 $lo = $lo & 0xFFFF; 62 $hi = $hi & 0xFFFF; 63 } 64 65 return ($hi << 8) + $lo; 52 $table = unpack("N*", $data); 53 return array_sum($table); 66 54 } 67 55 … … 94 82 $table_length = $data->encode(); 95 83 84 $font->seek($table_offset + $table_length); 85 $pad = 0; 86 $mod = $table_length % 4; 87 if ($mod != 0) { 88 $pad = 4 - $mod; 89 $font->write(str_pad("", $pad, "\0"), $pad); 90 } 91 96 92 $font->seek($table_offset); 97 93 $table_data = $font->read($table_length); … … 106 102 Font::d("Bytes written = $table_length"); 107 103 108 $font->seek($table_offset + $table_length );104 $font->seek($table_offset + $table_length + $pad); 109 105 } 110 106 -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Table.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/cmap.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 27 27 ); 28 28 29 private static $subtable_v2_format = array( 30 "length" => self::uint16, 31 "language" => self::uint16 32 ); 33 34 private static $subtable_v2_format_subheader = array( 35 "firstCode" => self::uint16, 36 "entryCount" => self::uint16, 37 "idDelta" => self::int16, 38 "idRangeOffset" => self::uint16 39 ); 40 29 41 private static $subtable_v4_format = array( 30 42 "length" => self::uint16, … … 39 51 "length" => self::uint32, 40 52 "language" => self::uint32, 41 "ngroups" => self::uint3253 "ngroups" => self::uint32 42 54 ); 43 55 … … 61 73 $subtable["format"] = $font->readUInt16(); 62 74 63 // @todo Only CMAP version 4 and 12 64 if (($subtable["format"] != 4) && ($subtable["format"] != 12)) { 65 unset($data["subtables"][$i]); 66 $data["numberSubtables"]--; 67 continue; 68 } 69 70 if ($subtable["format"] == 12) { 71 72 $font->readUInt16(); 73 74 $subtable += $font->unpack(self::$subtable_v12_format); 75 76 $glyphIndexArray = array(); 77 $endCodes = array(); 78 $startCodes = array(); 79 80 for ($p = 0; $p < $subtable['ngroups']; $p++) { 81 82 $startCode = $startCodes[] = $font->readUInt32(); 83 $endCode = $endCodes[] = $font->readUInt32(); 84 $startGlyphCode = $font->readUInt32(); 85 86 for ($c = $startCode; $c <= $endCode; $c++) { 87 $glyphIndexArray[$c] = $startGlyphCode; 88 $startGlyphCode++; 75 switch ($subtable["format"]) { 76 case 0: 77 case 6: 78 case 8: 79 case 10: 80 case 13: 81 case 14: 82 unset($data["subtables"][$i]); 83 $data["numberSubtables"]--; 84 continue 2; 85 86 case 2: 87 $subtable += $font->unpack(self::$subtable_v2_format); 88 89 $subHeaderKeys = array_map(function($val) { return $val / 8; }, $font->readUInt16Many(256)); 90 $subHeaders = array(); 91 92 $glyphIdArray = array(); 93 $maxSubHeaderIndex = max($subHeaderKeys); 94 for ($i = 0; $i <= $maxSubHeaderIndex; $i++) { 95 $subHeader = $font->unpack(self::$subtable_v2_format_subheader); 96 $offset = $font->pos(); 97 $subHeader["glyphIdArrayOffset"] = $offset + $subHeader["idRangeOffset"] - 2; 98 $subHeaders[$i] = $subHeader; 99 100 if (!\array_key_exists($subHeader["glyphIdArrayOffset"], $glyphIdArray) || count($glyphIdArray[$subHeader["glyphIdArrayOffset"]]) < $subHeader["entryCount"]) { 101 $font->seek($subHeader["glyphIdArrayOffset"]); 102 $glyphIdArray[$subHeader["glyphIdArrayOffset"]] = $font->readUInt16Many($subHeader["entryCount"]); 103 $font->seek($offset); 104 } 89 105 } 90 } 91 92 $subtable += array( 93 "startCode" => $startCodes, 94 "endCode" => $endCodes, 95 "glyphIndexArray" => $glyphIndexArray, 96 ); 97 98 } 99 else if ($subtable["format"] == 4) { 100 101 $subtable += $font->unpack(self::$subtable_v4_format); 102 103 $segCount = $subtable["segCountX2"] / 2; 104 $subtable["segCount"] = $segCount; 105 106 $endCode = $font->readUInt16Many($segCount); 107 108 $font->readUInt16(); // reservedPad 109 110 $startCode = $font->readUInt16Many($segCount); 111 $idDelta = $font->readInt16Many($segCount); 112 113 $ro_start = $font->pos(); 114 $idRangeOffset = $font->readUInt16Many($segCount); 115 116 $glyphIndexArray = array(); 117 for ($i = 0; $i < $segCount; $i++) { 118 $c1 = $startCode[$i]; 119 $c2 = $endCode[$i]; 120 $d = $idDelta[$i]; 121 $ro = $idRangeOffset[$i]; 122 123 if ($ro > 0) { 124 $font->seek($subtable["offset"] + 2 * $i + $ro); 106 107 $glyphIndexArray = array(); 108 foreach ($subHeaderKeys as $highByte => $subHeaderKey) { 109 $subHeader = $subHeaders[$subHeaderKey]; 110 if ($subHeaderKey === 0) { 111 $c = $highByte; 112 if ($c < $subHeader["firstCode"] || $c >= ($subHeader["firstCode"] + $subHeader["entryCount"])) { 113 $glyphIndexArray[$c] = 0; 114 continue; 115 } 116 $c = $highByte; 117 $index = $c - $subHeader["firstCode"]; 118 $glyphId = $glyphIdArray[$subHeader["glyphIdArrayOffset"]][$index]; 119 if ($glyphId === 0) { 120 $glyphIndexArray[$c] = 0; 121 } else { 122 $glyphIndexArray[$c] = ($glyphId + $subHeader["idDelta"]) & 0xFFFF; 123 } 124 } else { 125 for ($index = 0; $index < $subHeader["entryCount"]; $index++) { 126 $c = null; 127 $lowByte = $subHeader["firstCode"] + $index; 128 $c = (($highByte & 0xFF) << 8) | ($lowByte & 0xFF); 129 $glyphId = $glyphIdArray[$subHeader["glyphIdArrayOffset"]][$index]; 130 if ($glyphId === 0) { 131 $glyphIndexArray[$c] = 0; 132 } else { 133 $glyphIndexArray[$c] = ($glyphId + $subHeader["idDelta"]) & 0xFFFF; 134 } 135 } 136 } 125 137 } 126 138 127 for ($c = $c1; $c <= $c2; $c++) { 128 if ($ro == 0) { 129 $gid = ($c + $d) & 0xFFFF; 130 } 131 else { 132 $offset = ($c - $c1) * 2 + $ro; 133 $offset = $ro_start + 2 * $i + $offset; 134 135 $font->seek($offset); 136 $gid = $font->readUInt16(); 137 138 if ($gid != 0) { 139 $gid = ($gid + $d) & 0xFFFF; 140 } 141 } 142 143 if ($gid > 0) { 144 $glyphIndexArray[$c] = $gid; 139 $subtable += array( 140 "subHeaderKeys" => $subHeaderKeys, 141 "subHeaders" => $subHeaders, 142 "glyphIdArray" => $glyphIdArray, 143 "glyphIndexArray" => $glyphIndexArray 144 ); 145 146 break; 147 148 case 4: 149 $subtable += $font->unpack(self::$subtable_v4_format); 150 151 $segCount = $subtable["segCountX2"] / 2; 152 $subtable["segCount"] = $segCount; 153 154 $endCode = $font->readUInt16Many($segCount); 155 156 $font->readUInt16(); // reservedPad 157 158 $startCode = $font->readUInt16Many($segCount); 159 $idDelta = $font->readInt16Many($segCount); 160 161 $ro_start = $font->pos(); 162 $idRangeOffset = $font->readUInt16Many($segCount); 163 164 $glyphIndexArray = array(); 165 for ($i = 0; $i < $segCount; $i++) { 166 $c1 = $startCode[$i]; 167 $c2 = $endCode[$i]; 168 $d = $idDelta[$i]; 169 $ro = $idRangeOffset[$i]; 170 171 if ($ro > 0) { 172 $font->seek($subtable["offset"] + 2 * $i + $ro); 173 } 174 175 for ($c = $c1; $c <= $c2; $c++) { 176 if ($c === 0xFFFF) { 177 continue; 178 } 179 180 if ($ro == 0) { 181 $gid = ($c + $d) & 0xFFFF; 182 } 183 else { 184 $offset = ($c - $c1) * 2 + $ro; 185 $offset = $ro_start + 2 * $i + $offset; 186 187 $gid = 0; 188 if ($font->seek($offset) === true) { 189 $gid = $font->readUInt16(); 190 } 191 192 if ($gid != 0) { 193 $gid = ($gid + $d) & 0xFFFF; 194 } 195 } 196 197 if ($gid >= 0) { 198 $glyphIndexArray[$c] = $gid; 199 } 145 200 } 146 201 } 147 } 148 149 $subtable += array( 150 "endCode" => $endCode, 151 "startCode" => $startCode, 152 "idDelta" => $idDelta, 153 "idRangeOffset" => $idRangeOffset, 154 "glyphIndexArray" => $glyphIndexArray, 155 ); 202 203 $subtable += array( 204 "endCode" => $endCode, 205 "startCode" => $startCode, 206 "idDelta" => $idDelta, 207 "idRangeOffset" => $idRangeOffset, 208 "glyphIndexArray" => $glyphIndexArray 209 ); 210 break; 211 212 case 12: 213 $font->readUInt16(); 214 215 $subtable += $font->unpack(self::$subtable_v12_format); 216 217 $glyphIndexArray = array(); 218 $endCodes = array(); 219 $startCodes = array(); 220 221 for ($p = 0; $p < $subtable['ngroups']; $p++) { 222 223 $startCode = $startCodes[] = $font->readUInt32(); 224 $endCode = $endCodes[] = $font->readUInt32(); 225 $startGlyphCode = $font->readUInt32(); 226 227 for ($c = $startCode; $c <= $endCode; $c++) { 228 $glyphIndexArray[$c] = $startGlyphCode; 229 $startGlyphCode++; 230 } 231 } 232 233 $subtable += array( 234 "startCode" => $startCodes, 235 "endCode" => $endCodes, 236 "glyphIndexArray" => $glyphIndexArray, 237 ); 238 break; 156 239 } 157 240 } … … 197 280 } 198 281 199 $segments[][] = array(0xFFFF, 0xFFFF);282 $segments[][] = array(0xFFFF, null); 200 283 201 284 $startCode = array(); … … 283 366 $subtable["length"] = $length - $length_before; 284 367 $font->seek($before_subheader); 285 $ length += $font->pack(self::$subtable_v4_format, $subtable);368 $font->pack(self::$subtable_v4_format, $subtable); 286 369 287 370 $font->seek($after_subtable); -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/glyf.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 49 49 } 50 50 51 public function toHTML( ) {51 public function toHTML($n = 500) { 52 52 $max = 160; 53 53 $font = $this->getFont(); … … 74 74 $height = round($height / $ratio); 75 75 } 76 77 $n = 500;78 76 79 77 $s = "<h3>" . "Only the first $n simple glyphs are shown (" . count($this->data) . " total) … … 112 110 $char = $char ? "&#{$glyphIndexArray[$g]};" : ""; 113 111 112 if ($char === "" && empty($shape["SVGContours"])) { 113 $n++; 114 continue; 115 } 116 114 117 $s .= "<div class='glyph-view $type' id='glyph-$g'> 115 118 <span class='glyph-id'>$g</span> … … 144 147 foreach ($subset as $gid) { 145 148 $loca[] = $length; 146 $length += $data[$gid]->encode(); 149 150 $bytes = $data[$gid]->encode(); 151 152 $pad = 0; 153 $mod = $bytes % 4; 154 if ($mod != 0) { 155 $pad = 4 - $mod; 156 $font->write(str_pad("", $pad, "\0"), $pad); 157 } 158 $length += $bytes + $pad; 147 159 } 148 160 -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/head.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 44 44 } 45 45 } 46 47 function _encode() { 48 $this->data["checkSumAdjustment"] = 0; 49 return parent::_encode(); 50 } 46 51 } -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/hhea.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/hmtx.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 36 36 37 37 if ($numOfLongHorMetrics < $numGlyphs) { 38 $lastWidth = end($data); 39 $data = array_pad($data, $numGlyphs, $lastWidth); 38 $lastWidth = end($data)[0]; 39 $numLeft = $numGlyphs - $numOfLongHorMetrics; 40 $metrics = $font->readUInt16Many($numLeft); 41 for($i = 0; $i < $numLeft; $i++) { 42 $gid = $numOfLongHorMetrics + $i; 43 $leftSideBearing = isset($metrics[$i]) ? $metrics[$i] : 0; 44 $data[$gid] = array($lastWidth, $leftSideBearing); 45 } 40 46 } 41 47 -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/kern.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/loca.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/maxp.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/name.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 151 151 } 152 152 153 $system_encodings = mb_list_encodings(); 154 $system_encodings = array_change_key_case(array_fill_keys($system_encodings, true), CASE_UPPER); 155 153 156 $names = array(); 154 157 foreach ($records as $record) { 155 158 $font->seek($tableOffset + $data["stringOffset"] + $record->offset); 156 $s = $font->read($record->length); 157 $record->string = Font::UTF16ToUTF8($s); 159 $record->stringRaw = $font->read($record->length); 160 161 $encoding = null; 162 switch ($record->platformID) { 163 case 3: 164 switch ($record->platformSpecificID) { 165 case 2: 166 if (\array_key_exists("SJIS", $system_encodings)) { 167 $encoding = "SJIS"; 168 } 169 break; 170 case 3: 171 if (\array_key_exists("GB18030", $system_encodings)) { 172 $encoding = "GB18030"; 173 } 174 break; 175 case 4: 176 if (\array_key_exists("BIG-5", $system_encodings)) { 177 $encoding = "BIG-5"; 178 } 179 break; 180 case 5: 181 if (\array_key_exists("UHC", $system_encodings)) { 182 $encoding = "UHC"; 183 } 184 break; 185 } 186 break; 187 } 188 if ($encoding === null) { 189 $encoding = "UTF-16"; 190 } 191 192 $record->string = mb_convert_encoding($record->stringRaw, "UTF-8", $encoding); 193 if (strpos($record->string, "\0") !== false) { 194 $record->string = str_replace("\0", "", $record->string); 195 } 158 196 $names[$record->nameID] = $record; 159 197 } … … 169 207 /** @var nameRecord[] $records */ 170 208 $records = $this->data["records"]; 171 $count_records = count($records);209 $count_records = \count($records); 172 210 173 211 $this->data["count"] = $count_records; 174 $this->data["stringOffset"] = 6 + $count_records * 12; // 6 => uint16 * 3, 12 => sizeof self::$record_format212 $this->data["stringOffset"] = 6 + ($count_records * 12); // 6 => uint16 * 3, 12 => sizeof self::$record_format 175 213 176 214 $length = $font->pack(self::$header_format, $this->data); 177 215 178 216 $offset = 0; 217 218 /** @var nameRecord[] $records_to_encode */ 219 $records_to_encode = array(); 179 220 foreach ($records as $record) { 180 $record->length = mb_strlen($record->getUTF16(), "8bit"); 181 $record->offset = $offset; 182 $offset += $record->length; 183 $length += $font->pack(nameRecord::$format, (array)$record); 184 } 185 186 foreach ($records as $record) { 221 $encoded_record = new nameRecord(); 222 $encoded_record->platformID = 3; 223 $encoded_record->platformSpecificID = 1; 224 $encoded_record->languageID = $record->languageID; 225 $encoded_record->nameID = $record->nameID; 226 $encoded_record->offset = $offset; 227 $encoded_record->string = $record->string; 228 $encoded_record->length = mb_strlen($encoded_record->getUTF16(), "8bit"); 229 $records_to_encode[] = $encoded_record; 230 231 $offset += $encoded_record->length; 232 $length += $font->pack(nameRecord::$format, (array)$encoded_record); 233 } 234 235 foreach ($records_to_encode as $record) { 187 236 $str = $record->getUTF16(); 188 237 $length += $font->write($str, mb_strlen($str, "8bit")); -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/nameRecord.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 24 24 public $offset; 25 25 public $string; 26 public $stringRaw; 26 27 27 28 public static $format = array( -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/os2.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/Table/Type/post.php
r2672742 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/TrueType/Collection.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/TrueType/File.php
r2672742 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License … … 102 102 ); 103 103 104 private function uniord (string $c, string $encoding = null) { 105 if (function_exists("mb_ord")) { 106 if (PHP_VERSION_ID < 80000 && $encoding === null) { 107 // in PHP < 8 the encoding argument, if supplied, must be a valid encoding 108 $encoding = "UTF-8"; 109 } 110 return mb_ord($c, $encoding); 111 } 112 113 if ($encoding != "UTF-8" && $encoding !== null) { 114 $c = mb_convert_encoding($c, "UTF-8", $encoding); 115 } 116 117 $length = mb_strlen(mb_substr($c, 0, 1), '8bit'); 118 $ord = false; 119 $bytes = []; 120 $numbytes = 1; 121 for ($i = 0; $i < $length; $i++) { 122 $o = \ord($c[$i]); // get one string character at time 123 if (\count($bytes) === 0) { // get starting octect 124 if ($o <= 0x7F) { 125 $ord = $o; 126 $numbytes = 1; 127 } elseif (($o >> 0x05) === 0x06) { // 2 bytes character (0x06 = 110 BIN) 128 $bytes[] = ($o - 0xC0) << 0x06; 129 $numbytes = 2; 130 } elseif (($o >> 0x04) === 0x0E) { // 3 bytes character (0x0E = 1110 BIN) 131 $bytes[] = ($o - 0xE0) << 0x0C; 132 $numbytes = 3; 133 } elseif (($o >> 0x03) === 0x1E) { // 4 bytes character (0x1E = 11110 BIN) 134 $bytes[] = ($o - 0xF0) << 0x12; 135 $numbytes = 4; 136 } else { 137 $ord = false; 138 break; 139 } 140 } elseif (($o >> 0x06) === 0x02) { // bytes 2, 3 and 4 must start with 0x02 = 10 BIN 141 $bytes[] = $o - 0x80; 142 if (\count($bytes) === $numbytes) { 143 // compose UTF-8 bytes to a single unicode value 144 $o = $bytes[0]; 145 for ($j = 1; $j < $numbytes; $j++) { 146 $o += ($bytes[$j] << (($numbytes - $j - 1) * 0x06)); 147 } 148 if ((($o >= 0xD800) and ($o <= 0xDFFF)) or ($o >= 0x10FFFF)) { 149 // The definition of UTF-8 prohibits encoding character numbers between 150 // U+D800 and U+DFFF, which are reserved for use with the UTF-16 151 // encoding form (as surrogate pairs) and do not directly represent 152 // characters. 153 return false; 154 } else { 155 $ord = $o; // add char to array 156 } 157 // reset data for next char 158 $bytes = []; 159 $numbytes = 1; 160 } 161 } else { 162 $ord = false; 163 break; 164 } 165 } 166 167 return $ord; 168 } 169 104 170 function getTable() { 105 171 $this->parseTableEntries(); … … 158 224 $subtable = null; 159 225 foreach ($this->getData("cmap", "subtables") as $_subtable) { 160 if ($_subtable["platformID"] == 0 || $_subtable["platformID"] == 3 && $_subtable["platformSpecificID"] == 1) {226 if ($_subtable["platformID"] == 0 || ($_subtable["platformID"] == 3 && $_subtable["platformSpecificID"] == 1)) { 161 227 $subtable = $_subtable; 162 228 break; … … 168 234 } 169 235 236 $system_encodings = mb_list_encodings(); 237 $system_encodings = array_change_key_case(array_fill_keys($system_encodings, true), CASE_UPPER); 238 foreach ($this->getData("cmap", "subtables") as $_subtable) { 239 $encoding = null; 240 switch ($_subtable["platformID"]) { 241 case 3: 242 switch ($_subtable["platformSpecificID"]) { 243 case 2: 244 if (\array_key_exists("SJIS", $system_encodings)) { 245 $encoding = "SJIS"; 246 } 247 break; 248 case 3: 249 if (\array_key_exists("GB18030", $system_encodings)) { 250 $encoding = "GB18030"; 251 } 252 break; 253 case 4: 254 if (\array_key_exists("BIG-5", $system_encodings)) { 255 $encoding = "BIG-5"; 256 } 257 break; 258 case 5: 259 if (\array_key_exists("UHC", $system_encodings)) { 260 $encoding = "UHC"; 261 } 262 break; 263 } 264 break; 265 } 266 if ($encoding) { 267 $glyphIndexArray = array(); 268 foreach ($_subtable["glyphIndexArray"] as $c => $gid) { 269 $str = trim(pack("N", $c)); 270 if (\strlen($str) > 0) { 271 $ord = $this->uniord($str, $encoding); 272 if ($ord > 0) { 273 $glyphIndexArray[$ord] = $gid; 274 } 275 } 276 } 277 return $glyphIndexArray; 278 } 279 } 280 170 281 return null; 171 282 } … … 218 329 function encode($tags = array()) { 219 330 if (!self::$raw) { 220 $tags = array_merge(array("head", "hhea", "cmap", "hmtx", "maxp", "glyf", "loca", "name", "post" ), $tags);331 $tags = array_merge(array("head", "hhea", "cmap", "hmtx", "maxp", "glyf", "loca", "name", "post", "cvt ", "fpgm", "prep"), $tags); 221 332 } 222 333 else { … … 224 335 } 225 336 226 $num_tables = count($tags);227 337 $n = 16; // @todo 228 338 … … 240 350 } 241 351 352 $num_tables = count($entries); 353 $exponent = floor(log($num_tables, 2)); 354 $power_of_two = pow(2, $exponent); 355 242 356 $this->header->data["numTables"] = $num_tables; 357 $this->header->data["searchRange"] = $power_of_two * 16; 358 $this->header->data["entrySelector"] = log($power_of_two, 2); 359 $this->header->data["rangeShift"] = $num_tables * 16 - $this->header->data["searchRange"]; 243 360 $this->header->encode(); 244 361 -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/TrueType/Header.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/TrueType/TableDirectoryEntry.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/WOFF/File.php
r2672742 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/WOFF/Header.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-font-lib/src/FontLib/WOFF/TableDirectoryEntry.php
r2614294 r3024399 2 2 /** 3 3 * @package php-font-lib 4 * @link https://github.com/ PhenX/php-font-lib4 * @link https://github.com/dompdf/php-font-lib 5 5 * @author Fabien Ménager <fabien.menager@gmail.com> 6 6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-svg-lib/src/Svg/Document.php
r2900363 r3024399 53 53 /** @var \Sabberworm\CSS\CSSList\Document[] */ 54 54 protected $styleSheets = array(); 55 56 public $allowExternalReferences = true; 55 57 56 58 public function loadFile($filename) -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-svg-lib/src/Svg/Style.php
r2900363 r3024399 139 139 break; 140 140 } 141 } 142 143 if ( 144 \array_key_exists("font-family", $styles) 145 && ( 146 \strtolower(\substr($this->href, 0, 7)) === "phar://" 147 || ($this->document->allowExternalReferences === false && \strtolower(\substr($this->href, 0, 5)) !== "data:") 148 ) 149 ) { 150 unset($style["font-family"]); 141 151 } 142 152 } -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-svg-lib/src/Svg/Tag/Image.php
r2900363 r3024399 59 59 $this->document->getSurface()->transform(1, 0, 0, -1, 0, $height); 60 60 61 if (\strtolower(\substr($this->href, 0, 7)) === "phar://" || ($this->document->allowExternalReferences === false && \strtolower(\substr($this->href, 0, 5) !== "data:"))) { 62 return; 63 } 64 61 65 $this->document->getSurface()->drawImage($this->href, $this->x, $this->y, $this->width, $this->height); 62 66 } -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/vendor/phenx/php-svg-lib/src/Svg/Tag/UseTag.php
r2900363 r3024399 15 15 protected $width; 16 16 protected $height; 17 protected $instances = 0; 17 18 18 19 /** @var AbstractTag */ … … 21 22 protected function before($attributes) 22 23 { 24 $this->instances++; 25 if ($this->instances > 1) { 26 //TODO: log circular reference error state 27 return; 28 } 29 23 30 if (isset($attributes['x'])) { 24 31 $this->x = $attributes['x']; … … 53 60 54 61 protected function after() { 62 if ($this->instances > 0) { 63 return; 64 } 55 65 parent::after(); 56 66 … … 64 74 public function handle($attributes) 65 75 { 76 if ($this->instances > 1) { 77 //TODO: log circular reference error state 78 return; 79 } 80 66 81 parent::handle($attributes); 67 82 … … 71 86 72 87 $mergedAttributes = $this->reference->attributes; 73 $attributesToNotMerge = ['x', 'y', 'width', 'height' ];88 $attributesToNotMerge = ['x', 'y', 'width', 'height', 'href', 'xlink:href', 'id']; 74 89 foreach ($attributes as $attrKey => $attrVal) { 75 90 if (!in_array($attrKey, $attributesToNotMerge) && !isset($mergedAttributes[$attrKey])) { … … 88 103 public function handleEnd() 89 104 { 105 $this->instances--; 106 if ($this->instances > 0) { 107 return; 108 } 109 90 110 parent::handleEnd(); 91 111 -
wpwing-pdf-invoice-packing-slip-for-woocommerce/trunk/wpwing-pdf-invoice-packing-slip-for-woocommerce.php
r2927383 r3024399 5 5 * Plugin URI: https://wpwing.com/ 6 6 * Description: Download your WooCommerce order invoice and packing slip as PDF format for print or email. 7 * Version: 1.4. 07 * Version: 1.4.1 8 8 * Author: WPWing 9 9 * Author URI: https://wpwing.com/ 10 10 * Requires PHP: 7.1 11 11 * Requires at least: 4.8 12 * Tested up to: 6. 212 * Tested up to: 6.4 13 13 * WC requires at least: 4.5 14 * WC tested up to: 7.814 * WC tested up to: 8.5 15 15 * License: GPL-3.0-or-later 16 16 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
Note: See TracChangeset
for help on using the changeset viewer.