summaryrefslogtreecommitdiff
path: root/vcl/source/fontsubset/sft.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/fontsubset/sft.cxx')
-rw-r--r--vcl/source/fontsubset/sft.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 468d4be36b0a..43f24e5026ea 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -1397,6 +1397,7 @@ static void FindCmap(TrueTypeFont *ttf)
sal_uInt32 table_size = getTableSize(ttf, O_cmap);
sal_uInt16 ncmaps = GetUInt16(table, 2, 1);
unsigned int i;
+ sal_uInt32 AppleUni = 0; // Apple Unicode
sal_uInt32 ThreeZero = 0; /* MS Symbol */
sal_uInt32 ThreeOne = 0; /* MS UCS-2 */
sal_uInt32 ThreeTwo = 0; /* MS ShiftJIS */
@@ -1423,7 +1424,7 @@ static void FindCmap(TrueTypeFont *ttf)
/* Unicode tables in Apple fonts */
if (pID == 0) {
- ThreeOne = offset; break;
+ AppleUni = offset;
}
if (pID == 3) {
@@ -1440,6 +1441,10 @@ static void FindCmap(TrueTypeFont *ttf)
}
}
+ // fall back to AppleUnicode if there are no ThreeOne/Threezero tables
+ if( AppleUni && !ThreeZero && !ThreeOne)
+ ThreeOne = AppleUni;
+
if (ThreeOne) {
ttf->cmapType = CMAP_MS_Unicode;
ttf->cmap = table + ThreeOne;