diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2010-02-15 17:27:06 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2010-02-15 17:27:06 +0200 |
commit | 3d7683e62db26eac5af7c4e1a9b3c2f4f2b99925 (patch) | |
tree | 23147b248e75c43d4d68afe2afdb5e7a049d70b9 /luaotfload-fonts.lua | |
parent | 372b225dc5f139b0988eb03032b571e0b91010eb (diff) | |
download | luaotfload-3d7683e62db26eac5af7c4e1a9b3c2f4f2b99925.tar.gz |
Some cosmetic hacks
Diffstat (limited to 'luaotfload-fonts.lua')
-rw-r--r-- | luaotfload-fonts.lua | 7 |
1 files 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) |