diff --git a/apps/rn/src/components/TestLauncher.js b/apps/rn/src/components/TestLauncher.js index 86e845df1..732a21da5 100644 --- a/apps/rn/src/components/TestLauncher.js +++ b/apps/rn/src/components/TestLauncher.js @@ -88,7 +88,7 @@ export default class TestLauncher extends Component { - + diff --git a/apps/rn/src/tests/test17.js b/apps/rn/src/tests/test17.js index 796e2e937..395626624 100644 --- a/apps/rn/src/tests/test17.js +++ b/apps/rn/src/tests/test17.js @@ -9,6 +9,7 @@ import { drawEllipse, PDFWidgetAnnotation, } from 'pdf-lib'; +import fontkit from '@pdf-lib/fontkit'; import { fetchAsset, writePdf } from './assets'; @@ -138,7 +139,7 @@ export default async () => { const text = symbol.encodeText('ℑ'); const textW = symbol.widthOfTextAtSize('ℑ', 35); const textH = symbol.heightAtSize(35); - const symbolText = (font: PDFFont) => + const symbolText = (font) => drawText(text, { x: width / 2 - textW / 2, y: height / 2 - textH / 2 + 10, @@ -150,7 +151,7 @@ export default async () => { ySkew: degrees(0), }); - const assert = (condition: boolean, msg = '') => { + const assert = (condition, msg = '') => { if (!condition) throw new Error(msg || 'Assertion failed'); }; diff --git a/apps/rn/yarn.lock b/apps/rn/yarn.lock index a849533a5..d799713d6 100644 --- a/apps/rn/yarn.lock +++ b/apps/rn/yarn.lock @@ -953,10 +953,10 @@ dependencies: pako "^1.0.6" -"@pdf-lib/standard-fonts@^1.0.0-rc3": - version "1.0.0-rc3" - resolved "https://registry.yarnpkg.com/@pdf-lib/standard-fonts/-/standard-fonts-1.0.0-rc3.tgz#f7bc2b3c9ad38d08c9831f6430b315d2f829075a" - integrity sha512-uOp1rd7vAWpKrvJaOLWQxuOSr+lRTN4pVf+Tw8gMjSne1nILpZj6teaTClEbjfX0BmEzTyuP65O+6JVrAZ+c2w== +"@pdf-lib/standard-fonts@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@pdf-lib/standard-fonts/-/standard-fonts-1.0.0.tgz#8ba691c4421f71662ed07c9a0294b44528af2d7f" + integrity sha512-hU30BK9IUN/su0Mn9VdlVKsWBS6GyhVfqjwl1FjZN4TxP6cCw0jP2w7V3Hf5uX7M0AZJ16vey9yE0ny7Sa59ZA== dependencies: pako "^1.0.6" @@ -4885,9 +4885,9 @@ path-type@^3.0.0: pify "^3.0.0" pdf-lib@./../..: - version "1.10.0" + version "1.11.0" dependencies: - "@pdf-lib/standard-fonts" "^1.0.0-rc3" + "@pdf-lib/standard-fonts" "^1.0.0" "@pdf-lib/upng" "^1.0.1" pako "^1.0.11" tslib "^1.11.1" diff --git a/apps/web/test13.html b/apps/web/test13.html index 3120cd358..ece947ab2 100644 --- a/apps/web/test13.html +++ b/apps/web/test13.html @@ -24,7 +24,7 @@ Prev - diff --git a/apps/web/test17.html b/apps/web/test17.html index 67a801196..520b13d93 100644 --- a/apps/web/test17.html +++ b/apps/web/test17.html @@ -188,7 +188,7 @@ const text = symbol.encodeText('ℑ'); const textW = symbol.widthOfTextAtSize('ℑ', 35); const textH = symbol.heightAtSize(35); - const symbolText = (font: PDFFont) => + const symbolText = (font) => drawText(text, { x: width / 2 - textW / 2, y: height / 2 - textH / 2 + 10, @@ -200,7 +200,7 @@ ySkew: degrees(0), }); - const assert = (condition: boolean, msg = '') => { + const assert = (condition, msg = '') => { if (!condition) throw new Error(msg || 'Assertion failed'); }; diff --git a/package.json b/package.json index e7a27c4cb..2fa39be1d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdf-lib", - "version": "1.10.0", + "version": "1.11.0", "description": "Create and modify PDF files with JavaScript", "author": "Andrew Dillon ", "contributors": [