diff options
| author | Philipp Gesang <phg42.2a@gmail.com> | 2014-01-26 06:02:53 -0800 | 
|---|---|---|
| committer | Philipp Gesang <phg42.2a@gmail.com> | 2014-01-26 06:02:53 -0800 | 
| commit | 8367305fb7232eb002dae39992dfc651b0124380 (patch) | |
| tree | e0ca999201eacd4f57b5abf645cbb2b0bad16f68 | |
| parent | d489b3db4c415aa58550df09d85315f2a31bc6db (diff) | |
| parent | a52e157de5a969b7d80af1c8621a7d7b031b572f (diff) | |
| download | luaotfload-8367305fb7232eb002dae39992dfc651b0124380.tar.gz | |
Merge pull request #184 from phi-gamma/texlive2014
dial back the importance of numeric font weights
| -rw-r--r-- | luaotfload-database.lua | 30 | ||||
| -rwxr-xr-x | mktests | 13 | 
2 files changed, 23 insertions, 20 deletions
| diff --git a/luaotfload-database.lua b/luaotfload-database.lua index 28109ec..c979acf 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -2455,23 +2455,19 @@ do          local b = false          if italic_synonym [field] then -            i = true +            return "i"          end -        if weight == 700 or field == "bold" then -            b = true +        if field == "bold" then +            return "b"          end          if field == "bolditalic" or field == "boldoblique" then -            b = true -            i = true +            return "bi"          end -        if i and b then -            return "bi" -        elseif i then -            return "i" -        elseif b then +        if weight == 700 then +            --- matches only if weight is specified              return "b"          end @@ -2485,11 +2481,11 @@ do                             weight)          local style          if fontstyle_name then -            style = choose_exact (fontstyle_name, weight) +            style = choose_exact (fontstyle_name --[[ , weight ]])          end          if not style then              if prefmodifiers then -                style = choose_exact (prefmodifiers, weight) +                style = choose_exact (prefmodifiers --[[ , weight ]])              elseif subfamily then                  style = choose_exact (subfamily, weight)              end @@ -2506,7 +2502,9 @@ do      check_regular = function (fontstyle_name,                                prefmodifiers,                                subfamily, -                              splitstyle) +                              splitstyle, +                              italicangle, +                              weight)          if fontstyle_name then              return regular_synonym [fontstyle_name] @@ -2516,6 +2514,8 @@ do              return regular_synonym [subfamily]          elseif splitstyle then              return regular_synonym [splitstyle] +        elseif italicangle == 0 and weight == 400 then +            return true          end          return nil @@ -2644,7 +2644,9 @@ local collect_families = function (mappings)              modifier = check_regular (fontstyle_name,                                        prefmodifiers,                                        subfamily, -                                      splitstyle) +                                      splitstyle, +                                      italicangle, +                                      weight)          end          if modifier then @@ -31,6 +31,7 @@ kpse.set_program_name "luatex"  require "lualibs"  require "luaotfload-basics-gen.lua"  require "luaotfload-override.lua" +require "luaotfload-parsers"  require "luaotfload-database"  local names = fonts.names @@ -86,11 +87,11 @@ local infer_regular_style = {    { "Garamond Premier Pro", "GaramondPremrPro.otf"      },    { "CMU Serif",            "cmunrm.otf"                },    { "CMU Sans Serif",       "cmunss.otf"                }, -  { "Minion Pro",           "MinionPro_Regular.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"          }, +  { "Minion Pro Italic",    "MinionPro-It.otf"          },  }  local choose_optical_size = { @@ -140,10 +141,10 @@ local choose_style = {      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"   }, +  { { 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 | 
