diff options
author | Elie Roux <elie.roux@telecom-bretagne.eu> | 2013-05-04 00:14:00 -0700 |
---|---|---|
committer | Elie Roux <elie.roux@telecom-bretagne.eu> | 2013-05-04 00:14:00 -0700 |
commit | 213b9e54f678b56ec3b095a21dc527bc2293b9cc (patch) | |
tree | 0768cd1518d0ffe568c0673fc1552082410c6227 /luaotfload-auxiliary.lua | |
parent | f349a934661594c945ad118d85cfd3a7b4a296b8 (diff) | |
parent | 76830b0a04dbd8ce620edd79d6a18d3d4cb8bcf0 (diff) | |
download | luaotfload-213b9e54f678b56ec3b095a21dc527bc2293b9cc.tar.gz |
Merge pull request #40 from phi-gamma/master
fix issue #36
Diffstat (limited to 'luaotfload-auxiliary.lua')
-rw-r--r-- | luaotfload-auxiliary.lua | 28 |
1 files changed, 20 insertions, 8 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 ...) |