diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2010-01-07 12:48:30 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2010-01-07 12:48:30 +0200 |
commit | cd2a0ef2b34deddfdc6b6731eefce87313461cf6 (patch) | |
tree | 029bb1cabca996d1a5db286d08a134d95b36388d | |
parent | 1a1733617701a902003170e4712e9a951706a846 (diff) | |
download | luaotfload-cd2a0ef2b34deddfdc6b6731eefce87313461cf6.tar.gz |
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
-rw-r--r-- | otfl-font-otf.lua | 6 |
1 files 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 |