summaryrefslogtreecommitdiff
path: root/tex/generic
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2016-11-22 20:44:35 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-11-22 20:44:35 +0100
commitf4ff686750ca9405662c7615e9c4b04685b5be5c (patch)
treea9999aa6a9bdfdf5fa707b20e95e6ca6a405a4a1 /tex/generic
parentad79afc01bebd1a16f30f8c08b873ff52224bd19 (diff)
downloadcontext-f4ff686750ca9405662c7615e9c4b04685b5be5c.tar.gz
2016-11-22 20:10:00
Diffstat (limited to 'tex/generic')
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua33
1 files changed, 29 insertions, 4 deletions
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 18ed3da02..28f6848ae 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 11/18/16 22:20:13
+-- merge date : 11/22/16 20:03:56
do -- begin closure to overcome local limits and interference
@@ -13540,7 +13540,11 @@ local f_unicode=formatters["U%05X"]
local f_index=formatters["I%05X"]
local f_character_y=formatters["%C"]
local f_character_n=formatters["[ %C ]"]
-local doduplicates=true
+local check_duplicates=true
+local check_soft_hyphen=false
+directives.register("otf.checksofthyphen",function(v)
+ check_soft_hyphen=v
+end)
local function replaced(list,index,replacement)
if type(list)=="number" then
return replacement
@@ -13608,7 +13612,7 @@ local function unifyresources(fontdata,indices)
end
end
local done={}
- local duplicates=doduplicates and resources.duplicates
+ local duplicates=check_duplicates and resources.duplicates
if duplicates and not next(duplicates) then
duplicates=false
end
@@ -13845,10 +13849,31 @@ local function unifyresources(fontdata,indices)
unifythem(resources.sublookups)
end
local function copyduplicates(fontdata)
- if doduplicates then
+ if check_duplicates then
local descriptions=fontdata.descriptions
local resources=fontdata.resources
local duplicates=resources.duplicates
+ if check_soft_hyphen then
+ local ds=descriptions[0xAD]
+ if not ds or ds.width==0 then
+ if ds then
+ descriptions[0xAD]=nil
+ report("patching soft hyphen")
+ else
+ report("adding soft hyphen")
+ end
+ if not duplicates then
+ duplicates={}
+ resources.duplicates=duplicates
+ end
+ local dh=duplicates[0x2D]
+ if dh then
+ dh[#dh+1]={ [0xAD]=true }
+ else
+ duplicates[0x2D]={ [0xAD]=true }
+ end
+ end
+ end
if duplicates then
for u,d in next,duplicates do
local du=descriptions[u]