From 3e32e06c2e95cae66f921be9da2a0993f4fde752 Mon Sep 17 00:00:00 2001 From: ben Date: Sun, 14 May 2006 18:27:34 +0000 Subject: [PATCH] There's no need to reset the font every line if it hasn't changed. This saves a few K and a lot of calls to scalefont and setfont, which is probably good. git-svn-id: svn://svn.tartarus.org/sgt/halibut@6686 cda61777-01e9-0310-a592-d414129be87e --- bk_ps.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bk_ps.c b/bk_ps.c index 496a7f6..61a7993 100644 --- a/bk_ps.c +++ b/bk_ps.c @@ -149,6 +149,8 @@ void ps_backend(paragraph *sourceform, keywordlist *keywords, for (page = doc->pages; page; page = page->next) { text_fragment *frag, *frag_end; rect *r; + font_encoding *fe; + int fs; pageno++; fprintf(fp, "%%%%Page: %d %d\n", pageno, pageno); @@ -183,9 +185,9 @@ void ps_backend(paragraph *sourceform, keywordlist *keywords, } frag = page->first_text; + fe = NULL; + fs = -1; while (frag) { - font_encoding *fe; - int fs; char *c; /* @@ -198,9 +200,6 @@ void ps_backend(paragraph *sourceform, keywordlist *keywords, fprintf(fp, "%g[", frag->y / FUNITS_PER_PT); - fe = NULL; - fs = -1; - while (frag && frag != frag_end) { if (frag->fe != fe || frag->fontsize != fs) -- 2.11.0