bdf2sfd

BDF to SFD converter, allowing to vectorize bitmap fonts
Log | Files | Refs | README | LICENSE

commit 4476c296633919d99961f08c44644131375d4c28
parent 7aa198c8ca4c2d26e129d6a3b241a809637a6c87
Author: Frederic Cambus <fred@statdns.com>
Date:   Tue, 28 Jan 2020 18:23:23 +0100

Switch mask and row variables to uint32_t to allow processing widths larger than 16 pixels.

Diffstat:
Msrc/bdftosfd.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/bdftosfd.c b/src/bdftosfd.c @@ -114,7 +114,8 @@ main(int argc, char *argv[]) int32_t height = 0, width = 0; int32_t ascent = 0, descent = 0; - int32_t x = 0, y = 0, mask = 0; + int32_t x = 0, y = 0; + uint32_t mask = 0; int32_t xlength = 64, ylength = 64; /* Default values for 8x16 fonts */ struct fontinfo font; @@ -283,7 +284,7 @@ main(int argc, char *argv[]) } if (readglyph) { - int32_t row = strtol(lineBuffer, NULL, 16); + uint32_t row = strtoul(lineBuffer, NULL, 16); for (size_t column = 0; column < width; column++) { if ((row & (mask >> column)) != 0) {