[poppler] poppler/poppler: FontInfo.cc,1.8,1.9 FontInfo.h,1.3,1.4
Albert Astals Cid
aacid at kemper.freedesktop.org
Sat Mar 11 07:19:05 PST 2006
Update of /cvs/poppler/poppler/poppler
In directory kemper:/tmp/cvs-serv23798/poppler
Modified Files:
FontInfo.cc FontInfo.h
Log Message:
* 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
Index: FontInfo.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/FontInfo.cc,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- FontInfo.cc 23 Jan 2006 15:40:54 -0000 1.8
+++ FontInfo.cc 11 Mar 2006 15:19:02 -0000 1.9
@@ -152,6 +152,14 @@
} 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(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() {
delete name;
+ delete file;
}
Index: FontInfo.h
===================================================================
RCS file: /cvs/poppler/poppler/poppler/FontInfo.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- FontInfo.h 4 Jul 2005 08:10:16 -0000 1.3
+++ FontInfo.h 11 Mar 2006 15:19:02 -0000 1.4
@@ -25,6 +25,7 @@
~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 @@
private:
GooString *name;
+ GooString *file;
Type type;
GBool emb;
GBool subset;
More information about the poppler
mailing list