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
2.0 beta 1
Firefox
MacOS
textFont()
textWidth()
When no font is applied this works, but with a p5.Font applied, I get TypeError: this.states.textFont._textWidth is not a function
p5.Font
TypeError: this.states.textFont._textWidth is not a function
async function setup() { createCanvas(400, 400); const font = await loadFont('https://fonts.gstatic.com/s/sniglet/v17/cIf4MaFLtkE3UjaJ_ImHRGEsnIJkWL4.ttf') textSize(100) textFont(font) console.log(textWidth('test')) }
Live: https://editor.p5js.org/davepagurek/sketches/TuNtJ4gJt
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Most appropriate sub-area of p5.js?
p5.js version
2.0 beta 1
Web browser and version
Firefox
Operating system
MacOS
Steps to reproduce this
Steps:
textFont()
textWidth()
When no font is applied this works, but with a
p5.Font
applied, I getTypeError: this.states.textFont._textWidth is not a function
Snippet:
Live: https://editor.p5js.org/davepagurek/sketches/TuNtJ4gJt
The text was updated successfully, but these errors were encountered: