summaryrefslogtreecommitdiff
path: root/poppler
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2006-03-11 15:19:02 +0000
committerAlbert Astals Cid <aacid@kde.org>2006-03-11 15:19:02 +0000
commit1a90b3aaf6be4ca3ebb47e904842b1e14a0e8dfc (patch)
treeba683ad729f60a3c00593d9706de8feaf4d31681 /poppler
parent22b1618185ec70895ec644d9e590c266ff98c9db (diff)
* poppler/FontInfo.cc:
* poppler/FontInfo.h: Add getFile() function that returns the path of the font that is beign used in the system to represent that font * qt4/src/poppler-document.cc: * qt4/src/poppler-fontinfo.cc: * qt4/src/poppler-private.h: * qt4/src/poppler-qt4.h: Add the file() function * qt4/tests/poppler-fonts.cpp: Show the path of the font used to represent each font May be interesting to have in the other frontends
Diffstat (limited to 'poppler')
-rw-r--r--poppler/FontInfo.cc10
-rw-r--r--poppler/FontInfo.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/poppler/FontInfo.cc b/poppler/FontInfo.cc
index 335ce5ca..d9defa39 100644
--- a/poppler/FontInfo.cc
+++ b/poppler/FontInfo.cc
@@ -152,6 +152,14 @@ FontInfo::FontInfo(GfxFont *font, PDFDoc *doc) {
} else {
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();
@@ -186,6 +194,7 @@ FontInfo::FontInfo(GfxFont *font, PDFDoc *doc) {
FontInfo::FontInfo(FontInfo& f) {
name = f.name->copy();
+ file = f.file->copy();
type = f.type;
emb = f.emb;
subset = f.subset;
@@ -195,4 +204,5 @@ FontInfo::FontInfo(FontInfo& f) {
FontInfo::~FontInfo() {
delete name;
+ delete file;
}
diff --git a/poppler/FontInfo.h b/poppler/FontInfo.h
index f2020e85..e58237bb 100644
--- a/poppler/FontInfo.h
+++ b/poppler/FontInfo.h
@@ -25,6 +25,7 @@ public:
~FontInfo();
GooString *getName() { return name; };
+ GooString *getFile() { return file; };
Type getType() { return type; };
GBool getEmbedded() { return emb; };
GBool getSubset() { return subset; };
@@ -32,6 +33,7 @@ public:
private:
GooString *name;
+ GooString *file;
Type type;
GBool emb;
GBool subset;