diff options
| author | Philipp Gesang <phg42.2a@gmail.com> | 2013-05-03 21:39:41 +0200 | 
|---|---|---|
| committer | Philipp Gesang <phg42.2a@gmail.com> | 2013-05-03 21:39:41 +0200 | 
| commit | 76830b0a04dbd8ce620edd79d6a18d3d4cb8bcf0 (patch) | |
| tree | 0768cd1518d0ffe568c0673fc1552082410c6227 | |
| parent | 542fc9edfb02a4e0cbde369e16dd66227cba95fc (diff) | |
| download | luaotfload-76830b0a04dbd8ce620edd79d6a18d3d4cb8bcf0.tar.gz | |
additional workaround for inconsistent argument order in fontspec.lua
| -rw-r--r-- | luaotfload-auxiliary.lua | 28 | ||||
| -rw-r--r-- | luaotfload.dtx | 6 | 
2 files changed, 25 insertions, 9 deletions
| diff --git a/luaotfload-auxiliary.lua b/luaotfload-auxiliary.lua index 5ed7bb9..bf567e3 100644 --- a/luaotfload-auxiliary.lua +++ b/luaotfload-auxiliary.lua @@ -62,9 +62,9 @@ local add_fontdata_fallbacks = function (fontdata)        fontdata.units = fontdata.units_per_em      else --- otf        metadata = fontdata.shared.rawdata.metadata -      fontdata.units = fontparameters.units -      local resources      = fontdata.resources -      fontdata.size  = fontparameters.size +      fontdata.units   = fontparameters.units +      local resources  = fontdata.resources +      fontdata.size    = fontparameters.size        --- for legacy fontspec.lua and unicode-math.lua        fontdata.shared.otfdata          = metadata        fontdata.shared.otfdata.metadata = metadata --- brr, that’s meta indeed @@ -85,17 +85,18 @@ luatexbase.add_to_callback(  --[[doc-- -Additionally, the font registry is expected at fonts.identifiers, but -in the meantime it has been migrated to fonts.hashes.identifiers. -We’ll make luaotfload satisfy those assumptions. (Maybe it’d be more -appropriate to use font.getfont() since Hans made it a harmless wrapper -[1].) +Additionally, the font registry is expected at fonts.identifiers +(fontspec) or fonts.ids (microtype), but in the meantime it has been +migrated to fonts.hashes.identifiers.  We’ll make luaotfload satisfy +those assumptions. (Maybe it’d be more appropriate to use +font.getfont() since Hans made it a harmless wrapper [1].)  [1] http://www.ntg.nl/pipermail/ntg-context/2013/072166.html  --doc]]--  fonts.identifiers = fonts.hashes.identifiers +fonts.ids         = fonts.hashes.identifiers  --[[doc--  This sets two dimensions apparently relied upon by the unicode-math @@ -133,6 +134,7 @@ end  --[[doc--  This callback corrects some values of the Cambria font.  --doc]]-- +--- fontobj -> unit  local patch_cambria_domh = function (fontdata)    local mathconstants = fontdata.MathConstants    if mathconstants and fontdata.psname == "CambriaMath" then @@ -352,6 +354,16 @@ end  aux.provides_language = provides_language +--- fontspec apparently has the arguments shuffled +---     theirs:  id -> lang   -> script -> bool +---     ours:    id -> script -> lang   -> bool +--- whereas in the other check_* functions, script is +--- always the second argument ... +aux.provides_language_fontspec = function +                          (font_id, asked_language, asked_script) +  return provides_language(font_id, asked_script, asked_language) +end +  --[[doc--  We strip the syntax elements from feature definitions (shouldn’t  actually be there in the first place, but who cares ...) diff --git a/luaotfload.dtx b/luaotfload.dtx index 6daeece..fb57462 100644 --- a/luaotfload.dtx +++ b/luaotfload.dtx @@ -124,7 +124,11 @@ and the derived files  ]{hyperref}  \usepackage{fontspec}  %usepackage{unicode-math}%% broken -\setmainfont[Numbers=OldStyle,Ligatures=TeX]{Linux Libertine O} +\setmainfont[ +  Numbers=OldStyle, +  Ligatures=TeX, +  %SlantedFont={Linux Libertine Italic}, +]{Linux Libertine O}  \setmonofont[Ligatures=TeX,Scale=MatchLowercase]{Liberation Mono}  %setsansfont[Ligatures=TeX]{Linux Biolinum O}  \setsansfont[Ligatures=TeX,Scale=MatchLowercase]{Iwona Medium} | 
