From ae6133691a9d4c044cd2fd14d00e606f194e873e Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 9 May 2006 22:13:58 +0000 Subject: [PATCH] When setting up a font, if we've done that font already, return the existing instance. This saves outputting each font several times. git-svn-id: svn://svn.tartarus.org/sgt/halibut@6668 cda61777-01e9-0310-a592-d414129be87e --- bk_paper.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bk_paper.c b/bk_paper.c index dd90256..c4aac9c 100644 --- a/bk_paper.c +++ b/bk_paper.c @@ -1371,6 +1371,10 @@ static font_data *make_std_font(font_list *fontlist, char const *name) font_encoding *fe; int i; + for (fe = fontlist->head; fe; fe = fe->next) + if (strcmp(fe->font->name, name) == 0) + return fe->font; + /* XXXKERN */ widths = ps_std_font_widths(name); kerns = ps_std_font_kerns(name); -- 2.11.0