@react-pdf/font
Advanced tools
Comparing version 2.5.2 to 3.0.0
@@ -121,3 +121,3 @@ import 'is-url'; | ||
if (!res) { | ||
throw new Error("Could not resolve font for " + this.family + ", fontWeight " + fontWeight); | ||
throw new Error(`Could not resolve font for ${this.family}, fontWeight ${fontWeight}`); | ||
} | ||
@@ -178,3 +178,3 @@ return res; | ||
if (!fonts[fontFamily]) { | ||
throw new Error("Font family not registered: " + fontFamily + ". Please register it calling Font.register() method."); | ||
throw new Error(`Font family not registered: ${fontFamily}. Please register it calling Font.register() method.`); | ||
} | ||
@@ -181,0 +181,0 @@ return fonts[fontFamily].resolve(descriptor); |
@@ -123,3 +123,3 @@ import isUrl from 'is-url'; | ||
if (!res) { | ||
throw new Error("Could not resolve font for " + this.family + ", fontWeight " + fontWeight); | ||
throw new Error(`Could not resolve font for ${this.family}, fontWeight ${fontWeight}`); | ||
} | ||
@@ -180,3 +180,3 @@ return res; | ||
if (!fonts[fontFamily]) { | ||
throw new Error("Font family not registered: " + fontFamily + ". Please register it calling Font.register() method."); | ||
throw new Error(`Font family not registered: ${fontFamily}. Please register it calling Font.register() method.`); | ||
} | ||
@@ -183,0 +183,0 @@ return fonts[fontFamily].resolve(descriptor); |
{ | ||
"name": "@react-pdf/font", | ||
"version": "2.5.2", | ||
"version": "3.0.0", | ||
"license": "MIT", | ||
@@ -14,15 +14,6 @@ "description": "Register font and emoji source for react-pdf document", | ||
"type": "module", | ||
"main": "./lib/index.cjs", | ||
"module": "./lib/index.js", | ||
"main": "./lib/index.js", | ||
"browser": { | ||
"./lib/index.js": "./lib/index.browser.js", | ||
"./lib/index.cjs": "./lib/index.browser.cjs" | ||
"./lib/index.js": "./lib/index.browser.js" | ||
}, | ||
"exports": { | ||
".": { | ||
"import": "./lib/index.js", | ||
"require": "./lib/index.cjs", | ||
"default": "./lib/index.js" | ||
} | ||
}, | ||
"scripts": { | ||
@@ -35,3 +26,3 @@ "test": "vitest", | ||
"@babel/runtime": "^7.20.13", | ||
"@react-pdf/types": "^2.6.0", | ||
"@react-pdf/types": "^2.7.0", | ||
"cross-fetch": "^3.1.5", | ||
@@ -38,0 +29,0 @@ "fontkit": "^2.0.2", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2
13385
4
418
Updated@react-pdf/types@^2.7.0