diff options
author | Hans Hagen <pragma@wxs.nl> | 2021-11-13 20:59:32 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2021-11-13 20:59:32 +0100 |
commit | a1b3f047bf4bc1043366fc8556099cda37e83dab (patch) | |
tree | 87ec3c08ddfc162934969c72a8c29f7980778af1 /tex/context/base/mkxl/driv-shp.lmt | |
parent | e1968f3ee77c1485c06a567aed0bc0e2eb5c7d01 (diff) | |
download | context-a1b3f047bf4bc1043366fc8556099cda37e83dab.tar.gz |
2021-11-13 20:35:00
Diffstat (limited to 'tex/context/base/mkxl/driv-shp.lmt')
-rw-r--r-- | tex/context/base/mkxl/driv-shp.lmt | 29 |
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) |