[XeTeX] on GSUB

Ralf Stubner ralf.stubner at physik.uni-erlangen.de
Sun Jul 2 17:44:09 CEST 2006


Jonathan Kew <jonathan_kew at sil.org> writes:

> I've double-checked the Adobe "Type 2 Charstring Format" spec, and  
> this doesn't even mention the 'seac' op-code (that's only found in  
> the "Type 1 Font Format" spec).
>
> It seems to me that the Type 2 spec is rather unclear, as it claims  
> (page 1) that "The Type 2 charstring operators are (with one  
> exception) a superset of the Type 1 operators." (It doesn't seem to  
> say explicitly what the "one exception" is supposed to be.) But then  
> it goes on to document the individual operators.... and omits  
> considerably more than one of those that were in Type 1, marking the  
> corresponding command codes as "reserved" in the tables in Appendix A.
>
> So not only 'seac' but several other opcodes from T1 are perhaps not  
> supported in T2, depending whether we believe the general "superset"  
> statement or the actual lists and descriptions in the T2 spec.

I think the error message from (x)dvipdfmx is slightly missleading here.
I looked into cs_type2.c, and the seac op-code is not defined for Type 2
charstrings. The error message aabout seac being depricated is issued
when the endchar opcode is processed and four or five entries are found
on the stack (cs_type2.c line 327--342). Using endchar with several
arguments as a replacement for seac is documented and marked as
deprecated in Appendix C of the Type 2 specs.

I won't have time to look deeper into this at the moment, though. For
the time being I can offer a simple FontForge script which regenerates
the fonts without this special endchar usage and sensible FamilyName
"GFS Didot" instead of "GFS Didot Rg":

#!/usr/bin/env fontforge
while ( $argc > 1 )
   Open($1);
   SelectAll();
   ReplaceWithReference();
   SetFontNames("","GFS Didot");
   Generate($1:r+"-new.otf","",0x80);
   shift;
endloop

Call it with all four GFS Didot fonts as command-line arguments. Note
that it might be a good idea to use a recent FontForge version.

cheerio
ralf





More information about the XeTeX mailing list