From 314718f7e46c7b483d549cedf26921f654cdb7ff Mon Sep 17 00:00:00 2001 From: Andrew Lisowski Date: Sat, 7 Sep 2024 14:39:44 -0700 Subject: [PATCH] Export measure text functions from jimp package (#1333) --- packages/docs/src/content/docs/guides/migrate-to-v1.mdx | 4 ++++ packages/jimp/src/index.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/packages/docs/src/content/docs/guides/migrate-to-v1.mdx b/packages/docs/src/content/docs/guides/migrate-to-v1.mdx index 6537d9a5..f0232224 100644 --- a/packages/docs/src/content/docs/guides/migrate-to-v1.mdx +++ b/packages/docs/src/content/docs/guides/migrate-to-v1.mdx @@ -157,6 +157,10 @@ const resized = await image ## Removed Constants +Most constants have been moved to named exports. + +Other changes: + - `Jimp.AUTO` - This constant was only needed for positional arguments. It is no longer needed with the new API. ### `Jimp.MIME_*` diff --git a/packages/jimp/src/index.ts b/packages/jimp/src/index.ts index c59884f5..9c5f6a8e 100644 --- a/packages/jimp/src/index.ts +++ b/packages/jimp/src/index.ts @@ -180,6 +180,7 @@ export type { } from "@jimp/core"; export type { Bitmap, Edge, RGBAColor, RGBColor } from "@jimp/types"; export { loadFont } from "@jimp/plugin-print/load-font"; +export { measureText, measureTextHeight } from "@jimp/plugin-print"; export { diff } from "@jimp/diff"; export { intToRGBA,