summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-con.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-con.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-con.lua28
1 files changed, 12 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-con.lua b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-con.lua
index 652794142b5..e42d20d4e1f 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-con.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-con.lua
@@ -40,7 +40,6 @@ local setmetatableindex = table.setmetatableindex
-- will be directives
constructors.dontembed = allocate()
-constructors.autocleanup = true
constructors.namemode = "fullpath" -- will be a function
constructors.version = 1.01
@@ -51,6 +50,8 @@ constructors.cacheintex = true -- so we see the original table in fonts.fon
constructors.addtounicode = true
+constructors.fixprotrusion = true
+
-- This might become an interface:
local designsizes = allocate()
@@ -134,21 +135,10 @@ make this profitable and the <l n='lua'/> based variant was just faster. A days
wasted day but an experience richer.</p>
--ldx]]--
--- we can get rid of the tfm instance when we have fast access to the
--- scaled character dimensions at the tex end, e.g. a fontobject.width
--- actually we already have some of that now as virtual keys in glyphs
---
--- flushing the kern and ligature tables from memory saves a lot (only
--- base mode) but it complicates vf building where the new characters
--- demand this data .. solution: functions that access them
-
function constructors.cleanuptable(tfmdata)
- if constructors.autocleanup and tfmdata.properties.virtualized then
- for k, v in next, tfmdata.characters do
- if v.commands then v.commands = nil end
- -- if v.kerns then v.kerns = nil end
- end
- end
+ -- This no longer makes sense because the addition of font.getcopy and its
+ -- possible usage in generic implicates that we need to return the whole
+ -- lot now.
end
-- experimental, sharing kerns (unscaled and scaled) saves memory
@@ -466,6 +456,7 @@ function constructors.scale(tfmdata,specification)
target.size = scaledpoints
--
target.encodingbytes = properties.encodingbytes or 1
+ target.subfont = properties.subfont
target.embedding = properties.embedding or "subset"
target.tounicode = 1
target.cidinfo = properties.cidinfo
@@ -598,7 +589,10 @@ function constructors.scale(tfmdata,specification)
--
constructors.enhanceparameters(targetparameters) -- official copies for us, now virtual
--
- local protrusionfactor = (targetquad ~= 0 and 1000/targetquad) or 0
+ -- I need to fix this in luatex ... get rid of quad there so that we can omit this here.
+ --
+ local protrusionfactor = constructors.fixprotrusion and ((targetquad ~= 0 and 1000/targetquad) or 1) or 1
+ --
local scaledwidth = defaultwidth * hdelta
local scaledheight = defaultheight * vdelta
local scaleddepth = defaultdepth * vdelta
@@ -1034,6 +1028,7 @@ function constructors.finalize(tfmdata)
properties.psname = properties.psname or tfmdata.psname
--
properties.encodingbytes = tfmdata.encodingbytes or 1
+ properties.subfont = tfmdata.subfont or nil
properties.embedding = tfmdata.embedding or "subset"
properties.tounicode = tfmdata.tounicode or 1
properties.cidinfo = tfmdata.cidinfo or nil
@@ -1067,6 +1062,7 @@ function constructors.finalize(tfmdata)
tfmdata.psname = nil
--
tfmdata.encodingbytes = nil
+ tfmdata.subfont = nil
tfmdata.embedding = nil
tfmdata.tounicode = nil
tfmdata.cidinfo = nil