#define PS_MAXWIDTH 255
static void ps_comment(FILE *fp, char const *leader, word *words);
-static void ps_token(FILE *fp, int *cc, char const *fmt, ...);
static void ps_string_len(FILE *fp, int *cc, char const *str, int len);
static void ps_string(FILE *fp, int *cc, char const *str);
fprintf(fp, "\n");
}
-static void ps_token(FILE *fp, int *cc, char const *fmt, ...) {
+void ps_token(FILE *fp, int *cc, char const *fmt, ...) {
va_list ap;
va_start(ap, fmt);
size_t *breaks, glyfoff, glyflen;
void *glyfptr, *glyfend, *locaptr, *locaend;
unsigned *loca;
+ int cc = 0;
/* XXX Unclear that this is the correct format. */
fprintf(ofp, "%%!PS-TrueTypeFont-%u-%u\n", sf->osd.scaler_type,
fprintf(ofp, "0 1 %u{currentfile token pop exch def}bind for\n",
sf->nglyphs - 1);
for (i = 0; i < sf->nglyphs; i++)
- fprintf(ofp, "/%s\n", glyph_extern(sfnt_indextoglyph(sf, i)));
- fprintf(ofp, "end readonly def\n");
+ ps_token(ofp, &cc, "/%s", glyph_extern(sfnt_indextoglyph(sf, i)));
+ fprintf(ofp, "\nend readonly def\n");
fprintf(ofp, "/sfnts [<");
breaks = snewn(sf->osd.numTables + sf->nglyphs, size_t);
for (i = 0; i < sf->osd.numTables; i++) {
char *pdf_outline_convert(wchar_t *s, int *len);
/*
+ * Function exported from bk_ps.c
+ */
+void ps_token(FILE *fp, int *cc, char const *fmt, ...);
+
+/*
* Backend functions exported by in_pf.c
*/
void pf_part1(font_info *fi, char **bufp, size_t *lenp);