[XeTeX] fontspec, SizeFeatures, <name> table in otf

Michael Zedler michael.zedler at tum.de
Fri Sep 7 15:40:08 CEST 2007


Hello,

I've got a fontfamily where fontspec doesn't find the related 
italic/bold/bolditalic cut names by itself, so I have to specify them 
myself:

\setmainfont[%
Mapping=tex-text,Numbers={OldStyle,Proportional},Scale=.96,%
BoldFont={MetaPro-Bold},%
BoldItalicFont={MetaPro-BoldItalic},%
ItalicFont={MetaPro-BookItalic}%
]{MetaPro-Book}

Now I'd like to specify via 'SizeFeatures' that for small text instead 
of the 'book' cut the 'medium' cut is to be used:
SizeFeatures={%
{Size={-7.5},Font=MetaPro-Medium,LetterSpace=8},%
{Size={7.5-},Font=MetaPro-Book}
}

But how do I specify this size information for the italic cut, where for 
small sizes 'MetaPro-MediumItalic' shall be used? If this is not 
implemented, then another question: does somebody here understand the 
'name'-table in opentype fonts? I have also tried to temper with it to 
make fontspec guess the names correctly but to no avail. ttx' output of 
the name table now reads for the 'book' face
   <name>
     <namerecord nameID="0" platformID="1" platEncID="0" langID="0x0">
       2005 Erik Spiekermann published by FSI Fonts und Software GmbH
     </namerecord>
     <namerecord nameID="1" platformID="1" platEncID="0" langID="0x0">
       MetaPro
     </namerecord>
     <namerecord nameID="2" platformID="1" platEncID="0" langID="0x0">
       Book
     </namerecord>
     <namerecord nameID="3" platformID="1" platEncID="0" langID="0x0">
       7.460;FSI;MetaPro-Book
     </namerecord>
     <namerecord nameID="4" platformID="1" platEncID="0" langID="0x0">
       MetaPro Book
     </namerecord>
     <namerecord nameID="5" platformID="1" platEncID="0" langID="0x0">
       Version 7.460;PS 7.046;hotconv 1.0.38
     </namerecord>
     <namerecord nameID="6" platformID="1" platEncID="0" langID="0x0">
       MetaPro-Book
     </namerecord>
     <namerecord nameID="7" platformID="1" platEncID="0" langID="0x0">
       Meta is a trademark of FSI Fonts und Software GmbH
     </namerecord>
     <namerecord nameID="8" platformID="1" platEncID="0" langID="0x0">
       FSI Fonts und Software GmbH
     </namerecord>
     <namerecord nameID="9" platformID="1" platEncID="0" langID="0x0">
       Erik Spiekermann
     </namerecord>
     <namerecord nameID="11" platformID="1" platEncID="0" langID="0x0">
       http://www.fontfont.com
     </namerecord>
     <namerecord nameID="12" platformID="1" platEncID="0" langID="0x0">
       http://www.fontfont.com
     </namerecord>
     <namerecord nameID="14" platformID="1" platEncID="0" langID="0x0">
       http://www.fontfont.com/eula/license.html
     </namerecord>
     <namerecord nameID="0" platformID="3" platEncID="1" langID="0x409">
       2005 Erik Spiekermann published by FSI Fonts und Software GmbH
     </namerecord>
     <namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
       MetaPro Book
     </namerecord>
     <namerecord nameID="2" platformID="3" platEncID="1" langID="0x409">
       Regular
     </namerecord>
     <namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
       7.460;FSI;MetaPro-Book
     </namerecord>
     <namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
       MetaPro-Book
     </namerecord>
     <namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
       Version 7.460;PS 7.046;hotconv 1.0.38
     </namerecord>
     <namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
       MetaPro-Book
     </namerecord>
     <namerecord nameID="7" platformID="3" platEncID="1" langID="0x409">
       Meta is a trademark of FSI Fonts und Software GmbH
     </namerecord>
     <namerecord nameID="8" platformID="3" platEncID="1" langID="0x409">
       FSI Fonts und Software GmbH
     </namerecord>
     <namerecord nameID="9" platformID="3" platEncID="1" langID="0x409">
       Erik Spiekermann
     </namerecord>
     <namerecord nameID="11" platformID="3" platEncID="1" langID="0x409">
       http://www.fontfont.com
     </namerecord>
     <namerecord nameID="12" platformID="3" platEncID="1" langID="0x409">
       http://www.fontfont.com
     </namerecord>
     <namerecord nameID="14" platformID="3" platEncID="1" langID="0x409">
       http://www.fontfont.com/eula/license.html
     </namerecord>
     <namerecord nameID="16" platformID="3" platEncID="1" langID="0x409">
       MetaPro
     </namerecord>
     <namerecord nameID="17" platformID="3" platEncID="1" langID="0x409">
       Book
     </namerecord>
   </name>
and for the italic one
   <name>
     <namerecord nameID="0" platformID="1" platEncID="0" langID="0x0">
       2005 Erik Spiekermann published by FSI Fonts und Software GmbH
     </namerecord>
     <namerecord nameID="1" platformID="1" platEncID="0" langID="0x0">
       MetaPro
     </namerecord>
     <namerecord nameID="2" platformID="1" platEncID="0" langID="0x0">
       Book Italic
     </namerecord>
     <namerecord nameID="3" platformID="1" platEncID="0" langID="0x0">
       Erik Spiekermann: MetaPro-BookItalic: 2005
     </namerecord>
     <namerecord nameID="4" platformID="1" platEncID="0" langID="0x0">
       MetaPro Book Italic
     </namerecord>
     <namerecord nameID="5" platformID="1" platEncID="0" langID="0x0">
       Version 7.046; 2005
     </namerecord>
     <namerecord nameID="6" platformID="1" platEncID="0" langID="0x0">
       MetaPro-BookItalic
     </namerecord>
     <namerecord nameID="7" platformID="1" platEncID="0" langID="0x0">
       Meta is a trademark of FSI Fonts und Software GmbH
     </namerecord>
     <namerecord nameID="8" platformID="1" platEncID="0" langID="0x0">
       FSI Fonts und Software GmbH
     </namerecord>
     <namerecord nameID="9" platformID="1" platEncID="0" langID="0x0">
       Erik Spiekermann
     </namerecord>
     <namerecord nameID="11" platformID="1" platEncID="0" langID="0x0">
       http://www.fontfont.com
     </namerecord>
     <namerecord nameID="12" platformID="1" platEncID="0" langID="0x0">
       http://www.fontfont.com
     </namerecord>
     <namerecord nameID="14" platformID="1" platEncID="0" langID="0x0">
       http://www.fontfont.com/eula/license.html
     </namerecord>
     <namerecord nameID="0" platformID="3" platEncID="1" langID="0x409">
       2005 Erik Spiekermann published by FSI Fonts und Software GmbH
     </namerecord>
     <namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
       MetaPro Book
     </namerecord>
     <namerecord nameID="2" platformID="3" platEncID="1" langID="0x409">
       Italic
     </namerecord>
     <namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
       Erik Spiekermann: MetaPro-BookItalic: 2005
     </namerecord>
     <namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
       MetaPro-BookItalic
     </namerecord>
     <namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
       Version 7.046; 2005
     </namerecord>
     <namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
       MetaPro-BookItalic
     </namerecord>
     <namerecord nameID="7" platformID="3" platEncID="1" langID="0x409">
       Meta is a trademark of FSI Fonts und Software GmbH
     </namerecord>
     <namerecord nameID="8" platformID="3" platEncID="1" langID="0x409">
       FSI Fonts und Software GmbH
     </namerecord>
     <namerecord nameID="9" platformID="3" platEncID="1" langID="0x409">
       Erik Spiekermann
     </namerecord>
     <namerecord nameID="11" platformID="3" platEncID="1" langID="0x409">
       http://www.fontfont.com
     </namerecord>
     <namerecord nameID="12" platformID="3" platEncID="1" langID="0x409">
       http://www.fontfont.com
     </namerecord>
     <namerecord nameID="14" platformID="3" platEncID="1" langID="0x409">
       http://www.fontfont.com/eula/license.html
     </namerecord>
     <namerecord nameID="16" platformID="3" platEncID="1" langID="0x409">
       MetaPro
     </namerecord>
     <namerecord nameID="17" platformID="3" platEncID="1" langID="0x409">
       Book Italic
     </namerecord>
   </name>

for some odd reason fontspec still cannot link automatically 
MetaPro-Book with MetaPro-BookItalic :-/

Thanks,
Michael



More information about the XeTeX mailing list