You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's an example snippet that renders Inter 600 at font size 30.5. There's a row of pixels missing from the C in "quick" and a column of pixels missing from the M in "jumped":
letfontfunctionpreload(){font=loadFont('https://fonts.gstatic.com/s/inter/v3/'+'UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2b'+'oKoduKmMEVuGKYMZhrib2Bg-4.ttf')}functionsetup(){createCanvas(300,300,WEBGL)pixelDensity(2)noLoop()}functiondraw(){push()background(255)fill(0)textFont(font)textSize(31.5)textAlign(CENTER,CENTER)translate(-100,-100)text('The quick brown fox jumped over the lazy dog',0,0,200,200)pop()}
This also has to do with positioning: if I replace "jumped" with "jumps", the pixel alignment works out better and the missing column in the M disappears.
Most appropriate sub-area of p5.js?
p5.js version
1.5.0
Web browser and version
Firefox 106.0.2
Operating System
MacOS 12.5.1
Steps to reproduce this
Here's an example snippet that renders Inter 600 at font size 30.5. There's a row of pixels missing from the C in "quick" and a column of pixels missing from the M in "jumped":
Close-ups:
p5 editor version of the above: https://editor.p5js.org/davepagurek/sketches/pna4CDNV9
This also has to do with positioning: if I replace "jumped" with "jumps", the pixel alignment works out better and the missing column in the M disappears.
This might be related to how we calculate the rows/columns that intersect a curve when setting them up for WebGL rendering here: https://github.com/processing/p5.js/blob/v1.5.0/src/webgl/text.js#L223-L232
The text was updated successfully, but these errors were encountered: