We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have some need to measure the height of fonts. But TextMeasure.fontBoundingBoxAscent is always undefined.
TextMeasure.fontBoundingBoxAscent
undefined
It seems that these API are not implemented. However, the typescript definition provides the relevant definitions.
Maybe it's better to mark these API as unimplemented.
var Canvas = require('canvas'); var canvas = Canvas.createCanvas(200, 200); var ctx = canvas.getContext('2d'); ctx.font = "Arial"; const measure = ctx.measureText('test'); console.log(measure.fontBoundingBoxAscent); // undefined; console.log(measure); /* { width: 16.416015625, actualBoundingBoxLeft: -1, actualBoundingBoxRight: 17.0712890625, actualBoundingBoxAscent: 7, actualBoundingBoxDescent: 0, emHeightAscent: 11, emHeightDescent: 3, alphabeticBaseline: 1 } */
npm list canvas
yarn list canvas
The text was updated successfully, but these errors were encountered:
+1 same issue
Sorry, something went wrong.
+1 - I'm using emHeightAscent and emHeightDescent but the type definitions doesn't reflect these properties
emHeightAscent
emHeightDescent
alphabeticBaseline
No branches or pull requests
Issue
I have some need to measure the height of fonts.
But
TextMeasure.fontBoundingBoxAscent
is alwaysundefined
.It seems that these API are not implemented.
However, the typescript definition provides the relevant definitions.
Maybe it's better to mark these API as unimplemented.
Steps to Reproduce
Your Environment
npm list canvas
oryarn list canvas
): canvas 2.11.2The text was updated successfully, but these errors were encountered: