A subfont struct with n chars has n+1 Fontchars in its info member.
Currently, when a subfont is scaled only n info entries are updated. Because of that, after scaling the last character uses an incorrect part of the subfont image for its glyph.
This pull request modifies scalesubfont() so all n+1 entries of info are scaled.
(All n+1 Fontchar entries appear necessary, see _unpackinfo() in src/libdraw/readsubfont.c .)
Example:
Using lucsans/euro.8.font font, whose first subfont range covers Unicode points 0x0000 through 0x00FF.
Before code change: on a non-HiDPI screen Unicode point 0x00FF "Latin Small Letter Y with Diaeresis" (ÿ) displays correctly, but the same character appears as an empty space when the font is scaled to 2x.
After code change: the character appears as expected post-scaling.
A subfont struct with n chars has n+1 Fontchars in its info member.
Currently, when a subfont is scaled only n info entries are updated. Because of that, after scaling the last character uses an incorrect part of the subfont image for its glyph.
This pull request modifies scalesubfont() so all n+1 entries of info are scaled.
(All n+1 Fontchar entries appear necessary, see
_unpackinfo()
insrc/libdraw/readsubfont.c
.)Example:
Using
lucsans/euro.8.font
font, whose first subfont range covers Unicode points 0x0000 through 0x00FF.Before code change: on a non-HiDPI screen Unicode point 0x00FF "Latin Small Letter Y with Diaeresis" (ÿ) displays correctly, but the same character appears as an empty space when the font is scaled to 2x.
After code change: the character appears as expected post-scaling.