diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2013-04-18 15:26:35 +0200 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2013-04-18 15:26:35 +0200 |
commit | 341397fb11813b73506d3e76bdc7e69392da852a (patch) | |
tree | aea698fe50d7954a3360a58788c17632831d41f0 /otfl-font-nms.lua | |
parent | fd90b579a511089cac0187d42552d676e5274982 (diff) | |
download | luaotfload-341397fb11813b73506d3e76bdc7e69392da852a.tar.gz |
expand docs
Diffstat (limited to 'otfl-font-nms.lua')
-rw-r--r-- | otfl-font-nms.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua index 2bbaa36..c987c3a 100644 --- a/otfl-font-nms.lua +++ b/otfl-font-nms.lua @@ -697,6 +697,7 @@ local function read_blacklist() if first_chr == "%" or stringis_empty(line) then -- comment or empty line else + --- this is highly inefficient line = stringsplit(line, "%")[1] line = stringstrip(line) if stringsub(line, 1, 1) == "-" then @@ -817,6 +818,11 @@ read_fonts_conf = function (path, results, passed_paths) This function parses /etc/fonts/fonts.conf and returns all the dir it finds. The code is minimal, please report any error it may generate. + + TODO fonts.conf are some kind of XML so in theory the following + is totally inappropriate. Maybe a future version of the + lualibs will include the lxml-* files from Context so we + can write something presentable instead. ]] local fh = ioopen(path) passed_paths[#passed_paths+1] = path @@ -896,6 +902,7 @@ end -- for testing purpose names.read_fonts_conf = read_fonts_conf +--- TODO stuff those paths into some writable table local function get_os_dirs() if os.name == 'macosx' then return { @@ -907,7 +914,7 @@ local function get_os_dirs() elseif os.type == "windows" or os.type == "msdos" or os.name == "cygwin" then local windir = os.getenv("WINDIR") return { filejoin(windir, 'Fonts') } - else + else --- TODO what about ~/config/fontconfig/fonts.conf etc? for _,p in next, {"/usr/local/etc/fonts/fonts.conf", "/etc/fonts/fonts.conf"} do if lfs.isfile(p) then return read_fonts_conf("/etc/fonts/fonts.conf", {}, {}) |