From 84c2015a58d019b87532111cd0bb5f7d4d1ccb8a Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 3 Jan 2014 20:03:08 +0100 Subject: [db] use (sanitized) names.fullname field when resolving fonts by name --- luaotfload-database.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 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 -- cgit v1.2.3 From 532b4ecf5993d5902927e4c6e5db14ff2cd2e5df Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 3 Jan 2014 20:17:47 +0100 Subject: [tests] include two kinds of tests for Minion Pro --- mktests | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/mktests b/mktests index 688e5f8..baa710c 100755 --- a/mktests +++ b/mktests @@ -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 -- cgit v1.2.3 From 14e32b836d6b1b5c729c99de2058a6517e8cc29a Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 3 Jan 2014 22:33:19 +0100 Subject: [main] set correct default loglevel when running as tex (seriously, dtx is an abomination) --- luaotfload.dtx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" -- cgit v1.2.3 From bb99e2c94aaa32cb3635ec6e35a4dc8ca6e309ae Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 3 Jan 2014 22:43:05 +0100 Subject: [log] fix newline handling of the last status message when imitating texio.*() Issue reported by /u/eg9 on https://github.com/lualatex/luaotfload/issues/164#issuecomment-31551430 --- luaotfload-override.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3