We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents cf37090 + a000a7c commit bd2b227Copy full SHA for bd2b227
src/type/textCore.js
@@ -315,7 +315,7 @@ function textCore(p5, fn) {
315
*/
316
Renderer.prototype.textAscent = function (txt = '') {
317
if (!txt.length) return this.fontAscent();
318
- return this.textDrawingContext().measureText(txt)[prop];
+ return this.textDrawingContext().measureText(txt).actualBoundingBoxAscent;
319
};
320
321
/**
@@ -334,7 +334,7 @@ function textCore(p5, fn) {
334
335
Renderer.prototype.textDescent = function (txt = '') {
336
if (!txt.length) return this.fontDescent();
337
+ return this.textDrawingContext().measureText(txt).actualBoundingBoxDescent;
338
339
340
0 commit comments