Skip to content

Commit 3e2ad93

Browse files
committed
Improved error about missing font.
1 parent 7bb3425 commit 3e2ad93

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/magick.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export class Magick {
8787
const fileName = `/fonts/${name}`;
8888
const stats = ImageMagick._api.FS.analyzePath(fileName);
8989
if (!stats.exists) {
90-
throw `Unable to find a font with the name '${name}', add it with Magick.addFont.`
90+
throw `Unable to find a font with the name '${name}', register it with the addFont method of the Magick class.`
9191
}
9292

9393
return fileName;

tests/settings/magick-settings/font.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ describe('MagickSettings#font', () => {
1313

1414
expect(() => {
1515
ImageMagick.read('label:magick-wasm', settings, () => { /* never reached */ });
16-
}).toThrowError('Unable to find a font with the name \'missing\', add it with Magick.addFont.');
16+
}).toThrowError('Unable to find a font with the name \'missing\', register it with the addFont method of the Magick class.');
1717
});
1818
});

0 commit comments

Comments
 (0)