freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] GETVARIATION and GETDATA


From: Hin-Tak Leung
Subject: Re: [ft-devel] GETVARIATION and GETDATA
Date: Sun, 17 Jul 2016 19:53:10 +0000 (UTC)

> >
 There is a GETDATA instruction also... 
 
> GETDATA?  Never heard of. 
 Do you have details?

You have heard of it, from me :-). I asked you about a year ago about the old 
Font Validator complaining a few microsoft fonts containing apple instructions. 
You said the report was bogus. It appears that the report was genuine, except 
that due to a bug in the old Font Validator, I gave you the wrong information.

The old font validator shows this - and because I tend to sort the data, it is 
quite likely that I gave your the offset 30 entry ( would be interesting to dig 
up the old e-mail to see what exactly did I send you, to cause you to judge the 
info was bogus):

LaoUI.ttf Size 10, GETDATA, Glyph ID 263, At ByteOffset 345, 
LaoUI.ttf Size 10, GETDATA, Glyph ID 263, At ByteOffset 30, 
LaoUI.ttf Size 10, GETDATA, Glyph ID 263, At ByteOffset 55, 

The correct info is this, from my latest code:

W       | W6000 | Instruction is only valid on the Apple platform
                Size 10, GETDATA, Glyph ID 263, At ByteOffset 345, 
W       | W6000 | Instruction is only valid on the Apple platform
                Size 10, GETDATA, Glyph ID 263, At ByteOffset 376, 
W       | W6000 | Instruction is only valid on the Apple platform
                Size 10, GETDATA, Glyph ID 263, At ByteOffset 432, 

Note that 376 = 345 + 30 +1, 
and  432 = 376 + 55 + 1

So we have identified a bug in the old Font validator in the MS renderer part 
that I do not have the source :-).

Sorry for people watching me on github - I am going to rebase again, the 2nd 
time today. My WIP patch below.

===
 
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 32213b4..9d0ae7f 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -846,7 +846,7 @@
 
     /*  INS_$90  */   PACK( 0, 0 ),
     /*  GETVAR   */   PACK( 0, 0 ), /* will be handled specially */
-    /*  INS_$92  */   PACK( 0, 0 ),
+    /*  GETDATA  */   PACK( 0, 0 ),
     /*  INS_$93  */   PACK( 0, 0 ),
     /*  INS_$94  */   PACK( 0, 0 ),
     /*  INS_$95  */   PACK( 0, 0 ),
@@ -1133,7 +1133,7 @@
 #else
     "7 INS_$91",
 #endif
-    "7 INS_$92",
+    "7 GETDATA",
     "7 INS_$93",
     "7 INS_$94",
     "7 INS_$95",
@@ -8618,6 +8618,8 @@
 #endif
 
         default:
+          if ( opcode == 0x92 )
+            DIAGNOSTICS("_rast_W_APPLE_ONLY_INSTR", exc );
           if ( opcode >= 0xE0 )
             Ins_MIRP( exc, args );
           else if ( opcode >= 0xC0 )
===


reply via email to

[Prev in Thread] Current Thread [Next in Thread]