From cd2a0ef2b34deddfdc6b6731eefce87313461cf6 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Thu, 7 Jan 2010 12:48:30 +0200 Subject: Set internal fontname to font specification LaTeX expects that fontname is the tfm name, and thus use it to recall the font, so we ought to store something that can be used the same way here. `specification.specification' is the string used to define the font. Test: \input luaotfload.sty \font\xxx=file:lmroman10-regular.otf:+liga;+tlig\xxx ``\fontname\font'' should be: {\tt file:lmroman10-regular.otf:+liga;+tlig} \bye closes #3 --- otfl-font-otf.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/otfl-font-otf.lua b/otfl-font-otf.lua index 1cf5148..395fe44 100644 --- a/otfl-font-otf.lua +++ b/otfl-font-otf.lua @@ -1778,7 +1778,8 @@ function tfm.read_from_open_type(specification) local tfmtable = otf.otf_to_tfm(specification) if tfmtable then local otfdata = tfmtable.shared.otfdata - tfmtable.name = specification.name +--KH tfmtable.name = specification.name + tfmtable.name = specification.specification -- see mpg/luaotfload#3 tfmtable.sub = specification.sub local s = specification.size local m = otfdata.metadata.math @@ -1829,7 +1830,8 @@ function tfm.read_from_open_type(specification) else tfmtable.format = specification.format end - tfmtable.name = tfmtable.filename or tfmtable.fullname or tfmtable.fontname +--KH tfmtable.name = tfmtable.filename or tfmtable.fullname or tfmtable.fontname + tfmtable.name = tfmtable.name or tfmtable.filename or tfmtable.fullname or tfmtable.fontname -- see mpg/luaotfload#3 end fonts.logger.save(tfmtable,file.extname(specification.filename),specification) end -- cgit v1.2.3