shithub: freetype+ttf2subf

Download patch

ref: 8c93013ca3479d1b7e702240187730cc3173f99f
parent: e0843609616c5f12b3d1697499c839d3e89f96fb
author: Werner Lemberg <[email protected]>
date: Sun Jul 17 18:40:31 EDT 2016

[truetype] Add support for Apple's

  GETDATA[], opcode 0x92

bytecode instruction.  It always returns 17, and we have absolutely
no idea what it is good for...

* src/truetype/ttinterp.c (Pop_Push_Count, opcode_name): Updated.
(Ins_GETDATA): New function.
(TT_RunIns): Add it.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2016-07-16  Werner Lemberg  <[email protected]>
 
+	[truetype] Add support for Apple's
+
+	  GETDATA[], opcode 0x92
+
+	bytecode instruction.  It always returns 17, and we have absolutely
+	no idea what it is good for...
+
+	* src/truetype/ttinterp.c (Pop_Push_Count, opcode_name): Updated.
+	(Ins_GETDATA): New function.
+	(TT_RunIns): Add it.
+
+2016-07-16  Werner Lemberg  <[email protected]>
+
 	[truetype] Add bytecode support for GX variation fonts.
 
 	This commit implements undocumented (but confirmed) stuff from
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -784,7 +784,7 @@
 
     /*  INS_$90  */   PACK( 0, 0 ),
     /*  GETVAR   */   PACK( 0, 0 ), /* will be handled specially */
-    /*  INS_$92  */   PACK( 0, 0 ),
+    /*  GETDATA  */   PACK( 0, 1 ),
     /*  INS_$93  */   PACK( 0, 0 ),
     /*  INS_$94  */   PACK( 0, 0 ),
     /*  INS_$95  */   PACK( 0, 0 ),
@@ -1071,7 +1071,7 @@
 #else
     "7 INS_$91",
 #endif
-    "7 INS_$92",
+    "7 GETDATA",
     "7 INS_$93",
     "7 INS_$94",
     "7 INS_$95",
@@ -7400,7 +7400,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* GETVARIATION[]: get normalized variation (blend) coordinates          */
-  /* Opcode range:   0x24                                                  */
+  /* Opcode range:   0x91                                                  */
   /* Stack:          --> f2.14...                                          */
   /*                                                                       */
   /* XXX: UNDOCUMENTED!  There is no documentation from Apple for this     */
@@ -7429,7 +7429,22 @@
 #endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
 
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* GETDATA[]:    no idea what this is good for                           */
+  /* Opcode range: 0x92                                                    */
+  /* Stack:        --> 17                                                  */
+  /*                                                                       */
+  /* XXX: UNDOCUMENTED!  There is no documentation from Apple for this     */
+  /*      very weird bytecode instruction.                                 */
+  /*                                                                       */
+  static void
+  Ins_GETDATA( FT_Long*  args )
+  {
+    args[0] = 17;
+  }
 
+
   static void
   Ins_UNKNOWN( TT_ExecContext  exc )
   {
@@ -8190,6 +8205,10 @@
             Ins_UNKNOWN( exc );
           break;
 #endif
+
+        case 0x92:
+          Ins_GETDATA( args );
+          break;
 
         default:
           if ( opcode >= 0xE0 )