[luatex] [luatex-fonts] \fontname of OpenType fonts

Khaled Hosny khaledhosny at eglug.org
Fri Jan 8 16:55:12 CET 2010


Luatex-fonts sets the internal font name to the full filename path,
thus \fontname\font returns filename, but this is not compatable with
LaTeX which assumes that \fontname will return tfm file name and use it
to re-call previously defined fonts, in luatex-fonts case this raises an
error because the filename isn't usable for defining fonts.

My suggestion is to store the full specification in the name feild so
that it can be used to recall the font (XeTeX does this too)

See the attached patch.

\input luatex-fonts
\font\xxx="[lmroman10-regular.otf]" at 20pt
\font\yyy="[lmroman10-regular.otf]" at 10pt
\font\zzz="[lmroman10-regular.otf]"

\fontname\xxx\par
\fontname\yyy\par
\fontname\zzz
\bye

(Comment out the first line and try it with xetex)

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tfmtable.name.diff
Type: text/x-diff
Size: 1040 bytes
Desc: not available
URL: <http://tug.org/pipermail/luatex/attachments/20100108/ff11c79f/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://tug.org/pipermail/luatex/attachments/20100108/ff11c79f/attachment-0001.bin>


More information about the luatex mailing list