plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit a36e66f0d200f99802ad32171c55d26ad44f501d
parent cc4571fec67407652b03d6603ada6580de2194dc
Author: matheuristic <matheuristic@users.noreply.github.com>
Date:   Sun, 20 Aug 2023 20:57:39 -0400

libdraw: fix subfont scaling

A subfont with n chars has n+1 Fontchars, so scalesubfont() needs to
scale all n+1 info entries.

Diffstat:
Msrc/libdraw/getsubfont.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libdraw/getsubfont.c b/src/libdraw/getsubfont.c @@ -122,7 +122,7 @@ scalesubfont(Subfont *f, int scale) f->height *= scale; f->ascent *= scale; - for(j=0; j<f->n; j++) { + for(j=0; j<=f->n; j++) { f->info[j].x *= scale; f->info[j].top *= scale; f->info[j].bottom *= scale;