summaryrefslogtreecommitdiff
path: root/poppler
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2006-03-16 19:21:11 +0000
committerAlbert Astals Cid <aacid@kde.org>2006-03-16 19:21:11 +0000
commit7ed6737b00ece7ca00cee1d148752b11700370e6 (patch)
treebb8034a890ce3dd9160f11eb7e63b9a0f20fa24a /poppler
parenta34688ee29e1cdfcbaca232cf005af55af87f796 (diff)
poppler/FontInfo.cc: Embedded fonts don't have a font file
Diffstat (limited to 'poppler')
-rw-r--r--poppler/FontInfo.cc20
1 files changed, 12 insertions, 8 deletions
diff --git a/poppler/FontInfo.cc b/poppler/FontInfo.cc
index d9defa39..84221280 100644
--- a/poppler/FontInfo.cc
+++ b/poppler/FontInfo.cc
@@ -153,14 +153,6 @@ FontInfo::FontInfo(GfxFont *font, PDFDoc *doc) {
name = NULL;
}
- DisplayFontParam *dfp = globalParams->getDisplayFont(font);
- if (dfp)
- {
- if (dfp->kind == displayFontT1) file = dfp->t1.fileName->copy();
- else file = dfp->tt.fileName->copy();
- }
- else file = NULL;
-
// font type
type = (FontInfo::Type)font->getType();
@@ -171,6 +163,18 @@ FontInfo::FontInfo(GfxFont *font, PDFDoc *doc) {
emb = font->getEmbeddedFontID(&embRef);
}
+ if (!emb)
+ {
+ DisplayFontParam *dfp = globalParams->getDisplayFont(font);
+ if (dfp)
+ {
+ if (dfp->kind == displayFontT1) file = dfp->t1.fileName->copy();
+ else file = dfp->tt.fileName->copy();
+ }
+ else file = NULL;
+ }
+ else file = NULL;
+
// look for a ToUnicode map
hasToUnicode = gFalse;
if (doc->getXRef()->fetch(fontRef.num, fontRef.gen, &fontObj)->isDict()) {