summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luaotfload-database.lua7
-rw-r--r--src/luaotfload-loaders.lua10
2 files changed, 13 insertions, 4 deletions
diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua
index f18875c..d59b7c8 100644
--- a/src/luaotfload-database.lua
+++ b/src/luaotfload-database.lua
@@ -207,7 +207,8 @@ local make_luanames = function (path)
end
local format_precedence = {
- "otf", "ttc", "ttf", "afm", "pfb"
+ "otf", "ttc", "ttf", "afm",
+ -- "pfb" --- may come back before Luatex 1.0
}
local location_precedence = {
@@ -358,7 +359,7 @@ This is a sketch of the luaotfload db:
conflicts : { barename : int; basename : int }; // filename conflict with font at index; happens with subfonts
familyname : string; // sanitized name of the font family the font belongs to, usually from the names table
fontname : string; // sanitized name of the font
- format : string; // "otf" | "ttf" | "afm" | "pfb"
+ format : string; // "otf" | "ttf" | "afm" (* | "pfb" *)
fullname : string; // sanitized full name of the font including style modifiers
fullpath : string; // path to font in filesystem
index : int; // index in the mappings table
@@ -1681,7 +1682,7 @@ local loaders = {
otf = ot_fullinfo,
ttc = ot_fullinfo,
ttf = ot_fullinfo,
- pfb = t1_fullinfo,
+--- pfb = t1_fullinfo,
}
--- not side-effect free!
diff --git a/src/luaotfload-loaders.lua b/src/luaotfload-loaders.lua
index f0c1913..8a29256 100644
--- a/src/luaotfload-loaders.lua
+++ b/src/luaotfload-loaders.lua
@@ -49,6 +49,14 @@ local unsupported_reader = function (format)
end
end
+local afm_compat_message = function (specification, method)
+ logreport ("both", 0, "loaders",
+ "PFB format only supported with matching \z
+ AFM; redirecting (ā€œ%sā€, ā€œ%sā€).",
+ tostring (specification.name), tostring (method))
+ return fonts.readers.afm (specification, method)
+end
+
local install_formats = function ()
local fonts = fonts
if not fonts then return false end
@@ -81,7 +89,7 @@ local install_formats = function ()
return aux ("evl", eval_reader)
and aux ("lua", lua_reader)
and aux ("pfa", unsupported_reader "pfa")
- and aux ("pfb", unsupported_reader "pfb")
+ and aux ("pfb", afm_compat_message) --- pfb loader is incomplete
and aux ("ofm", readers.tfm)
and aux ("dfont", unsupported_reader "dfont")
end