From 2e8ac9853e58f83c85903e6b8289c18da876acaf Mon Sep 17 00:00:00 2001 From: Oussama Hmoura <48139086+kuo-hm@users.noreply.github.com> Date: Fri, 29 Dec 2023 12:27:19 +0100 Subject: [PATCH] Update import statement for fontkit in README.md This commit updates the import statement for the `fontkit` library in the README.md file. Previously, the import statement was written as `import fontkit from '@pdf-lib/fontkit';`. However, this might cause issues if the library does not have a default export. To ensure compatibility with different module systems, the import statement has been changed to `import * as fontkit from '@pdf-lib/fontkit';`. This syntax imports all exports from the `fontkit` library into an object named `fontkit`, which can then be used to access the library's features. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bc613ebe..584a6e60 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Fontkit is an advanced font engine for Node and the browser, used by [PDFKit](ht ## Example ```js -import fontkit from '@pdf-lib/fontkit'; +import * as fontkit from '@pdf-lib/fontkit'; import fs from 'fs'; // open a font synchronously