Commit | Line | Data |
---|---|---|
5391be11 EB |
1 | Propagate source font modification time to svg during conversion. Similar to |
2 | what upstream commit 95a470e941d9a20fbdaca51334e8b6b9d93cfae4 did for TTF | |
3 | files. | |
4 | ||
5 | Submitted upstream at http://github.com/fontforge/fontforge/pull/2696 | |
6 | ||
7 | --- a/fontforge/svg.c | |
8 | +++ b/fontforge/svg.c | |
9 | @@ -27,7 +27,6 @@ | |
10 | #include "fontforgevw.h" | |
11 | #include <unistd.h> | |
12 | #include <math.h> | |
13 | -#include <time.h> | |
14 | #include <locale.h> | |
15 | #include <utype.h> | |
16 | #include <chardata.h> | |
17 | @@ -62,7 +61,6 @@ static int svg_outfontheader(FILE *file, SplineFont *sf,int layer) { | |
18 | BlueData bd; | |
19 | char *hash, *hasv, ch; | |
20 | int minu, maxu, i; | |
21 | - time_t now; | |
22 | const char *author = GetAuthor(); | |
23 | ||
24 | memset(&info,0,sizeof(info)); | |
25 | @@ -78,9 +76,8 @@ static int svg_outfontheader(FILE *file, SplineFont *sf,int layer) { | |
26 | fprintf( file, "\n-->\n" ); | |
27 | } | |
28 | fprintf( file, "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\">\n" ); | |
29 | - time(&now); | |
30 | fprintf( file, "<metadata>\nCreated by FontForge %d at %s", | |
31 | - FONTFORGE_VERSIONDATE_RAW, ctime(&now) ); | |
32 | + FONTFORGE_VERSIONDATE_RAW, ctime((time_t*)&sf->modificationtime) ); | |
33 | if ( author!=NULL ) | |
34 | fprintf(file," By %s\n", author); | |
35 | else |