summaryrefslogtreecommitdiff
path: root/fonttosfnt.c
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2019-08-02 14:03:15 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2019-12-25 13:20:57 +0100
commitbdcb892975de167b3d4258859234f0abe375f236 (patch)
tree56916f5051fad01f63fab8f2a403b8cc0b8422ef /fonttosfnt.c
parent0006f577898129c0c5d5e0996026641605705e08 (diff)
Accept a BDF font on stdin
This makes it easier to transition from bdftopcf. Although an OTB file could include fonts from multiple BDF sources, that functionality is not currently implemented for fonts read from stdin. Signed-off-by: Jouke Witteveen <j.witteveen@gmail.com>
Diffstat (limited to 'fonttosfnt.c')
-rw-r--r--fonttosfnt.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fonttosfnt.c b/fonttosfnt.c
index 90d3d95..062ef3e 100644
--- a/fonttosfnt.c
+++ b/fonttosfnt.c
@@ -40,7 +40,7 @@ usage(void)
fprintf(stderr, "Usage:\n");
fprintf(stderr,
"fonttosfnt [ -v ] [ -c ] [ -b ] [ -r ] [ -g n ] [ -m n ] -o font.otb "
- "[ -- ] font ...\n");
+ "[ -- ] [ font ] ...\n");
}
int
@@ -106,7 +106,11 @@ main(int argc, char **argv)
font = makeFont();
- while(i < argc) {
+ if(i == argc) {
+ rc = readFile(NULL, font);
+ if(rc != 0)
+ exit(1);
+ } else while(i < argc) {
rc = readFile(argv[i], font);
if(rc != 0)
exit(1);