commit cd248ffb7ac0c6d13eb2584d195d7fe697fee09c
parent 2585ff151b8a756002a569914e257ca830333b91
Author: Frederic Cambus <fred@statdns.com>
Date: Thu, 8 Oct 2020 21:21:59 +0200
Reduce amount of fprintf() calls when outputting SFD header.
Diffstat:
M | src/header.c | | | 76 | ++++++++++++++++++++++++++++++++++++++-------------------------------------- |
1 file changed, 38 insertions(+), 38 deletions(-)
diff --git a/src/header.c b/src/header.c
@@ -4,7 +4,7 @@
* https://github.com/fcambus/bdf2sfd
*
* Created: 2019-11-21
- * Last Updated: 2020-03-30
+ * Last Updated: 2020-10-08
*
* bdf2sfd is released under the BSD 2-Clause license
* See LICENSE file for details
@@ -33,46 +33,46 @@ header(FILE *stream, struct fontinfo *font)
if (font->version)
fprintf(stream, "Version: %s\n", font->version);
- fprintf(stream, "ItalicAngle: 0\n");
- fprintf(stream, "UnderlinePosition: -100\n");
- fprintf(stream, "UnderlineWidth: 40\n");
+ fprintf(stream, "ItalicAngle: 0\n"
+ "UnderlinePosition: -100\n"
+ "UnderlineWidth: 40\n");
fprintf(stream, "Ascent: %i\n", font->ascent);
fprintf(stream, "Descent: %i\n", font->descent);
- fprintf(stream, "LayerCount: 2\n");
- fprintf(stream, "Layer: 0 0 \"Back\" 1\n");
- fprintf(stream, "Layer: 1 0 \"Fore\" 0\n");
- fprintf(stream, "FSType: 0\n");
- fprintf(stream, "OS2Version: 0\n");
- fprintf(stream, "OS2_WeightWidthSlopeOnly: 0\n");
- fprintf(stream, "OS2_UseTypoMetrics: 0\n");
+ fprintf(stream, "LayerCount: 2\n"
+ "Layer: 0 0 \"Back\" 1\n"
+ "Layer: 1 0 \"Fore\" 0\n"
+ "FSType: 0\n"
+ "OS2Version: 0\n"
+ "OS2_WeightWidthSlopeOnly: 0\n"
+ "OS2_UseTypoMetrics: 0\n");
fprintf(stream, "CreationTime: %ld\n", tv.tv_sec);
- fprintf(stream, "PfmFamily: 33\n");
- fprintf(stream, "TTFWeight: 500\n");
- fprintf(stream, "TTFWidth: 5\n");
- fprintf(stream, "LineGap: 72\n");
- fprintf(stream, "VLineGap: 0\n");
- fprintf(stream, "Panose: 2 0 6 4 0 0 0 0 0 0\n");
- fprintf(stream, "OS2TypoAscent: 0\n");
- fprintf(stream, "OS2TypoAOffset: 1\n");
- fprintf(stream, "OS2TypoDescent: 0\n");
- fprintf(stream, "OS2TypoDOffset: 1\n");
- fprintf(stream, "OS2TypoLinegap: 0\n");
- fprintf(stream, "OS2WinAscent: 0\n");
- fprintf(stream, "OS2WinAOffset: 1\n");
- fprintf(stream, "OS2WinDescent: 0\n");
- fprintf(stream, "OS2WinDOffset: 1\n");
- fprintf(stream, "HheadAscent: 0\n");
- fprintf(stream, "HheadAOffset: 1\n");
- fprintf(stream, "HheadDescent: 0\n");
- fprintf(stream, "HheadDOffset: 1\n");
- fprintf(stream, "OS2Vendor: 'PfEd'\n");
- fprintf(stream, "Encoding: UnicodeBmp\n");
- fprintf(stream, "UnicodeInterp: none\n");
- fprintf(stream, "DisplaySize: -24\n");
- fprintf(stream, "AntiAlias: 0\n");
- fprintf(stream, "FitToEm: 1\n");
- fprintf(stream, "WinInfo: 64 16 4\n");
- fprintf(stream, "TeXData: 1 0 0 346030 173015 115343 0 1048576 115343 "
+ fprintf(stream, "PfmFamily: 33\n"
+ "TTFWeight: 500\n"
+ "TTFWidth: 5\n"
+ "LineGap: 72\n"
+ "VLineGap: 0\n"
+ "Panose: 2 0 6 4 0 0 0 0 0 0\n"
+ "OS2TypoAscent: 0\n"
+ "OS2TypoAOffset: 1\n"
+ "OS2TypoDescent: 0\n"
+ "OS2TypoDOffset: 1\n"
+ "OS2TypoLinegap: 0\n"
+ "OS2WinAscent: 0\n"
+ "OS2WinAOffset: 1\n"
+ "OS2WinDescent: 0\n"
+ "OS2WinDOffset: 1\n"
+ "HheadAscent: 0\n"
+ "HheadAOffset: 1\n"
+ "HheadDescent: 0\n"
+ "HheadDOffset: 1\n"
+ "OS2Vendor: 'PfEd'\n"
+ "Encoding: UnicodeBmp\n"
+ "UnicodeInterp: none\n"
+ "DisplaySize: -24\n"
+ "AntiAlias: 0\n"
+ "FitToEm: 1\n"
+ "WinInfo: 64 16 4\n"
+ "TeXData: 1 0 0 346030 173015 115343 0 1048576 115343 "
"783286 444596 497025 792723 393216 433062 380633 "
"303038 157286 324010 404750 52429 2506097 1059062 "
"262144\n");