bdf2sfd

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

commit c3664d914e82b5456f7b9d4b33aa1ea0126c9c39
parent 0eb88b83df692aa56a6ecea5e407982efe5315ea
Author: Frederic Cambus <fred@statdns.com>
Date:   Fri, 17 Jan 2020 12:13:29 +0100

Generate and output "CreationTime" timestamp in the output header.

Diffstat:
Msrc/header.c | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/header.c b/src/header.c @@ -4,17 +4,21 @@ * https://github.com/fcambus/bdftosfd * * Created: 2019-11-21 - * Last Updated: 2019-12-23 + * Last Updated: 2020-01-17 * * bdftosfd is released under the BSD 2-Clause license * See LICENSE file for details */ +#include <sys/time.h> #include <stdio.h> void header(FILE *stream, char *name, char *chars) { + struct timeval tv; + gettimeofday(&tv, NULL); + fprintf(stream, "SplineFontDB: 3.0\n"); fprintf(stream, "FontName: %s\n", name); fprintf(stream, "FullName: %s\n", name); @@ -33,7 +37,7 @@ header(FILE *stream, char *name, char *chars) fprintf(stream, "OS2Version: 0\n"); fprintf(stream, "OS2_WeightWidthSlopeOnly: 0\n"); fprintf(stream, "OS2_UseTypoMetrics: 0\n"); - fprintf(stream, "CreationTime: 1575314000\n"); + fprintf(stream, "CreationTime: %ld\n", tv.tv_sec); fprintf(stream, "PfmFamily: 33\n"); fprintf(stream, "TTFWeight: 500\n"); fprintf(stream, "TTFWidth: 5\n");