diff options
author | Nickolay V. Shmyrev <nshmyrev@yandex.ru> | 2006-11-16 15:58:37 (GMT) |
---|---|---|
committer | Nickolay V. Shmyrev <nshmyrev@src.gnome.org> | 2006-11-16 15:58:37 (GMT) |
commit | 4a54de2ac54b0e301382ad56eff1ce4c1935fcde (patch) | |
tree | 64464826dcdc9490126a31cc1842a930c6d62c64 /dvi/mdvi-lib | |
parent | f444faebb607e14ba75193545a98c5cd00a2da2d (diff) |
Add reference to subfont. Fixes bug #374277.
2006-11-16 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
* dvi/dvi-document.c: (dvi_document_load), (dvi_document_finalize),
(dvi_document_class_init), (dvi_document_init_params):
* dvi/mdvi-lib/font.c: (font_reference):
Add reference to subfont. Fixes bug #374277.
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) { |