So, I may be about to embarrass myself, because fencepost errors are
like that, but here goes.
If I look at the glyph /H in Source Sans Pro in a font editor, the top
right bound is a point at (562,656) and the bottom left point is at
(90,0). If I were to think about this as a bitmap, I can address row 0
and row 656, so there are 657 addressable rows.
Advertising
But when I render it to a bitmap in freetype, I get bitmap.rows == 656,
bitmap.width == 472 (562 minus the LSB of 90 is 472).
I seem to have lost a row somewhere - I can only address from rows 0 to
655. For example, this bitmap is an array with bitmap.rows *
bitmap.width = 309632 elements. If I wanted to address the top right
point, I would set:
y = 656
x = 472
and then address:
bitmap[ y * bitmap.width + x ]
bitmap[ 310104 ]
and oops, I'm off the end of the array.
Is this a problem with freetype, or in my assumptions?
_______________________________________________
Freetype mailing list
Freetype@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype