update benchmark_fonts

This commit is contained in:
Ryan Oldenburg 2021-05-07 15:40:20 -05:00
parent fe59c77230
commit 84dd01fd00

View file

@ -5,13 +5,13 @@ const text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis in q
var font = readFont("tests/fonts/Roboto-Regular_1.ttf")
font.size = 16
timeIt "typeset":
discard font.typeset(text, vec2(500, 0))
let
image = newImage(500, 300)
mask = newMask(500, 300)
timeIt "typeset":
discard font.typeset(text, bounds = image.wh)
timeIt "rasterize":
image.fill(rgba(255, 255, 255, 255))
image.fillText(font, text, rgba(0, 0, 0, 255), bounds = image.wh)