commit 951446a77417743b8ed900cb1b5a1ae08522840e
parent 95ab1308b410ad8547e38e47ec4a36f560dcece5
Author: Russ Cox <rsc@swtch.com>
Date: Sat, 18 Jul 2020 19:51:24 -0400
draw: use int for Cacheinfo x field
With very large fonts (72pt or so) I see bad cache glyphs,
and this fixes it. Not entirely sure exactly which code
is overflowing, but something is.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/draw.h b/include/draw.h
@@ -290,7 +290,7 @@ struct Cachefont
struct Cacheinfo
{
- ushort x; /* left edge of bits */
+ int x; /* left edge of bits */
uchar width; /* width of baseline */
schar left; /* offset of baseline */
Rune value; /* value of character at this slot in cache */