Process pixels in raster order

If we're imitating a CRT character generator, obviously we should
process pixels line-by-line, not column-by-column.  But that means
writing "for (y ...)" before "for (x ...)" which isn't the instinctive
way I did it.

So now that's corrected and the Y loops are outside the X loops, which
should make any debugging output easier to follow.  This has been
confirmed not to change FreeType rendering at 10.5 ppem.
This commit is contained in:
Ben Harris 2024-11-17 10:11:23 +00:00
parent 86f186342a
commit 15b8a9a584

View File

@ -4038,8 +4038,8 @@ dochar(struct glyph *g)
for (x = 0; x < XSIZE; x++) vstems[x] = 0;
for (y = 0; y < YSIZE; y++) hstems[y] = 0;
clearpath();
for (x = 0; x < XSIZE; x++) {
for (y = 0; y < YSIZE; y++) {
for (y = 0; y < YSIZE; y++) {
for (x = 0; x < XSIZE; x++) {
if (GETPIX(x, y)) {
bool tl, tr, bl, br;
@ -4188,8 +4188,8 @@ dochar_plotter(struct glyph *g)
} while (0)
clearpath();
for (x = 0; x < XSIZE; x++) {
for (y = 0; y < YSIZE; y++) {
for (y = 0; y < YSIZE; y++) {
for (x = 0; x < XSIZE; x++) {
if (GETPIX(x, y)) {
if (R) CONNECT(1, 0);
if (D) CONNECT(0, -1);