summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/font-hsh.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-04-19 23:37:39 +0000
committerKarl Berry <karl@freefriends.org>2013-04-19 23:37:39 +0000
commit69de3344104bfec286cbe7ea63f03fab58d3c1ec (patch)
tree14d60f3983479b6a35b024ed1c170d109b86d4e9 /Master/texmf-dist/tex/context/base/font-hsh.lua
parent9ff55323bdb88ede985266ee9123bc2cdda58848 (diff)
context update from cont-tmf.zip of Apr 20 01:16, 11085698 bytes
git-svn-id: svn://tug.org/texlive/trunk@30044 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/font-hsh.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/font-hsh.lua44
1 files changed, 44 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/font-hsh.lua b/Master/texmf-dist/tex/context/base/font-hsh.lua
index d6c226b7c13..f5c80d7053e 100644
--- a/Master/texmf-dist/tex/context/base/font-hsh.lua
+++ b/Master/texmf-dist/tex/context/base/font-hsh.lua
@@ -14,12 +14,16 @@ local fonts = fonts
local hashes = fonts.hashes or allocate()
fonts.hashes = hashes
+-- todo: autoallocate ... just create on the fly .. use constructors.keys (problem: plurals)
+
local identifiers = hashes.identifiers or allocate()
local characters = hashes.characters or allocate() -- chardata
local descriptions = hashes.descriptions or allocate()
local parameters = hashes.parameters or allocate()
local properties = hashes.properties or allocate()
local resources = hashes.resources or allocate()
+local spacings = hashes.spacings or allocate()
+local spaces = hashes.spaces or allocate()
local quads = hashes.quads or allocate() -- maybe also spacedata
local xheights = hashes.xheights or allocate()
local csnames = hashes.csnames or allocate() -- namedata
@@ -33,6 +37,8 @@ hashes.descriptions = descriptions
hashes.parameters = parameters
hashes.properties = properties
hashes.resources = resources
+hashes.spacings = spacings
+hashes.spaces = spaces
hashes.quads = quads hashes.emwidths = quads
hashes.xheights = xheights hashes.exheights = xheights
hashes.csnames = csnames
@@ -47,6 +53,16 @@ local nulldata = allocate {
descriptions = { },
properties = { },
parameters = { -- lmromanregular @ 12pt
+ slantperpoint = 0,
+ spacing = {
+ width = 256377,
+ stretch = 128188,
+ shrink = 85459,
+ extra = 85459,
+ },
+ quad = 786432,
+ xheight = 338952,
+ -- compatibility:
slant = 0, -- 1
space = 256377, -- 2
space_stretch = 128188, -- 3
@@ -128,6 +144,34 @@ setmetatableindex(quads, function(t,k)
end
end)
+local nospacing = {
+ width = 0,
+ stretch = 0,
+ shrink = 0,
+ extra = 0,
+}
+
+setmetatableindex(spacings, function(t,k)
+ if k == true then
+ return spacings[currentfont()]
+ else
+ local parameters = parameters[k]
+ local spacing = parameters and parameters.spacing or nospacing
+ t[k] = spacing
+ return spacing
+ end
+end)
+
+setmetatableindex(spaces, function(t,k)
+ if k == true then
+ return spaces[currentfont()]
+ else
+ local space = spacings[k].width
+ t[k] = space
+ return space
+ end
+end)
+
setmetatableindex(marks, function(t,k)
if k == true then
return marks[currentfont()]