summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorHerbert Duerr [hdu] <duerr@sun.com>2010-06-16 13:37:56 +0200
committerHerbert Duerr [hdu] <duerr@sun.com>2010-06-16 13:37:56 +0200
commitd4aea4bdcdb51ef96ea28cf603b181c1423e9a06 (patch)
treef1414094372d907dbcb283fd8a798de5f6a91630 /vcl
parentc53cc530f5644c032f3fc93daf31e9301c5e302b (diff)
#i112379# improved symbol-flag heuristic for fonts
Diffstat (limited to 'vcl')
-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;