summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/font-imp-dimensions.lua
diff options
context:
space:
mode:
authorSiep Kroonenberg <siepo@cybercomm.nl>2023-02-26 14:47:05 +0000
committerSiep Kroonenberg <siepo@cybercomm.nl>2023-02-26 14:47:05 +0000
commitf9897a2b35a4862f1f0ac5ea4e8702b3668588a5 (patch)
tree96ba243f29c1a3c8bb945d5f16b7996eb190b6ec /Master/texmf-dist/tex/context/base/mkiv/font-imp-dimensions.lua
parent63fa9cdb45000fcd36ad5bd0d594fbd1f57ec16e (diff)
ConTeXt LMTX: tex
git-svn-id: svn://tug.org/texlive/trunk@66178 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/font-imp-dimensions.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-imp-dimensions.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-imp-dimensions.lua b/Master/texmf-dist/tex/context/base/mkiv/font-imp-dimensions.lua
index 760ce37193a..9e664a68484 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-imp-dimensions.lua
+++ b/Master/texmf-dist/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
@@ -100,8 +103,9 @@ local function initialize(tfmdata,key,value)
character.height = height
character.depth = depth
if oldwidth ~= width then
+ -- todo: xoffset
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,