summaryrefslogtreecommitdiff
path: root/poppler
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2006-02-04 20:34:13 +0000
committerAlbert Astals Cid <aacid@kde.org>2006-02-04 20:34:13 +0000
commitfd85a0afdd7b4cafc68df400d4f94fccaea18c76 (patch)
tree8e8504059ed5207e300647d22d43ed40af657245 /poppler
parent67ca9d01f8badcf542f60b23521c384c9840ca1b (diff)
Remove bug from "do not use an external file to pass fonts to Freetype" patch, patch by Stefan Schweizer
Diffstat (limited to 'poppler')
-rw-r--r--poppler/SplashOutputDev.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index 5dcb614d..2675c81a 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -1042,8 +1042,11 @@ void SplashOutputDev::updateFont(GfxState *state) {
}
break;
case fontTrueType:
- if ((ff = FoFiTrueType::load(fileName->getCString())) ||
- (ff = new FoFiTrueType(tmpBuf, tmpBufLen, gFalse))) {
+ if (fileName)
+ ff = FoFiTrueType::load(fileName->getCString());
+ else
+ ff = new FoFiTrueType(tmpBuf, tmpBufLen, gFalse);
+ if (ff) {
codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff);
n = 256;
delete ff;
@@ -1077,8 +1080,11 @@ void SplashOutputDev::updateFont(GfxState *state) {
if (dfp) {
// create a CID-to-GID mapping, via Unicode
if ((ctu = ((GfxCIDFont *)gfxFont)->getToUnicode())) {
- if ((ff = FoFiTrueType::load(fileName->getCString())) ||
- (ff = new FoFiTrueType(tmpBuf, tmpBufLen, gFalse))) {
+ if (fileName)
+ ff = FoFiTrueType::load(fileName->getCString());
+ else
+ ff = new FoFiTrueType(tmpBuf, tmpBufLen, gFalse);
+ if (ff) {
// look for a Unicode cmap
for (cmap = 0; cmap < ff->getNumCmaps(); ++cmap) {
if ((ff->getCmapPlatform(cmap) == 3 &&