diff options
-rw-r--r-- | luaotfload-database.lua | 9 | ||||
-rw-r--r-- | luaotfload-override.lua | 6 | ||||
-rw-r--r-- | luaotfload.dtx | 2 | ||||
-rwxr-xr-x | mktests | 24 |
4 files changed, 36 insertions, 5 deletions
diff --git a/luaotfload-database.lua b/luaotfload-database.lua index 9d7d912..7e5f8cb 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -1070,9 +1070,10 @@ local resolve_fontname = function (specification, name, style) local face = mappings [i] local prefmodifiers = face.prefmodifiers local subfamily = face.subfamily - if face.fontname == name - or face.fullname == name - or face.psname == name + if face.fontname == name + or face.splainname == name + or face.fullname == name + or face.psname == name then return face.basename, face.subfont elseif face.familyname == name then @@ -1608,6 +1609,7 @@ t1_fullinfo = function (filename, _subfont, location, basename, format) fontname = sanitized.fontname, familyname = sanitized.familyname, plainname = fullname, + splainname = sanitized.fullname, psname = sanitized.fontname, version = metadata.version, size = false, @@ -2775,6 +2777,7 @@ local pull_values = function (entry) entry.psname = english.psname entry.fontname = info.fontname entry.fullname = english.fullname or info.fullname + entry.splainname = metadata.fullname entry.prefmodifiers = english.prefmodifiers local metafamily = metadata.familyname local familyname = english.preffamily or english.family diff --git a/luaotfload-override.lua b/luaotfload-override.lua index b1773fa..fe70dcb 100644 --- a/luaotfload-override.lua +++ b/luaotfload-override.lua @@ -166,6 +166,8 @@ if texjob == true then statusln = function (str) if first_status == false then iowrite (kill_line) + else + iowrite "\n" end iowrite (str) end @@ -326,7 +328,9 @@ end local status_stop = function (...) if first_status == false then status_writer(...) - writeln "" + if texjob == false then + writeln "" + end end end diff --git a/luaotfload.dtx b/luaotfload.dtx index 08f56af..f27b5e0 100644 --- a/luaotfload.dtx +++ b/luaotfload.dtx @@ -1595,7 +1595,7 @@ config.luaotfload = config.luaotfload or { } config.luaotfload.resolver = config.luaotfload.resolver or "cached" config.luaotfload.definer = config.luaotfload.definer or "patch" config.luaotfload.compatibility = config.luaotfload.compatibility or false -config.luaotfload.loglevel = config.luaotfload.loglevel or 1 +config.luaotfload.loglevel = config.luaotfload.loglevel or 2 config.luaotfload.color_callback = config.luaotfload.color_callback or "pre_linebreak_filter" config.luaotfload.prioritize = config.luaotfload.prioritize or "sys" config.luaotfload.names_dir = config.luaotfload.names_dir or "names" @@ -86,6 +86,11 @@ local infer_regular_style = { { "Garamond Premier Pro", "GaramondPremrPro.otf" }, { "CMU Serif", "cmunrm.otf" }, { "CMU Sans Serif", "cmunss.otf" }, + { "Minion Pro", "MinionPro_Regular.otf" }, + --- Below test will succeed only if we match for the + --- splainname (= sanitized tfmdata.fullname) field + --- explicitly. + { "Minion Pro Italic", "MinionPro_It.otf" }, } local choose_optical_size = { @@ -120,6 +125,25 @@ local choose_style = { { { name = "CMU Sans Serif", style = "italic" }, "cmunsi.otf" }, -- no “italic” but “oblique” { { name = "CMU Sans Serif", style = "bold" }, "cmunsx.otf" }, { { name = "CMU Sans Serif", style = "bolditalic" }, "cmunso.otf" }, + --[[-- + Minion Pro Italic is exceptionally weird regarding identifiers in + that the postscript fontname and both info.fontname and + info.fullname are given as “minionproit”. Now its english fullname + (field 18) is “minionproital”. Only the value “fullname” in the root of + the tfmdata structure (not the one returned by fontloader.info()!) + accurately yields “Minion Pro Italic”. + + To complete the picture, the file naming isn’t very consistent either: + we find the suffixes “Regular” and “Bold”, but “It” and “BoldIt”. What + the hell were the designers smoking? + + Also, the full Minion Pro set comes with different optical sizes which + for monetary reasons cannot considered here. + --]]-- + { { name = "Minion Pro", style = "regular" }, "MinionPro_Regular.otf" }, + { { name = "Minion Pro", style = "italic" }, "MinionPro_It.otf" }, + { { name = "Minion Pro", style = "bold" }, "MinionPro_Bold.otf" }, + { { name = "Minion Pro", style = "bolditalic" }, "MinionPro_BoldIt.otf" }, } --- this needs a database built with --formats=+pfa,pfb,afm |