diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2006-05-14 18:27:34 +0000 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2006-05-14 18:27:34 +0000 |
| commit | 2b31f230ff6fdeecad4ea63347100dd067a3b029 (patch) | |
| tree | d3603bda5ece75005bbdaa93e42d7b4385ab169a | |
| parent | e06921ba9541759101336126a6af96ab66b9ee2d (diff) | |
| download | halibut-2b31f230ff6fdeecad4ea63347100dd067a3b029.zip halibut-2b31f230ff6fdeecad4ea63347100dd067a3b029.tar.gz halibut-2b31f230ff6fdeecad4ea63347100dd067a3b029.tar.bz2 halibut-2b31f230ff6fdeecad4ea63347100dd067a3b029.tar.xz | |
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.
[originally from svn r6686]
| -rw-r--r-- | bk_ps.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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) |