From d7ac7e182bf0c14ec1341d2dd392f0258a430d68 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Wed, 20 Jan 2010 00:05:09 +0200 Subject: Pass 'specification' directly to |fonts.names.resolve()| We will need more fields from the specification in the future, simplify function calling. --- otfl-font-def.lua | 4 ++-- otfl-font-dum.lua | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/otfl-font-def.lua b/otfl-font-def.lua index 99cc5e1..47b1755 100644 --- a/otfl-font-def.lua +++ b/otfl-font-def.lua @@ -241,7 +241,7 @@ end function define.resolvers.name(specification) local resolve = fonts.names.resolve if resolve then - specification.resolved, specification.sub = fonts.names.resolve(specification.name,specification.sub,specification.style) + specification.resolved, specification.sub = fonts.names.resolve(specification) if specification.resolved then specification.forced = file.extname(specification.resolved) specification.name = file.removesuffix(specification.resolved) @@ -254,7 +254,7 @@ end function define.resolvers.spec(specification) local resolvespec = fonts.names.resolvespec if resolvespec then - specification.resolved, specification.sub = fonts.names.resolvespec(specification.name,specification.sub,specification.style) + specification.resolved, specification.sub = fonts.names.resolvespec(specification) if specification.resolved then specification.forced = file.extname(specification.resolved) specification.name = file.removesuffix(specification.resolved) diff --git a/otfl-font-dum.lua b/otfl-font-dum.lua index d1d1b0a..e1f7822 100644 --- a/otfl-font-dum.lua +++ b/otfl-font-dum.lua @@ -54,7 +54,8 @@ fonts.names.old_to_new = { } local data, loaded = nil, false -function fonts.names.resolve(name,sub,style) +function fonts.names.resolve(specification) + local name, sub, style = specification.name, specification.sub, specification.style if not loaded then local basename = fonts.names.basename if basename and basename ~= "" then -- cgit v1.2.3