From: Ben Harris Date: Sat, 2 Nov 2024 22:38:16 +0000 (+0000) Subject: Remove newlines from charstrings in TTX output X-Git-Tag: bedstead-3.246~60 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=627870cfbfaae8ba029c5d9124e28cb518197a02;p=bedstead.git Remove newlines from charstrings in TTX output This does make the file rather wide, but I think it also makes it easier to find what you're looking for. --- diff --git a/bedstead.c b/bedstead.c index c045cea..f19d470 100644 --- a/bedstead.c +++ b/bedstead.c @@ -3097,20 +3097,20 @@ main(int argc, char **argv) while (g->flags & IS_ALIAS) g = get_glyph_by_name(g->alias_of); if (g->flags & IS_SUBR) continue; - printf(" \n", g->name); + printf(" ", g->name); doglyph(g); g->flags = IS_SUBR; g->subr_idx = nsubrs++; - printf(" \n"); + printf("\n"); } } printf(" \n"); printf(" \n"); printf(" \n"); for (i = 0; i < nglyphs; i++) { - printf(" \n", glyphs[i].name); + printf(" ", glyphs[i].name); doglyph(&glyphs[i]); - printf(" \n"); + printf("\n"); } printf(" \n"); printf(" \n"); @@ -3308,8 +3308,8 @@ doglyph(struct glyph const *g) while (g->flags & IS_ALIAS) g = get_glyph_by_name(g->alias_of); if (g->flags & IS_SUBR) - printf(" %d callsubr\n", g->subr_idx - - (nsubrs < 1240 ? 107 : 1131)); + printf(" %d callsubr", + g->subr_idx - (nsubrs < 1240 ? 107 : 1131)); else if (g->flags & MOS6) domosaic(g->data[0], (g->flags & SEP) != 0); else if (g->flags & MOS4) @@ -3600,17 +3600,18 @@ emit_contour(point *p0, vec *cur) if (p->prev) p->prev->next = NULL; /* Break the loop. */ do { stacksize += 2; - printf(" %g %g %s\n", + printf(" %g %g%s", (double)(p->v.x - cur->x) / XSCALE, (double)(p->v.y - cur->y) / YSCALE, - p == p0 ? "rmoveto" : stacksize >= 48 ? "rlineto" : ""); + p == p0 ? " rmoveto" : + stacksize >= 48 ? " rlineto" : ""); stacksize %= 48; *cur = p->v; p1 = p->next; p->prev = p->next = NULL; p = p1; } while (p); - if (stacksize != 0) printf("rlineto\n"); + if (stacksize != 0) printf(" rlineto"); } static void @@ -3631,7 +3632,7 @@ emit_path(void) emit_contour(p, &cur); } } - printf("endchar\n"); + printf(" endchar"); } /*