You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by pf...@apache.org on 2016/10/15 15:42:54 UTC

svn commit: r1765086 - /openoffice/trunk/main/vcl/source/fontsubset/sft.cxx

Author: pfg
Date: Sat Oct 15 15:42:54 2016
New Revision: 1765086

URL: http://svn.apache.org/viewvc?rev=1765086&view=rev
Log:
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.

Modified:
    openoffice/trunk/main/vcl/source/fontsubset/sft.cxx

Modified: openoffice/trunk/main/vcl/source/fontsubset/sft.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/fontsubset/sft.cxx?rev=1765086&r1=1765085&r2=1765086&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/source/fontsubset/sft.cxx (original)
+++ openoffice/trunk/main/vcl/source/fontsubset/sft.cxx Sat Oct 15 15:42:54 2016
@@ -1738,7 +1738,7 @@ static int doOpenTTFont( sal_uInt32 face
     } 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;
         }