diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2013-07-23 15:38:32 -0700 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2013-07-23 15:38:32 -0700 |
commit | daeb3c1fddf826deb325cbe2a6567083c828ca13 (patch) | |
tree | 12aed96922ab72b4889899d8b4499d5e1600362a /luaotfload-auxiliary.lua | |
parent | 36abb3e8cf8d2d24bf5cfb770cdba2731de655c5 (diff) | |
parent | 2331b6838f623d4800e79e92c50ce55f955d7776 (diff) | |
download | luaotfload-daeb3c1fddf826deb325cbe2a6567083c828ca13.tar.gz |
Merge pull request #111 from phi-gamma/master
update to v2.3b
Diffstat (limited to 'luaotfload-auxiliary.lua')
-rw-r--r-- | luaotfload-auxiliary.lua | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/luaotfload-auxiliary.lua b/luaotfload-auxiliary.lua index d6c8eaa..0a3ace8 100644 --- a/luaotfload-auxiliary.lua +++ b/luaotfload-auxiliary.lua @@ -48,10 +48,33 @@ local rewrite_fontname = function (tfmdata, specification) tfmdata.name = [["]] .. specification .. [["]] end -luatexbase.add_to_callback( - "luaotfload.patch_font", - rewrite_fontname, - "luaotfload.rewrite_fontname") +local rewriting = false + +local start_rewrite_fontname = function () + if rewriting == false then + luatexbase.add_to_callback ( + "luaotfload.patch_font", + rewrite_fontname, + "luaotfload.rewrite_fontname") + rewriting = true + logs.names_report ("log", 0, "aux", + "start rewriting tfmdata.name field") + end +end + +aux.start_rewrite_fontname = start_rewrite_fontname + +local stop_rewrite_fontname = function () + if rewriting == true then + luatexbase.remove_fromt_callback + ("luaotfload.patch_font", "luaotfload.rewrite_fontname") + rewriting = false + logs.names_report ("log", 0, "aux", + "stop rewriting tfmdata.name field") + end +end + +aux.stop_rewrite_fontname = stop_rewrite_fontname --- as of 2.3 the compatibility hacks for TL 2013 are made optional |