summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElie Roux <eroux@dedibox.ebzao.info>2010-02-15 15:34:56 +0100
committerElie Roux <eroux@dedibox.ebzao.info>2010-02-15 15:34:56 +0100
commit672415f111e79974d279bd35e4e848f40d87c9f6 (patch)
treea688def9dee5aa0f8185815e0e1979b66214d569
parent1ffe166509d91a10f0ed7baba3e515ab2282ecbe (diff)
downloadluaotfload-672415f111e79974d279bd35e4e848f40d87c9f6.tar.gz
Fixing a small "graphical" bug when errors happen
-rw-r--r--luaotfload-fonts.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/luaotfload-fonts.lua b/luaotfload-fonts.lua
index 08d07ee..c425ee7 100644
--- a/luaotfload-fonts.lua
+++ b/luaotfload-fonts.lua
@@ -22,8 +22,11 @@ luaotfload.fonts.basename = "otfl-names.lua"
luaotfload.fonts.version = 2.002
luaotfload.fonts.log_level = 1
+local lastislog = 0
+
local function log(lvl, fmt, ...)
if lvl <= luaotfload.fonts.log_level then
+ lastislog = 1
texio.write_nl(format("luaotfload | %s", format(fmt,...)))
end
end
@@ -39,6 +42,10 @@ local function progress(current, total)
if percent == 1 then
gauge = gauge .. "\n"
end
+ if lastislog == 1 then
+ texio.write_nl("")
+ lastislog = 0
+ end
io.stderr:write("\r"..gauge)
io.stderr:flush()
end