summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv')
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/font-imp-unicode.lua26
-rw-r--r--tex/context/base/mkiv/font-mis.lua2
-rw-r--r--tex/context/base/mkiv/font-otl.lua22
-rw-r--r--tex/context/base/mkiv/font-oup.lua28
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin23890 -> 23932 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin230104 -> 230100 bytes
8 files changed, 63 insertions, 19 deletions
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 110f450ea..85b195e06 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2021.06.07 14:39}
+\newcontextversion{2021.06.07 20:01}
%D This file is loaded at runtime, thereby providing an excellent place for hacks,
%D patches, extensions and new features. There can be local overloads in cont-loc
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 86e739ab2..458df82f8 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -45,7 +45,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2021.06.07 14:39}
+\edef\contextversion{2021.06.07 20:01}
%D Kind of special:
diff --git a/tex/context/base/mkiv/font-imp-unicode.lua b/tex/context/base/mkiv/font-imp-unicode.lua
index ddb965ec9..7b2cd29bf 100644
--- a/tex/context/base/mkiv/font-imp-unicode.lua
+++ b/tex/context/base/mkiv/font-imp-unicode.lua
@@ -18,6 +18,8 @@ local registerotffeature = fonts.handlers.otf.features.register
local extraprivates = helpers.extraprivates
local addprivate = helpers.addprivate
+local tounicode = fonts.mappings.tounicode
+
local function initialize(tfmdata)
for i=1,#extraprivates do
local e = extraprivates[i]
@@ -38,8 +40,6 @@ constructors.newfeatures.otf.register {
}
}
-local tounicode = fonts.mappings.tounicode
-
local function initialize(tfmdata,key,value)
if value == "ligatures" then
local private = fonts.constructors and fonts.constructors.privateoffset or 0xF0000
@@ -80,3 +80,25 @@ registerotffeature {
node = initialize,
}
}
+
+local function initialize(tfmdata,key,value)
+ if value then
+-- local c = tfmdata.characters[0x002D]
+-- if c then
+-- c.tounicode = tounicode(0x002D)
+-- end
+ local c = tfmdata.descriptions[0x002D]
+ if c then
+ c.tounicode = tounicode(0x002D)
+ end
+ end
+end
+
+registerotffeature {
+ name = "hardhyphen",
+ description = "hardhyphen",
+ manipulators = {
+ base = initialize,
+ node = initialize,
+ }
+}
diff --git a/tex/context/base/mkiv/font-mis.lua b/tex/context/base/mkiv/font-mis.lua
index 6620dd9f4..1748640d2 100644
--- a/tex/context/base/mkiv/font-mis.lua
+++ b/tex/context/base/mkiv/font-mis.lua
@@ -21,7 +21,7 @@ local readers = otf.readers
if readers then
- otf.version = otf.version or 3.116
+ otf.version = otf.version or 3.117
otf.cache = otf.cache or containers.define("fonts", "otl", otf.version, true)
function fonts.helpers.getfeatures(name,save)
diff --git a/tex/context/base/mkiv/font-otl.lua b/tex/context/base/mkiv/font-otl.lua
index 4619e13dc..6b564e4c1 100644
--- a/tex/context/base/mkiv/font-otl.lua
+++ b/tex/context/base/mkiv/font-otl.lua
@@ -26,7 +26,7 @@ if not modules then modules = { } end modules ['font-otl'] = {
local lower = string.lower
local type, next, tonumber, tostring, unpack = type, next, tonumber, tostring, unpack
local abs = math.abs
-local derivetable = table.derive
+local derivetable, sortedhash = table.derive, table.sortedhash
local formatters = string.formatters
local setmetatableindex = table.setmetatableindex
@@ -52,7 +52,7 @@ local report_otf = logs.reporter("fonts","otf loading")
local fonts = fonts
local otf = fonts.handlers.otf
-otf.version = 3.116 -- beware: also sync font-mis.lua and in mtx-fonts
+otf.version = 3.117 -- beware: also sync font-mis.lua and in mtx-fonts
otf.cache = containers.define("fonts", "otl", otf.version, true)
otf.svgcache = containers.define("fonts", "svg", otf.version, true)
otf.pngcache = containers.define("fonts", "png", otf.version, true)
@@ -504,7 +504,23 @@ local function copytotfm(data,cache_id)
properties.subfont = subfont
--
if not CONTEXTLMTXMODE or CONTEXTLMTXMODE == 0 then
- properties.encodingbytes = 2
+ --
+ properties.encodingbytes = 2
+elseif CONTEXTLMTXMODE then
+ local duplicates = resources and resources.duplicates
+ if duplicates then
+ local maxindex = data.nofglyphs or metadata.nofglyphs
+ if maxindex then
+ for u, d in sortedhash(duplicates) do
+ for uu in sortedhash(d) do
+ maxindex = maxindex + 1
+ descriptions[uu].dupindex = descriptions[u].index
+ descriptions[uu].index = maxindex
+ end
+ end
+ end
+ end
+ --
end
--
-- properties.name = specification.name
diff --git a/tex/context/base/mkiv/font-oup.lua b/tex/context/base/mkiv/font-oup.lua
index c93ad4743..975e62f64 100644
--- a/tex/context/base/mkiv/font-oup.lua
+++ b/tex/context/base/mkiv/font-oup.lua
@@ -37,12 +37,16 @@ local f_index = formatters["I%05X"]
local f_character_y = formatters["%C"]
local f_character_n = formatters["[ %C ]"]
-local check_duplicates = true -- can become an option (pseudo feature) / aways needed anyway
+local check_duplicates = true -- can become an option (pseudo feature) / always needed anyway
local check_soft_hyphen = true -- can become an option (pseudo feature) / needed for tagging
-directives.register("otf.checksofthyphen",function(v)
- check_soft_hyphen = v
-end)
+if CONTEXTLMTXMODE and CONTEXTLMTXMODE > 0 then
+ check_soft_hyphen = false -- solved better elsewhere
+else
+ directives.register("otf.checksofthyphen",function(v)
+ check_soft_hyphen = v
+ end)
+end
local function replaced(list,index,replacement)
if type(list) == "number" then
@@ -454,7 +458,7 @@ local function copyduplicates(fontdata)
local duplicates = resources.duplicates
if check_soft_hyphen then
-- ebgaramond has a zero width empty soft hyphen
- -- antykwatorunsks lacks a soft hyphen
+ -- antykwatorunska lacks a soft hyphen
local ds = descriptions[0xAD]
if not ds or ds.width == 0 then
if ds then
@@ -759,6 +763,7 @@ local function unifyglyphs(fontdata,usenames)
local resources = fontdata.resources
local zero = glyphs[0]
local zerocode = zero.unicode
+ local nofglyphs = #glyphs
if not zerocode then
zerocode = private
zero.unicode = zerocode
@@ -775,7 +780,7 @@ local function unifyglyphs(fontdata,usenames)
--
if names then
-- seldom uses, we don't issue message ... this branch might even go away
- for index=1,#glyphs do
+ for index=1,nofglyphs do
local glyph = glyphs[index]
local unicode = glyph.unicode -- this is the primary one
if not unicode then
@@ -808,7 +813,7 @@ local function unifyglyphs(fontdata,usenames)
descriptions[unicode] = glyph
end
elseif trace_unicodes then
- for index=1,#glyphs do
+ for index=1,nofglyphs do
local glyph = glyphs[index]
local unicode = glyph.unicode -- this is the primary one
if not unicode then
@@ -849,7 +854,7 @@ local function unifyglyphs(fontdata,usenames)
descriptions[unicode] = glyph
end
else
- for index=1,#glyphs do
+ for index=1,nofglyphs do
local glyph = glyphs[index]
local unicode = glyph.unicode -- this is the primary one
if not unicode then
@@ -876,8 +881,8 @@ local function unifyglyphs(fontdata,usenames)
end
end
--
- for index=1,#glyphs do
- local math = glyphs[index].math
+ for index=1,nofglyphs do
+ local math = glyphs[index].math
if math then
local list = math.vparts
if list then
@@ -902,7 +907,7 @@ local function unifyglyphs(fontdata,usenames)
--
local colorpalettes = resources.colorpalettes
if colorpalettes then
- for index=1,#glyphs do
+ for index=1,nofglyphs do
local colors = glyphs[index].colors
if colors then
for i=1,#colors do
@@ -918,6 +923,7 @@ local function unifyglyphs(fontdata,usenames)
fontdata.names = names
fontdata.descriptions = descriptions
fontdata.hashmethod = hashmethod
+ fontdata.nofglyphs = nofglyphs
--
return indices, names
end
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 41913dee0..ccfc1e97d 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index 6cb724cb6..87961ecff 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ