summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-ext.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-03-12 17:15:10 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-03-12 17:15:10 +0100
commit4b6314243d4bc44fa3c94f569264fdffd5405e90 (patch)
treea50e4f3309d40b2709618a00311934c55258cfbc /tex/context/base/mkiv/font-ext.lua
parent4a28e5cee346738f2f9be479090c3657a87b7206 (diff)
downloadcontext-4b6314243d4bc44fa3c94f569264fdffd5405e90.tar.gz
2016-03-12 16:45:00
Diffstat (limited to 'tex/context/base/mkiv/font-ext.lua')
-rw-r--r--tex/context/base/mkiv/font-ext.lua43
1 files changed, 43 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/font-ext.lua b/tex/context/base/mkiv/font-ext.lua
index f153d5624..fc161f59a 100644
--- a/tex/context/base/mkiv/font-ext.lua
+++ b/tex/context/base/mkiv/font-ext.lua
@@ -7,6 +7,7 @@ if not modules then modules = { } end modules ['font-ext'] = {
}
local next, type, byte = next, type, string.byte
+local utfbyte = utf.byte
local context = context
local fonts = fonts
@@ -855,6 +856,47 @@ registerotffeature {
}
}
+-- -- for notosans but not general
+--
+-- do
+--
+-- local v_local = interfaces and interfaces.variables and interfaces.variables["local"] or "local"
+--
+-- local function initialize(tfmdata,key,value)
+-- local characters = tfmdata.characters
+-- local parameters = tfmdata.parameters
+-- local oldchar = 32
+-- local newchar = 32
+-- if value == "locl" or value == v_local then
+-- newchar = fonts.handlers.otf.getsubstitution(tfmdata,oldchar,"locl",true) or oldchar
+-- elseif value == true then
+-- -- use normal space
+-- elseif value then
+-- newchar = utfbyte(value)
+-- else
+-- return
+-- end
+-- local newchar = newchar and characters[newchar]
+-- local newspace = newchar and newchar.width
+-- if newspace > 0 then
+-- parameters.space = newspace
+-- parameters.space_stretch = newspace/2
+-- parameters.space_shrink = newspace/3
+-- parameters.extra_space = parameters.space_shrink
+-- end
+-- end
+--
+-- registerotffeature {
+-- name = 'space', -- true|false|locl|character
+-- description = 'space settings',
+-- manipulators = {
+-- base = initialize,
+-- node = initialize,
+-- }
+-- }
+--
+-- end
+
-- -- historic stuff, move from font-ota (handled differently, typo-rep)
--
-- local delete_node = nodes.delete
@@ -995,3 +1037,4 @@ implement {
context(getprivatenode(fontdata[currentfont()],name))
end
}
+