bdf2sfd

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

commit 7b651290926c783623440817c1adf6d27fdf47fe
parent bd0b152cc02fd42489ebab34549b52b07fd967f9
Author: Frederic Cambus <fred@statdns.com>
Date:   Tue,  3 Dec 2019 10:32:15 +0100

Detect BITMAP and ENDCHAR markers, they indicate when to parse glyph data.

Diffstat:
Msrc/bdftosfd.c | 13+++++++++++++
1 file changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/bdftosfd.c b/src/bdftosfd.c @@ -103,7 +103,20 @@ main(int argc, char *argv[]) { return EXIT_FAILURE; } + bool readglyph = false; + while (fgets(lineBuffer, LINE_LENGTH_MAX, bdfFile)) { + if (*lineBuffer) { + if (!strncmp(lineBuffer, "BITMAP", 6)) { + readglyph = true; + continue; + } + if (!strncmp(lineBuffer, "ENDCHAR", 7)) { + readglyph = false; + continue; + } + } + lines++; }