ref: bc25de66c112a9ff4722264330ada77b6e651408
parent: c52b129ccdf7526429764026a5761b61cd32be4b
author: Werner Lemberg <[email protected]>
date: Sat Nov 16 02:52:20 EST 2013
[sfnt] Fix `OS/2' table version 5 support. We now follow the `official' announcement from Microsoft (on the OpenType mailing list, which unfortunately hasn't a public archive). * include/freetype/tttables.h (TT_OS2): s/usLowerPointSize/usLowerOpticalPointSize/, s/usUpperPointSize/usUpperOpticalPointSize/. * src/sfnt/ttload.c (tt_face_load_os2): Update, and set correct default values.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2013-11-16 Werner Lemberg <[email protected]>
+
+ [sfnt] Fix `OS/2' table version 5 support.
+
+ We now follow the `official' announcement from Microsoft (on the
+ OpenType mailing list, which unfortunately hasn't a public archive).
+
+ * include/freetype/tttables.h (TT_OS2):
+ s/usLowerPointSize/usLowerOpticalPointSize/,
+ s/usUpperPointSize/usUpperOpticalPointSize/.
+
+ * src/sfnt/ttload.c (tt_face_load_os2): Update, and set correct
+ default values.
+
2013-11-13 Werner Lemberg <[email protected]>
* builds/unix/ft2unix.h: Remove. No longer necessary.
--- a/include/tttables.h
+++ b/include/tttables.h
@@ -398,8 +398,8 @@
/* only version 5 and higher: */
- FT_UShort usLowerPointSize; /* in twips (1/20th points) */
- FT_UShort usUpperPointSize; /* in twips (1/20th points) */
+ FT_UShort usLowerOpticalPointSize; /* in twips (1/20th points) */
+ FT_UShort usUpperOpticalPointSize; /* in twips (1/20th points) */
} TT_OS2;
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -1028,8 +1028,8 @@
static const FT_Frame_Field os2_fields_extra5[] =
{
FT_FRAME_START( 4 ),
- FT_FRAME_USHORT( usLowerPointSize ),
- FT_FRAME_USHORT( usUpperPointSize ),
+ FT_FRAME_USHORT( usLowerOpticalPointSize ),
+ FT_FRAME_USHORT( usUpperOpticalPointSize ),
FT_FRAME_END
};
@@ -1046,15 +1046,15 @@
if ( FT_STREAM_READ_FIELDS( os2_fields, os2 ) )
goto Exit;
- os2->ulCodePageRange1 = 0;
- os2->ulCodePageRange2 = 0;
- os2->sxHeight = 0;
- os2->sCapHeight = 0;
- os2->usDefaultChar = 0;
- os2->usBreakChar = 0;
- os2->usMaxContext = 0;
- os2->usLowerPointSize = 0;
- os2->usUpperPointSize = 0;
+ os2->ulCodePageRange1 = 0;
+ os2->ulCodePageRange2 = 0;
+ os2->sxHeight = 0;
+ os2->sCapHeight = 0;
+ os2->usDefaultChar = 0;
+ os2->usBreakChar = 0;
+ os2->usMaxContext = 0;
+ os2->usLowerOpticalPointSize = 0;
+ os2->usUpperOpticalPointSize = 0xFFFF;
if ( os2->version >= 0x0001 )
{