diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2011-10-04 02:09:10 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2011-10-04 03:18:04 +0200 |
commit | b58b5576bb3be118142ab5b7732befaf66d350ad (patch) | |
tree | 5cf3a9cd06224f874dffbf83a3efafc8640fa37b | |
parent | 1fdacd21972985d8d70c6c4567f2a3751c15d36d (diff) | |
download | luaotfload-b58b5576bb3be118142ab5b7732befaf66d350ad.tar.gz |
otfl-fonts-syn.lua just complicates things, remove it
-rw-r--r-- | luaotfload.dtx | 1 | ||||
-rw-r--r-- | otfl-font-nms.lua | 5 | ||||
-rw-r--r-- | otfl-fonts-syn.lua | 83 |
3 files changed, 5 insertions, 84 deletions
diff --git a/luaotfload.dtx b/luaotfload.dtx index 832aadf..850c837 100644 --- a/luaotfload.dtx +++ b/luaotfload.dtx @@ -590,7 +590,6 @@ luaotfload.loadmodule('font-con.lua') luaotfload.loadmodule('fonts-enc.lua') -- will load font-age on demand luaotfload.loadmodule('font-cid.lua') luaotfload.loadmodule('font-map.lua') -- for loading lum file (will be stripped) -luaotfload.loadmodule('fonts-syn.lua') luaotfload.loadmodule('font-nms.lua') luaotfload.loadmodule('fonts-tfm.lua') luaotfload.loadmodule('font-oti.lua') diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua index ec0dc91..8c4a077 100644 --- a/otfl-font-nms.lua +++ b/otfl-font-nms.lua @@ -762,3 +762,8 @@ names.scan = scan_external_dir names.load = load_names names.update = update_names names.save = save_names + +-- dummy +function fonts.names.getfilename(askedname,suffix) -- only supported in mkiv + return "" +end diff --git a/otfl-fonts-syn.lua b/otfl-fonts-syn.lua deleted file mode 100644 index 36a74d0..0000000 --- a/otfl-fonts-syn.lua +++ /dev/null @@ -1,83 +0,0 @@ -if not modules then modules = { } end modules ['luatex-fonts-syn'] = { - version = 1.001, - comment = "companion to luatex-*.tex", - author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", - copyright = "PRAGMA ADE / ConTeXt Development Team", - license = "see context related readme files" -} - -if context then - texio.write_nl("fatal error: this module is not for context") - os.exit() -end - --- Generic font names support. --- --- Watch out, the version number is the same as the one used in --- the mtx-fonts.lua function scripts.fonts.names as we use a --- simplified font database in the plain solution and by using --- a different number we're less dependent on context. --- --- mtxrun --script font --reload --simple --- --- The format of the file is as follows: --- --- return { --- ["version"] = 1.001, --- ["mappings"] = { --- ["somettcfontone"] = { "Some TTC Font One", "SomeFontA.ttc", 1 }, --- ["somettcfonttwo"] = { "Some TTC Font Two", "SomeFontA.ttc", 2 }, --- ["somettffont"] = { "Some TTF Font", "SomeFontB.ttf" }, --- ["someotffont"] = { "Some OTF Font", "SomeFontC.otf" }, --- }, --- } - -local fonts = fonts -fonts.names = fonts.names or { } - -fonts.names.version = 1.001 -- not the same as in context -fonts.names.basename = "luatex-fonts-names.lua" -fonts.names.new_to_old = { } -fonts.names.old_to_new = { } - -local data, loaded = nil, false - -local fileformats = { "lua", "tex", "other text files" } - -function fonts.names.resolve(name,sub) - if not loaded then - local basename = fonts.names.basename - if basename and basename ~= "" then - for i=1,#fileformats do - local format = fileformats[i] - local foundname = resolvers.findfile(basename,format) or "" - if foundname ~= "" then - data = dofile(foundname) - texio.write("<font database loaded: ",foundname,">") - break - end - end - end - loaded = true - end - if type(data) == "table" and data.version == fonts.names.version then - local condensed = string.gsub(string.lower(name),"[^%a%d]","") - local found = data.mappings and data.mappings[condensed] - if found then - local fontname, filename, subfont = found[1], found[2], found[3] - if subfont then - return filename, fontname - else - return filename, false - end - else - return name, false -- fallback to filename - end - end -end - -fonts.names.resolvespec = fonts.names.resolve -- only supported in mkiv - -function fonts.names.getfilename(askedname,suffix) -- only supported in mkiv - return "" -end |