[latex3-commits] [git/LaTeX3-latex3-luaotfload] dev: Use fontmode instead of textmode in layered glyphs (0f30cb5)

Marcel Fabian Krüger tex at 2krueger.de
Fri Dec 6 22:14:57 CET 2019


Repository : https://github.com/latex3/luaotfload
On branch  : dev
Link       : https://github.com/latex3/luaotfload/commit/0f30cb5dadd870fbc2d4633417ecd48933715760

>---------------------------------------------------------------

commit 0f30cb5dadd870fbc2d4633417ecd48933715760
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Fri Dec 6 21:49:34 2019 +0100

    Use fontmode instead of textmode in layered glyphs
    
    Fixes #124 for harf mode.


>---------------------------------------------------------------

0f30cb5dadd870fbc2d4633417ecd48933715760
 src/luaotfload-harf-plug.lua | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/luaotfload-harf-plug.lua b/src/luaotfload-harf-plug.lua
index 6848de1..adbf884 100644
--- a/src/luaotfload-harf-plug.lua
+++ b/src/luaotfload-harf-plug.lua
@@ -565,8 +565,17 @@ end
 local push_cmd = { "push" }
 local pop_cmd = { "pop" }
 local nop_cmd = { "nop" }
-local save_cmd = { "pdf", "page", "q" }
-local restore_cmd = { "pdf", "page", "Q" }
+--[[
+  In the following, "text" actually refers to "font" mode and not to "text"
+  mode. "font" mode is called "text" inside of virtual font commands (don't
+  ask me why, but the LuaTeX source does make it clear that this is intentional)
+  and behaves mostly like "page" (especially it does not enter a "BT" "ET"
+  block) except that it always resets the current position to the origin.
+  This is necessary to ensure that the q/Q pair does not interfere with TeX's
+  position tracking.
+  ]]
+local save_cmd = { "pdf", "text", "q" }
+local restore_cmd = { "pdf", "text", "Q" }
 
 -- Convert glyphs to nodes and collect font characters.
 local function tonodes(head, node, run, glyphs)





More information about the latex3-commits mailing list