summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2016-07-17 22:40:31 +0200
committerWerner Lemberg <wl@gnu.org>2016-07-17 22:40:31 +0200
commit8c93013ca3479d1b7e702240187730cc3173f99f (patch)
treeb5e208c564cc5a4f74dcb5726dba5eac4f9bda46
parente0843609616c5f12b3d1697499c839d3e89f96fb (diff)
downloadfreetype2-8c93013ca3479d1b7e702240187730cc3173f99f.tar.gz
[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.
-rw-r--r--ChangeLog13
-rw-r--r--src/truetype/ttinterp.c25
2 files changed, 35 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 59541b4bf..250dbe5d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
2016-07-16 Werner Lemberg <wl@gnu.org>
+ [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 <wl@gnu.org>
+
[truetype] Add bytecode support for GX variation fonts.
This commit implements undocumented (but confirmed) stuff from
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 3851b7a2f..3883e67b2 100644
--- 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,6 +7429,21 @@
#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 )
@@ -8191,6 +8206,10 @@
break;
#endif
+ case 0x92:
+ Ins_GETDATA( args );
+ break;
+
default:
if ( opcode >= 0xE0 )
Ins_MIRP( exc, args );