[poppler] poppler/qt4/tests: check_fonts.cpp,1.1,1.2
Brad Hards
bradh at freedesktop.org
Sun Dec 4 11:48:27 PST 2005
Update of /cvs/poppler/poppler/qt4/tests
In directory gabe:/tmp/cvs-serv6925/qt4/tests
Modified Files:
check_fonts.cpp
Log Message:
Add checking for Type3 fonts in the unit test.
Index: check_fonts.cpp
===================================================================
RCS file: /cvs/poppler/poppler/qt4/tests/check_fonts.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- check_fonts.cpp 4 Dec 2005 10:05:22 -0000 1.1
+++ check_fonts.cpp 4 Dec 2005 19:48:25 -0000 1.2
@@ -9,6 +9,7 @@
private slots:
void checkNoFonts();
void checkType1();
+ void checkType3();
};
void TestFontsData::checkNoFonts()
@@ -37,6 +38,29 @@
QCOMPARE( listOfFonts.at(0).isSubset(), false );
}
+void TestFontsData::checkType3()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/tests/type3.pdf");
+ QVERIFY( doc );
+
+ QList<Poppler::FontInfo> listOfFonts = doc->fonts();
+ QCOMPARE( listOfFonts.size(), 2 );
+ QCOMPARE( listOfFonts.at(0).name(), QString("Helvetica") );
+ QCOMPARE( listOfFonts.at(0).type(), Poppler::FontInfo::Type1 );
+ QCOMPARE( listOfFonts.at(0).typeName(), QString("Type 1") );
+
+ QCOMPARE( listOfFonts.at(0).isEmbedded(), false );
+ QCOMPARE( listOfFonts.at(0).isSubset(), false );
+
+ QCOMPARE( listOfFonts.at(1).name(), QString("") );
+ QCOMPARE( listOfFonts.at(1).type(), Poppler::FontInfo::Type3 );
+ QCOMPARE( listOfFonts.at(1).typeName(), QString("Type 3") );
+
+ QCOMPARE( listOfFonts.at(1).isEmbedded(), true );
+ QCOMPARE( listOfFonts.at(1).isSubset(), false );
+}
+
QTEST_MAIN(TestFontsData)
#include "check_fonts.moc"
More information about the poppler
mailing list