From 24824ba6bfe13b0a7d3eedf30c9159ff42a6729d Mon Sep 17 00:00:00 2001 From: Andrew Lisowski Date: Sat, 7 Sep 2024 14:28:03 -0700 Subject: [PATCH] Export measure text functions from jimp package --- 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 11ad4b0b..a3a857c4 100644 --- a/packages/docs/src/content/docs/guides/migrate-to-v1.mdx +++ b/packages/docs/src/content/docs/guides/migrate-to-v1.mdx @@ -146,6 +146,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_*` - These are now part of the TS api when encoding diff --git a/packages/jimp/src/index.ts b/packages/jimp/src/index.ts index 6511163f..b0307d2f 100644 --- a/packages/jimp/src/index.ts +++ b/packages/jimp/src/index.ts @@ -169,6 +169,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,