"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "xpdf/pdffonts.cc" between
xpdf-4.01.01.tar.gz and xpdf-4.02.tar.gz

About: Xpdf is a PDF viewer for X.

pdffonts.cc  (xpdf-4.01.01):pdffonts.cc  (xpdf-4.02)
skipping to change at line 162 skipping to change at line 162
// get page range // get page range
if (firstPage < 1) { if (firstPage < 1) {
firstPage = 1; firstPage = 1;
} }
if (lastPage < 1 || lastPage > doc->getNumPages()) { if (lastPage < 1 || lastPage > doc->getNumPages()) {
lastPage = doc->getNumPages(); lastPage = doc->getNumPages();
} }
// scan the fonts // scan the fonts
if (showFontLoc || showFontLocPS) { if (showFontLoc || showFontLocPS) {
printf("name type emb sub uni p printf("name type emb
rob object ID location\n"); sub uni prob object ID location\n");
printf("------------------------------------ ----------------- --- --- --- - printf("---------------------------------------------- ----------------- ---
--- --------- --------\n"); --- --- ---- --------- --------\n");
} else { } else {
printf("name type emb sub uni p printf("name type emb
rob object ID\n"); sub uni prob object ID\n");
printf("------------------------------------ ----------------- --- --- --- - printf("---------------------------------------------- ----------------- ---
--- ---------\n"); --- --- ---- ---------\n");
} }
fonts = NULL; fonts = NULL;
fontsLen = fontsSize = 0; fontsLen = fontsSize = 0;
numObjects = doc->getXRef()->getNumObjects(); numObjects = doc->getXRef()->getNumObjects();
seenObjs = (char *)gmalloc(numObjects); seenObjs = (char *)gmalloc(numObjects);
memset(seenObjs, 0, numObjects); memset(seenObjs, 0, numObjects);
for (pg = firstPage; pg <= lastPage; ++pg) { for (pg = firstPage; pg <= lastPage; ++pg) {
page = doc->getCatalog()->getPage(pg); page = doc->getCatalog()->getPage(pg);
if ((resDict = page->getResourceDict())) { if ((resDict = page->getResourceDict())) {
scanFonts(resDict, doc); scanFonts(resDict, doc);
skipping to change at line 305 skipping to change at line 305
} }
} }
patternDict2.free(); patternDict2.free();
patternDict1.free(); patternDict1.free();
// recursively scan any resource dictionaries in ExtGStates in this // recursively scan any resource dictionaries in ExtGStates in this
// resource dictionary // resource dictionary
resDict->lookupNF("ExtGState", &gsDict1); resDict->lookupNF("ExtGState", &gsDict1);
if (checkObject(&gsDict1, &gsDict2) && gsDict2.isDict()) { if (checkObject(&gsDict1, &gsDict2) && gsDict2.isDict()) {
for (i = 0; i < gsDict2.dictGetLength(); ++i) { for (i = 0; i < gsDict2.dictGetLength(); ++i) {
gsDict1.dictGetValNF(i, &gs1); gsDict2.dictGetValNF(i, &gs1);
if (checkObject(&gs1, &gs2) && gs2.isDict()) { if (checkObject(&gs1, &gs2) && gs2.isDict()) {
gs2.dictLookupNF("SMask", &smask1); gs2.dictLookupNF("SMask", &smask1);
if (checkObject(&smask1, &smask2) && smask2.isDict()) { if (checkObject(&smask1, &smask2) && smask2.isDict()) {
smask2.dictLookupNF("G", &smaskGroup1); smask2.dictLookupNF("G", &smaskGroup1);
if (checkObject(&smaskGroup1, &smaskGroup2) && if (checkObject(&smaskGroup1, &smaskGroup2) &&
smaskGroup2.isStream()) { smaskGroup2.isStream()) {
smaskGroup2.streamGetDict()->lookupNF("Resources", &resObj); smaskGroup2.streamGetDict()->lookupNF("Resources", &resObj);
scanFonts(&resObj, doc); scanFonts(&resObj, doc);
resObj.free(); resObj.free();
} }
skipping to change at line 378 skipping to change at line 378
if (name) { if (name) {
for (i = 0; i < name->getLength(); ++i) { for (i = 0; i < name->getLength(); ++i) {
if (name->getChar(i) < 'A' || name->getChar(i) > 'Z') { if (name->getChar(i) < 'A' || name->getChar(i) > 'Z') {
break; break;
} }
} }
subset = i > 0 && i < name->getLength() && name->getChar(i) == '+'; subset = i > 0 && i < name->getLength() && name->getChar(i) == '+';
} }
// print the font info // print the font info
printf("%-36s %-17s %-3s %-3s %-3s %-4s", printf("%-46s %-17s %-3s %-3s %-3s %-4s",
name ? name->getCString() : "[none]", name ? name->getCString() : "[none]",
fontTypeNames[font->getType()], fontTypeNames[font->getType()],
emb ? "yes" : "no", emb ? "yes" : "no",
subset ? "yes" : "no", subset ? "yes" : "no",
hasToUnicode ? "yes" : "no", hasToUnicode ? "yes" : "no",
font->problematicForUnicode() ? " X" : ""); font->problematicForUnicode() ? " X" : "");
if (fontRef.gen >= 100000) { if (fontRef.gen >= 100000) {
printf(" [none]"); printf(" [none]");
} else { } else {
printf(" %6d %2d", fontRef.num, fontRef.gen); printf(" %6d %2d", fontRef.num, fontRef.gen);
 End of changes. 4 change blocks. 
10 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)