diff options
author | Elie Roux <eroux@dedibox.ebzao.info> | 2010-02-15 15:38:15 +0100 |
---|---|---|
committer | Elie Roux <eroux@dedibox.ebzao.info> | 2010-02-15 15:38:15 +0100 |
commit | 7557e659792fcc9a9a2d5f4d400605ea6cfdd6df (patch) | |
tree | 2ffc080bd2117bb8dcc3767a2f95506a4ab3f718 /luaotfload-fonts.lua | |
parent | 672415f111e79974d279bd35e4e848f40d87c9f6 (diff) | |
download | luaotfload-7557e659792fcc9a9a2d5f4d400605ea6cfdd6df.tar.gz |
Adding only modern fonts to the list of os fonts
Diffstat (limited to 'luaotfload-fonts.lua')
-rw-r--r-- | luaotfload-fonts.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/luaotfload-fonts.lua b/luaotfload-fonts.lua index c425ee7..9437023 100644 --- a/luaotfload-fonts.lua +++ b/luaotfload-fonts.lua @@ -171,7 +171,11 @@ end local function read_fcdata(data) local list = { } for line in data:lines() do - list[#list+1] = line:gsub(": ", "") + line = line:gsub(": ", "") + local ext = string.lower(string.match(line,"^.+%.([^/\\]-)$")) + if ext == "otf" or ext == "ttf" or ext == "ttc" or ext == "dfont" then + list[#list+1] = line:gsub(": ", "") + end end return list end |