Update src/PIL/PcfFontFile.py

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
Aarni Koskela 2023-02-26 13:03:29 +02:00 committed by GitHub
parent c799bd8a03
commit bbbaf3c615
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -219,10 +219,10 @@ class PcfFontFile(FontFile.FontFile):
mode = "1"
for i in range(nbitmaps):
left, right = metrics[i][:2]
xsize, ysize = metrics[i][:2]
b, e = offsets[i : i + 2]
bitmaps.append(
Image.frombytes("1", (left, right), data[b:e], "raw", mode, pad(left))
Image.frombytes("1", (xsize, ysize), data[b:e], "raw", mode, pad(xsize))
)
return bitmaps