summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-imp-unicode.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-06-07 20:24:45 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-06-07 20:24:45 +0200
commit4a4cabe9005295cfa349269ccb6e0ffa5f9d4fb3 (patch)
tree12b97e5027069dcfa1e02f4f9a2937c7e7d6f3e8 /tex/context/base/mkiv/font-imp-unicode.lua
parenta9c0902d867e6e44f7503ba67ef1d1debc349b02 (diff)
downloadcontext-4a4cabe9005295cfa349269ccb6e0ffa5f9d4fb3.tar.gz
2021-06-07 20:03:00
Diffstat (limited to 'tex/context/base/mkiv/font-imp-unicode.lua')
-rw-r--r--tex/context/base/mkiv/font-imp-unicode.lua26
1 files changed, 24 insertions, 2 deletions
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,
+ }
+}