vcl/source/fontsubset/sft.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6367b8ddda53ec44f2bbeb4cb75efa9fb95350ac
Author: Pedro Giffuni <p...@apache.org>
Date:   Sat Oct 15 15:42:54 2016 +0000

    Adapt TrueType font detection for the Apple specification variant.
    
    From the Microsoft OpenType Specification:
    https://www.microsoft.com/typography/otspec/otff.htm
    
    NOTE: The Apple specification for TrueType fonts allows for 'true' and
    'typ1' for sfnt version. These version tags should not be used for fonts
    which contain OpenType tables.
    ____
    
    We are complying with the OpenType usage fine but we were not taking into
    account the NOTE so Apple TrueType variants would not be recognized.
    
    Apparently valid values are 0x00010000 and 0x00020000. Keep it simple and
    just assume any value different than zero is valid here.

diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index eec3875..141bd1e 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -1738,7 +1738,7 @@ static int doOpenTTFont( sal_uInt32 facenum, 
TrueTypeFont* t )
     } else if (version == T_otto) {                         /* PS-OpenType 
font */
         tdoffset = 0;
     } else if (version == T_ttcf) {                         /* TrueType 
collection */
-        if (GetUInt32(t->ptr, 4, 1) != 0x00010000) {
+        if (GetUInt32(t->ptr, 4, 1) == 0x00000000) {
             CloseTTFont(t);
             return SF_TTFORMAT;
         }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to