From 90b5c251fd86c444f54184d0d30e3d6462cbb7ae Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 14 May 2017 08:16:42 +0100 Subject: Fill in the 'filetype' field for standard PS fonts. This was another valgrind-spotted uninitialised variable. And although you'd think the 'filetype' field is unimportant for fonts that aren't loaded from a file anyway, it is important, because bk_pdf.c emits different code for creating font subsets of Type 1 and TrueType fonts - i.e. it needs to know what type the font has _after_ it's loaded, not just how to load it. --- psdata.c | 1 + 1 file changed, 1 insertion(+) (limited to 'psdata.c') diff --git a/psdata.c b/psdata.c index 8a01641..b5c8b5c 100644 --- a/psdata.c +++ b/psdata.c @@ -4553,6 +4553,7 @@ void init_std_fonts(void) { font_info *fi = snew(font_info); fi->fontfile = NULL; fi->name = ps_std_fonts[i].name; + fi->filetype = TYPE1; /* for purposes of making subset fonts */ fi->widths = newtree234(width_cmp); for (j = 0; j < (int)lenof(fi->bmp); j++) fi->bmp[j] = NOGLYPH; -- cgit v1.1