From 9d3e292ead8e354c836d0c4dcd25e0b4aa03486c Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 14 Apr 2013 19:23:40 +0200 Subject: add compatibility for luaotfload v.1 --- lualibs-compat.lua | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lualibs-compat.lua (limited to 'lualibs-compat.lua') diff --git a/lualibs-compat.lua b/lualibs-compat.lua new file mode 100644 index 0000000..cb9d8f0 --- /dev/null +++ b/lualibs-compat.lua @@ -0,0 +1,29 @@ +#!/usr/bin/env texlua + +local stringgsub = string.gsub +local stringlower = string.lower +local next = next +local Ct, splitat = lpeg.Ct, lpeg.splitat + +--[[doc +Needed by legacy luat-dum.lua. +--doc]]-- +table.reverse_hash = function (h) + local r = { } + for k,v in next, h do + r[v] = stringlower(stringgsub(k," ","")) + end + return r +end + +--[[doc +Needed by legacy font-otn.lua. +--doc]]-- +lpeg.splitters = { [" "] = Ct(splitat" ") } + +--[[doc +Needed by legacy font-nms.lua. +--doc]]-- + +file.split_path = file.splitpath +file.collapse_path = file.collapsepath -- cgit v1.2.3