Previously, when rendering a tiny black-and-white bitmap font such as turquoise-hexagon/cherry or lucy/tewi-font, the code would panic with an out of bounds error:
This commit fixes the issue by rewriting the loop that draws bitmap pixels to the image canvas.
Previously, this loop tries to be fast by unrolling it to draw 8 pixels per iteration, but this was causing the panic to occur. Rather than figuring out more checks to safe-guard this loop, I rewrote it to use a simplier copy loop.
A test case for turquoise-hexagon/cherry was added to ensure that the code works as expected in the future. The new test case draws a "Hello, world!" string onto the top of the out.png image.
Previously, when rendering a tiny black-and-white bitmap font such as turquoise-hexagon/cherry or lucy/tewi-font, the code would panic with an out of bounds error:
This commit fixes the issue by rewriting the loop that draws bitmap pixels to the image canvas.
Previously, this loop tries to be fast by unrolling it to draw 8 pixels per iteration, but this was causing the panic to occur. Rather than figuring out more checks to safe-guard this loop, I rewrote it to use a simplier copy loop.
A test case for turquoise-hexagon/cherry was added to ensure that the code works as expected in the future. The new test case draws a "Hello, world!" string onto the top of the
out.png
image.