summaryrefslogtreecommitdiff
path: root/src/fontloader/misc/fontloader-font-afm.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2015-03-18 08:08:59 +0100
committerPhilipp Gesang <phg42.2a@gmail.com>2015-03-18 08:08:59 +0100
commitc4c4901173b0f4284534db1b6a3cfe865b05e15c (patch)
treef27d1546977bae78b33180192cc80eecc568bf4c /src/fontloader/misc/fontloader-font-afm.lua
parentb966e35c9df3cca2a25baaf68574d0b8d94eef39 (diff)
parentf5dd1ec3517cda47e5a48221d4ff5cfced12ea06 (diff)
downloadluaotfload-c4c4901173b0f4284534db1b6a3cfe865b05e15c.tar.gz
Merge pull request #266 from phi-gamma/master
fontloader fallback
Diffstat (limited to 'src/fontloader/misc/fontloader-font-afm.lua')
-rw-r--r--src/fontloader/misc/fontloader-font-afm.lua11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/fontloader/misc/fontloader-font-afm.lua b/src/fontloader/misc/fontloader-font-afm.lua
index ca5616a..a96c668 100644
--- a/src/fontloader/misc/fontloader-font-afm.lua
+++ b/src/fontloader/misc/fontloader-font-afm.lua
@@ -48,6 +48,11 @@ local definers = fonts.definers
local readers = fonts.readers
local constructors = fonts.constructors
+local fontloader = fontloader
+local font_to_table = fontloader.to_table
+local open_font = fontloader.open
+local close_font = fontloader.close
+
local afm = constructors.newhandler("afm")
local pfb = constructors.newhandler("pfb")
@@ -222,10 +227,10 @@ end
local function get_indexes(data,pfbname)
data.resources.filename = resolvers.unresolve(pfbname) -- no shortcut
- local pfbblob = fontloader.open(pfbname)
+ local pfbblob = open_font(pfbname)
if pfbblob then
local characters = data.characters
- local pfbdata = fontloader.to_table(pfbblob)
+ local pfbdata = font_to_table(pfbblob)
if pfbdata then
local glyphs = pfbdata.glyphs
if glyphs then
@@ -251,7 +256,7 @@ local function get_indexes(data,pfbname)
elseif trace_loading then
report_afm("no data in pfb file %a",pfbname)
end
- fontloader.close(pfbblob)
+ close_font(pfbblob)
elseif trace_loading then
report_afm("invalid pfb file %a",pfbname)
end