summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2016-07-15 08:11:02 +0200
committerGitHub <noreply@github.com>2016-07-15 08:11:02 +0200
commitdeef74c357ff2f88d53bc6a745b36b6a75717d2d (patch)
treeda831e4f6305f78e7bc1e26a8b9eecede25d4cca /src
parent8bb332a20022d100dcbd64fc416a35673a0ba879 (diff)
parentb1ca1874fc12611b98c3155fe3d197bdaf77c273 (diff)
downloadluaotfload-deef74c357ff2f88d53bc6a745b36b6a75717d2d.tar.gz
Merge pull request #370 from phi-gamma/master
fix TFM loading
Diffstat (limited to 'src')
-rw-r--r--src/luaotfload-features.lua2
-rw-r--r--src/luaotfload-loaders.lua24
2 files changed, 6 insertions, 20 deletions
diff --git a/src/luaotfload-features.lua b/src/luaotfload-features.lua
index 786f619..b432022 100644
--- a/src/luaotfload-features.lua
+++ b/src/luaotfload-features.lua
@@ -1259,6 +1259,8 @@ local handle_request = function (specification)
local subfont = tonumber (specification.sub)
if subfont and subfont >= 0 then
specification.sub = subfont + 1
+ else
+ specification.sub = false
end
return specification
end
diff --git a/src/luaotfload-loaders.lua b/src/luaotfload-loaders.lua
index b544cf1..d7be31e 100644
--- a/src/luaotfload-loaders.lua
+++ b/src/luaotfload-loaders.lua
@@ -49,23 +49,7 @@ local unsupported_reader = function (format)
end
end
-local afm_reader = fonts.readers.afm
-
-local afm_loader = function (specification)
- specification.forced = "afm"
- specification.sub = false
- specification.forcedname = file.addsuffix(specification.name, "afm")
---inspect(specification)
- return afm_reader (specification, "afm")
-end
-
-local afm_compat_message = function (specification)
- logreport ("both", 4, "loaders",
- "PFB format only supported with matching \z
- AFM; redirecting (“%s”, “afm”).",
- tostring (specification.name))
- return afm_loader (specification)
-end
+local type1_reader = fonts.readers.afm
local install_formats = function ()
local fonts = fonts
@@ -97,9 +81,9 @@ local install_formats = function ()
return aux ("evl", eval_reader)
and aux ("lua", lua_reader)
and aux ("pfa", unsupported_reader "pfa")
- and aux ("afm", afm_loader)
- and aux ("tfm", afm_loader)
- and aux ("pfb", afm_compat_message) --- pfb loader is incomplete
+ and aux ("afm", type1_reader)
+ and aux ("tfm", type1_reader)
+ and aux ("pfb", type1_reader)
and aux ("ofm", readers.tfm)
and aux ("dfont", unsupported_reader "dfont")
end