From bb67558c87704ad7193b07e4ef657cb9d948a9a0 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Wed, 9 May 2012 09:02:13 +0200 Subject: Sync with context beta 2012.05.08 23:00 --- otfl-font-def.lua | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'otfl-font-def.lua') diff --git a/otfl-font-def.lua b/otfl-font-def.lua index 10958cf..96de480 100644 --- a/otfl-font-def.lua +++ b/otfl-font-def.lua @@ -258,6 +258,24 @@ end -- return tfmdata -- end +local function checkembedding(tfmdata) + local properties = tfmdata.properties + local embedding + if directive_embedall then + embedding = "full" + elseif properties and properties.filename and constructors.dontembed[properties.filename] then + embedding = "no" + else + embedding = "subset" + end + if properties then + properties.embedding = embedding + else + tfmdata.properties = { embedding = embedding } + end + tfmdata.embedding = embedding +end + function definers.loadfont(specification) local hash = constructors.hashinstance(specification) local tfmdata = loadedfonts[hash] -- hashes by size ! @@ -287,21 +305,8 @@ function definers.loadfont(specification) end end if tfmdata then - local properties = tfmdata.properties - local embedding - if directive_embedall then - embedding = "full" - elseif properties and properties.filename and constructors.dontembed[properties.filename] then - embedding = "no" - else - embedding = "subset" - end - if properties then - properties.embedding = embedding - else - tfmdata.properties = { embedding = embedding } - end tfmdata = definers.applypostprocessors(tfmdata) + checkembedding(tfmdata) -- todo: general postprocessor loadedfonts[hash] = tfmdata designsizes[specification.hash] = tfmdata.parameters.designsize end -- cgit v1.2.3