Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix TextMetrics type to include alphabeticBaseline, emHeightAscent, and emHeightDescent properties #2394

Merged
merged 1 commit into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading