summaryrefslogtreecommitdiff
path: root/splash
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2014-09-30 18:48:47 +0200
committerAlbert Astals Cid <aacid@kde.org>2014-09-30 18:48:47 +0200
commit01723aa17e836e818158dbdc56df642a290be300 (patch)
tree581f3e812c27741ba9466c8998c1d3a9e250655f /splash
parent529db4a94607c1ad909764d26f740c601bbe896f (diff)
Map Standard/Expert encoding ligatures to AGLFN names
for use with substitute fonts that are not compatible with the Standard 14 fonts. Bug 80093
Diffstat (limited to 'splash')
-rw-r--r--splash/SplashFTFontFile.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/splash/SplashFTFontFile.cc b/splash/SplashFTFontFile.cc
index 34f6ce5c..f0dcf503 100644
--- a/splash/SplashFTFontFile.cc
+++ b/splash/SplashFTFontFile.cc
@@ -12,6 +12,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
+// Copyright (C) 2014 Adrian Johnson <ajohnson@redneon.com>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -28,6 +29,7 @@
#include "goo/gmem.h"
#include "goo/GooString.h"
+#include "poppler/GfxFont.h"
#include "SplashFTFontEngine.h"
#include "SplashFTFont.h"
#include "SplashFTFontFile.h"
@@ -57,6 +59,12 @@ SplashFontFile *SplashFTFontFile::loadType1Font(SplashFTFontEngine *engineA,
codeToGIDA[i] = 0;
if ((name = encA[i])) {
codeToGIDA[i] = (int)FT_Get_Name_Index(faceA, (char *)name);
+ if (codeToGIDA[i] == 0) {
+ name = GfxFont::getAlternateName(name);
+ if (name) {
+ codeToGIDA[i] = FT_Get_Name_Index(faceA, (char *)name);
+ }
+ }
}
}