diff options
-rw-r--r-- | luaotfload.lua | 6 | ||||
-rw-r--r-- | otfl-font-pfb.lua | 28 |
2 files changed, 26 insertions, 8 deletions
diff --git a/luaotfload.lua b/luaotfload.lua index 290bba7..34e5bdf 100644 --- a/luaotfload.lua +++ b/luaotfload.lua @@ -243,10 +243,12 @@ if fonts and fonts.readers.tfm then --- the font loader appears to read ofm like tfm so if this --- hack was supposed achieve that, we should excise it anyways fonts.readers.ofm = fonts.readers.tfm - fonts.handlers.ofm = fonts.handlers.tfm - fonts.formats.ofm = fonts.formats.tfm + fonts.handlers.ofm = fonts.handlers.tfm --- empty anyways + fonts.formats.ofm = fonts.formats.tfm --- “type1” -------------------------------------------------------------------- end +loadmodule"font-pfb.lua" + loadmodule"font-nms.lua" loadmodule"font-clr.lua" loadmodule"font-ltx.lua" diff --git a/otfl-font-pfb.lua b/otfl-font-pfb.lua index 66abf23..8ab6b29 100644 --- a/otfl-font-pfb.lua +++ b/otfl-font-pfb.lua @@ -1,8 +1,24 @@ -local fonts = fonts -local readers = fonts.readers +local fonts = fonts -fonts.formats.pfb = "pfb" -fonts.formats.pfa = "pfa" +--- +--- opentype reader (from font-otf.lua): +--- (spec : table) -> (suffix : string) -> (format : string) -> (font : table) +--- -function readers.pfb(specification) return readers.opentype(specification,"pfb","type1") end -function readers.pfa(specification) return readers.opentype(specification,"pfa","type1") end +local pfb_reader = function (specification) + return readers.opentype(specification,"pfb","type1") +end + +local pfa_reader = function (specification) + return readers.opentype(specification,"pfa","type1") +end + +fonts.formats.pfb = "type1" +fonts.readers.pfb = pfb_reader +fonts.handlers.pfb = { } --- empty, as with tfm + +fonts.formats.pfa = "type1" +fonts.readers.pfa = pfa_reader +fonts.handlers.pfa = { } + +-- vim:tw=71:sw=2:ts=2:expandtab |