summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-imp-dimensions.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-04-09 20:43:45 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-04-09 20:43:45 +0200
commit9191d12efe40ce045f76b695fc5c02fa6a1a7d6a (patch)
treec9537c13c71ee54be562cd8124cf04405e34f937 /tex/context/base/mkiv/font-imp-dimensions.lua
parenta41fe00a674c46d923de837778e9ee44565dc341 (diff)
downloadcontext-9191d12efe40ce045f76b695fc5c02fa6a1a7d6a.tar.gz
2021-04-09 19:56:00
Diffstat (limited to 'tex/context/base/mkiv/font-imp-dimensions.lua')
-rw-r--r--tex/context/base/mkiv/font-imp-dimensions.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/font-imp-dimensions.lua b/tex/context/base/mkiv/font-imp-dimensions.lua
index 760ce3719..66e218e0f 100644
--- a/tex/context/base/mkiv/font-imp-dimensions.lua
+++ b/tex/context/base/mkiv/font-imp-dimensions.lua
@@ -42,6 +42,7 @@ local function initialize(tfmdata,key,value)
local newwidth = false
local newheight = false
local newdepth = false
+ local newshift = false
if value == "strut" then
newheight = gettexdimen("strutht")
newdepth = gettexdimen("strutdp")
@@ -55,6 +56,7 @@ local function initialize(tfmdata,key,value)
newwidth = spec[1]
newheight = spec[2]
newdepth = spec[3]
+ newshift = spec[4]
local quad = parameters.quad or 0
local ascender = parameters.ascender or 0
local descender = parameters.descender or 0
@@ -87,6 +89,7 @@ local function initialize(tfmdata,key,value)
parameters.x_heigth = (ascender + descender) / 2
end
end
+ -- todo: hshift too
if newwidth or newheight or newdepth then
for unicode, character in next, characters do
local oldwidth = character.width
@@ -101,7 +104,7 @@ local function initialize(tfmdata,key,value)
character.depth = depth
if oldwidth ~= width then
local commands = character.commands
- local hshift = rightcommand[(width - oldwidth) / 2]
+ local hshift = rightcommand[newshift or ((width - oldwidth) / 2)]
if commands then
character.commands = prependcommands (
commands,