From e96b4eb189e59f47de051d6c744c60b06c71b6c8 Mon Sep 17 00:00:00 2001 From: musou1500 Date: Wed, 10 Jul 2024 00:13:31 +0900 Subject: [PATCH] add TextMetrics properties update CHANGELOG fix changelog --- CHANGELOG.md | 1 + index.d.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0505b04e4..349e1c6f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ This release notably changes to using N-API. 🎉 * Fix issue related to improper parsing of leading and trailing whitespaces in CSS color. (#2301) * RGB functions should support real numbers now instead of just integers. (#2339) * Allow alternate or properly escaped quotes *within* font-family names +* Fix TextMetrics type to include alphabeticBaseline, emHeightAscent, and emHeightDescent properties 2.11.2 ================== diff --git a/index.d.ts b/index.d.ts index 73ad4cde9..49636f396 100644 --- a/index.d.ts +++ b/index.d.ts @@ -128,10 +128,13 @@ export class Canvas { } export interface TextMetrics { + readonly alphabeticBaseline: number; readonly actualBoundingBoxAscent: number; readonly actualBoundingBoxDescent: number; readonly actualBoundingBoxLeft: number; readonly actualBoundingBoxRight: number; + readonly emHeightAscent: number; + readonly emHeightDescent: number; readonly fontBoundingBoxAscent: number; readonly fontBoundingBoxDescent: number; readonly width: number;