diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-09-11 17:11:33 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-09-12 10:28:04 +0100 |
commit | 02f8f895f2abc4ee090b4bd42963590aa018fb49 (patch) | |
tree | e3b6bc7d4ed196539e30f496dc141bab60f80551 | |
parent | 682db177b035a78b460065d457abd5b2a66cc268 (diff) |
Related: fdo#82259 support version 2 ttc fonts on Linux
a lot of Mac OSX fonts are in this format, and we're not
seeing them under Linux
Change-Id: I8a6974ccb43afadec320331eb26bc4a2df9b13c9
-rw-r--r-- | vcl/source/fontsubset/sft.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index aca8885bfd32..1b5b477d6417 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -1486,14 +1486,15 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t ) sal_uInt32 tdoffset = 0; /* offset to TableDirectory in a TTC file. For TTF files is 0 */ int indexfmt; - sal_uInt32 version = GetInt32(t->ptr, 0, 1); + sal_uInt32 TTCTag = GetInt32(t->ptr, 0, 1); - if ((version == 0x00010000) || (version == T_true)) { + if ((TTCTag == 0x00010000) || (TTCTag == T_true)) { tdoffset = 0; - } else if (version == T_otto) { /* PS-OpenType font */ + } else if (TTCTag == T_otto) { /* PS-OpenType font */ tdoffset = 0; - } else if (version == T_ttcf) { /* TrueType collection */ - if (GetUInt32(t->ptr, 4, 1) != 0x00010000) { + } else if (TTCTag == T_ttcf) { /* TrueType collection */ + sal_uInt32 Version = GetUInt32(t->ptr, 4, 1); + if (Version != 0x00010000 && Version != 0x00020000) { CloseTTFont(t); return SF_TTFORMAT; } |