bdf2sfd

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

commit ddab2563b937e05102f551061a21badef9ab9f55
parent 270afcec915fef8a82fd98da8c603fa8c276d928
Author: Frederic Cambus <fred@statdns.com>
Date:   Tue, 31 Dec 2019 09:56:58 +0100

Parse copyright line from the input font.

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

diff --git a/src/bdftosfd.c b/src/bdftosfd.c @@ -4,7 +4,7 @@ * https://github.com/fcambus/bdftosfd * * Created: 2019-11-21 - * Last Updated: 2019-12-23 + * Last Updated: 2019-12-31 * * bdftosfd is released under the BSD 2-Clause license * See LICENSE file for details @@ -108,12 +108,21 @@ main(int argc, char *argv[]) bool readglyph = false; char *token = NULL; - char *chars, *charname, *encoding; + char *chars, *charname, *copyright, *encoding; int32_t x, y; while (fgets(lineBuffer, LINE_LENGTH_MAX, bdfFile)) { if (*lineBuffer) { + if (!strncmp(lineBuffer, "COPYRIGHT ", 10)) { + token = strtok(lineBuffer, " \t"); + + if (token) + copyright = strtok(NULL, "\n"); + + continue; + } + if (!strncmp(lineBuffer, "CHARS ", 6)) { token = strtok(lineBuffer, " \t");