[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.
This commit is contained in:
Werner Lemberg 2016-07-17 22:40:31 +02:00
parent e084360961
commit 8c93013ca3
2 changed files with 35 additions and 3 deletions

View File

@ -1,3 +1,16 @@
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.

View File

@ -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 );