diff options
Diffstat (limited to 'dvi/mdvi-lib')
-rw-r--r-- | dvi/mdvi-lib/font.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dvi/mdvi-lib/font.c b/dvi/mdvi-lib/font.c index ca3436c..fedb7e7 100644 --- a/dvi/mdvi-lib/font.c +++ b/dvi/mdvi-lib/font.c @@ -162,6 +162,7 @@ font_reference( { DviFont *font; DviFontRef *ref; + DviFontRef *subfont_ref; /* see if there is a font with the same characteristics */ for(font = (DviFont *)fontlist.head; font; font = font->next) { @@ -185,7 +186,13 @@ font_reference( } ref = xalloc(DviFontRef); ref->ref = font; + font->links++; + for(subfont_ref = font->subfonts; subfont_ref; subfont_ref = subfont_ref->next) { + /* just adjust the reference counts */ + subfont_ref->ref->links++; + } + ref->fontid = id; if(LIST(font) != fontlist.head) { |