summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/driv-shp.lmt
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkxl/driv-shp.lmt')
-rw-r--r--tex/context/base/mkxl/driv-shp.lmt29
1 files changed, 17 insertions, 12 deletions
diff --git a/tex/context/base/mkxl/driv-shp.lmt b/tex/context/base/mkxl/driv-shp.lmt
index ace259954..5e3bfd703 100644
--- a/tex/context/base/mkxl/driv-shp.lmt
+++ b/tex/context/base/mkxl/driv-shp.lmt
@@ -165,10 +165,13 @@ local flush_character do
local saved_r = pos_r
pos_r = lefttoright_code
- local data = fontdata[font] -- hm, so why pass data
- local fnt = font
- local fonts = data.fonts
- local siz = (data.parameters.factor or 1)/65536
+ local xoffset = data.xoffset
+ local yoffset = data.yoffset
+
+ local data = fontdata[font] -- offsets etc
+ local fnt = font
+ local fonts = data.fonts
+ local siz = (data.parameters.factor or 1)/65536
-- An alternative where we (here) locally define handlers like this:
--
@@ -182,6 +185,16 @@ local flush_character do
-- work as expected (so we end up in a nesting loop). I remember hitting this somewhat
-- unexpected feature before.
+if xoffset and xoffset ~= 0 then
+ if factor ~= 0 then
+ xoffset = xoffset + xoffset * factor / refactored -- expansion
+ end
+ pos_h = pos_h + xoffset * sx
+end
+if yoffset and yoffset ~= 0 then
+ pos_v = pos_v + yoffset * sy
+end
+
-- we assume resolved fonts: id mandate but maybe also size
local function flushchar(fnt,chr,f,e) -- can't be moved out of the function due to binding locals
@@ -528,14 +541,6 @@ local flush_character do
else
-- kind of messy that we do orientation here and offsets elsewhere .. this might change
local orientation = data.orientation -- 0 (none), 1, 2, 3 or 4 (none)
--- local x = data.xoffset
--- local y = data.yoffset
--- if x then
--- pos_h = pos_h + x * sx
--- end
--- if y then
--- pos_v = pos_v + y * sy
--- end
if orientation and (orientation == 1 or orientation == 3) then
-- we can get weird charactersbox tracing here
pushorientation(orientation,pos_h,pos_v)