From 3d7683e62db26eac5af7c4e1a9b3c2f4f2b99925 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Mon, 15 Feb 2010 17:27:06 +0200 Subject: Some cosmetic hacks --- luaotfload-fonts.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/luaotfload-fonts.lua b/luaotfload-fonts.lua index 746b520..948d743 100644 --- a/luaotfload-fonts.lua +++ b/luaotfload-fonts.lua @@ -38,7 +38,8 @@ local function progress(current, total) local percent = current/total local gauge = format("[%s]", rep(" ", width)) if percent > 0 then - gauge = format("[%s>%s]", rep("=", (width*percent)-1), rep(" ", width-(width*percent))) + done = (width * percent) >= 1 and (width * percent) or 1 + gauge = format("[%s>%s]", rep("=", done - 1), rep(" ", width - done)) end if percent == 1 then gauge = gauge .. "\n" @@ -158,7 +159,7 @@ local function scan_dir(dirname, names, recursive, texmf) end local function scan_texmf_tree(names) - log(1, "Scanning TEXMF fonts:\n") + log(1, "Scanning TEXMF fonts:") local fontdirs = expandpath("$OPENTYPEFONTS") fontdirs = fontdirs .. string.gsub(expandpath("$TTFONTS"), "^\.", "") if not fontdirs:is_empty() then @@ -192,7 +193,7 @@ end local function scan_os_fonts(names) if expandpath("$OSFONTDIR"):is_empty() then - log(1, "Scanning system fonts:\n") + log(1, "Scanning system fonts:") log(2, "Executing 'fc-list : file'") local data = io.popen("fc-list : file", 'r') local list = read_fcdata(data) -- cgit v1.2.3