Skip to content

Commit

Permalink
add TextMetrics properties
Browse files Browse the repository at this point in the history
update CHANGELOG
fix changelog
  • Loading branch information
musou1500 authored and chearon committed Aug 11, 2024
1 parent ae1aacb commit e96b4eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
==================
Expand Down
3 changes: 3 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e96b4eb

Please sign in to comment.