From fe766fdb22879f469d06b10137ea2870edab7f27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Fabian=20Kr=C3=BCger?= Date: Sat, 6 Apr 2024 10:09:05 +0200 Subject: [PATCH] Don't turn font kerns into user kerns while letterspacing --- src/luaotfload-letterspace.lua | 1 - testfiles/issue53-whatsits.tlg | 4 +-- testfiles/letterspace1.tlg | 54 +++++++++++++++++----------------- 3 files changed, 29 insertions(+), 30 deletions(-) diff --git a/src/luaotfload-letterspace.lua b/src/luaotfload-letterspace.lua index 1206321f..e011272c 100644 --- a/src/luaotfload-letterspace.lua +++ b/src/luaotfload-letterspace.lua @@ -352,7 +352,6 @@ kerncharacters = function (head) then -- keep else - setsubtype (prev, userkern_code) local prev_kern = getkern(prev) prev_kern = prev_kern + krn setkern (prev, prev_kern) diff --git a/testfiles/issue53-whatsits.tlg b/testfiles/issue53-whatsits.tlg index 18e87b88..daf34616 100644 --- a/testfiles/issue53-whatsits.tlg +++ b/testfiles/issue53-whatsits.tlg @@ -31,14 +31,14 @@ Completed box being shipped out [1] .....\localrightbox=null ....\hbox(0.0+0.0)x15.0, direction TLT ....\TU/TeXGyreTermes(0)/m/n/10 A -....\kern2.7 +....\kern2.7 (font) ....\TU/TeXGyreTermes(0)/m/n/10 u ....\kern3.0 (font) ....\TU/TeXGyreTermes(0)/m/n/10 f ....\pdfcolorstack 0 push {1 0 0 rg 1 0 0 RG} ....\kern3.0 (font) ....\TU/TeXGyreTermes(0)/m/n/10 g -....\kern2.8 +....\kern2.8 (font) ....\TU/TeXGyreTermes(0)/m/n/10 a ....\kern3.0 (font) ....\TU/TeXGyreTermes(0)/m/n/10 b diff --git a/testfiles/letterspace1.tlg b/testfiles/letterspace1.tlg index 179efd16..d6a6ad06 100644 --- a/testfiles/letterspace1.tlg +++ b/testfiles/letterspace1.tlg @@ -48,7 +48,7 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(0)/m/n/10 a ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10 b -....\kern5.1 +....\kern5.1 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10 c ....\glue(\spaceskip) 7.5 plus 3.75 minus 2.49998 ....\TU/LinLibertine_R.otf(0)/m/n/10 – @@ -70,7 +70,7 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls a ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls b -....\kern5.1 +....\kern5.1 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls c ....\glue(\spaceskip) 7.75 plus 3.52272 minus 2.34846 ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls – @@ -98,7 +98,7 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls a ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls b -....\kern5.1 +....\kern5.1 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls c ....\glue(\spaceskip) 7.75 plus 3.52272 minus 2.34846 ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls – @@ -146,7 +146,7 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(1)/m/n/10 a ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(1)/m/n/10 b -....\kern5.1 +....\kern5.1 (font) ....\TU/LinLibertine_R.otf(1)/m/n/10 c ....\glue(\spaceskip) 7.5 plus 3.75 minus 2.49998 ....\TU/LinLibertine_R.otf(1)/m/n/10 – @@ -198,7 +198,7 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(2)/m/n/10 a ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(2)/m/n/10 b -....\kern5.1 +....\kern5.1 (font) ....\TU/LinLibertine_R.otf(2)/m/n/10 c ....\glue(\spaceskip) 7.5 plus 3.75 minus 2.49998 ....\TU/LinLibertine_R.otf(2)/m/n/10 – @@ -220,7 +220,7 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(0)/m/n/10 fi ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10 r -....\kern4.92 +....\kern4.92 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10 e ....\discretionary (penalty 50) .....< \kern5.0 (font) @@ -237,14 +237,14 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(3)/m/n/10 i ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(3)/m/n/10 r -....\kern4.92 +....\kern4.92 (font) ....\TU/LinLibertine_R.otf(3)/m/n/10 e ....\discretionary (penalty 50) .....< \kern5.0 (font) .....< \TU/LinLibertine_R.otf(3)/m/n/10 - .....= \kern5.0 (font) ....\TU/LinLibertine_R.otf(3)/m/n/10 f -....\kern5.4 +....\kern5.4 (font) ....\TU/LinLibertine_R.otf(3)/m/n/10 l ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(3)/m/n/10 y @@ -252,7 +252,7 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(3)/m/n/10 a ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(3)/m/n/10 b -....\kern5.1 +....\kern5.1 (font) ....\TU/LinLibertine_R.otf(3)/m/n/10 c ....\glue(\spaceskip) 7.5 plus 3.75 minus 2.49998 ....\TU/LinLibertine_R.otf(3)/m/n/10 – @@ -282,7 +282,7 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(0)/m/n/10 a ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10 b -....\kern5.1 +....\kern5.1 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10 c ....\glue(\spaceskip) 7.5 plus 3.75 minus 2.49998 ....\TU/LinLibertine_R.otf(0)/m/n/10 - @@ -308,7 +308,7 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls a ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls b -....\kern5.1 +....\kern5.1 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls c ....\glue(\spaceskip) 7.75 plus 3.52272 minus 2.34846 ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls - @@ -338,7 +338,7 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls a ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls b -....\kern5.1 +....\kern5.1 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls c ....\glue(\spaceskip) 7.75 plus 3.52272 minus 2.34846 ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls - @@ -394,7 +394,7 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(1)/m/n/10 a ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(1)/m/n/10 b -....\kern5.1 +....\kern5.1 (font) ....\TU/LinLibertine_R.otf(1)/m/n/10 c ....\glue(\spaceskip) 7.5 plus 3.75 minus 2.49998 ....\TU/LinLibertine_R.otf(1)/m/n/10 - @@ -452,7 +452,7 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(2)/m/n/10 a ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(2)/m/n/10 b -....\kern5.1 +....\kern5.1 (font) ....\TU/LinLibertine_R.otf(2)/m/n/10 c ....\glue(\spaceskip) 7.5 plus 3.75 minus 2.49998 ....\TU/LinLibertine_R.otf(2)/m/n/10 - @@ -480,7 +480,7 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(0)/m/n/10 i ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10 r -....\kern4.92 +....\kern4.92 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10 e ....\discretionary (penalty 50) .....< \kern5.0 (font) @@ -501,14 +501,14 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(3)/m/n/10 i ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(3)/m/n/10 r -....\kern4.92 +....\kern4.92 (font) ....\TU/LinLibertine_R.otf(3)/m/n/10 e ....\discretionary (penalty 50) .....< \kern5.0 (font) .....< \TU/LinLibertine_R.otf(3)/m/n/10 - .....= \kern5.0 (font) ....\TU/LinLibertine_R.otf(3)/m/n/10 f -....\kern5.4 +....\kern5.4 (font) ....\TU/LinLibertine_R.otf(3)/m/n/10 l ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(3)/m/n/10 y @@ -516,7 +516,7 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(3)/m/n/10 a ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(3)/m/n/10 b -....\kern5.1 +....\kern5.1 (font) ....\TU/LinLibertine_R.otf(3)/m/n/10 c ....\glue(\spaceskip) 7.5 plus 3.75 minus 2.49998 ....\TU/LinLibertine_R.otf(3)/m/n/10 - @@ -550,7 +550,7 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(0)/m/n/10 a ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10 b -....\kern5.1 +....\kern5.1 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10 c ....\glue(\spaceskip) 7.5 plus 3.75 minus 2.49998 ....\TU/LinLibertine_R.otf(0)/m/n/10 – @@ -572,7 +572,7 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls a ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls b -....\kern5.1 +....\kern5.1 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls c ....\glue(\spaceskip) 7.75 plus 3.52272 minus 2.34846 ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls – @@ -596,7 +596,7 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls a ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls b -....\kern5.1 +....\kern5.1 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls c ....\glue(\spaceskip) 7.75 plus 3.52272 minus 2.34846 ....\TU/LinLibertine_R.otf(0)/m/n/10/100ls – @@ -642,7 +642,7 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(1)/m/n/10 a ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(1)/m/n/10 b -....\kern5.1 +....\kern5.1 (font) ....\TU/LinLibertine_R.otf(1)/m/n/10 c ....\glue(\spaceskip) 7.5 plus 3.75 minus 2.49998 ....\TU/LinLibertine_R.otf(1)/m/n/10 – @@ -694,7 +694,7 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(2)/m/n/10 a ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(2)/m/n/10 b -....\kern5.1 +....\kern5.1 (font) ....\TU/LinLibertine_R.otf(2)/m/n/10 c ....\glue(\spaceskip) 7.5 plus 3.75 minus 2.49998 ....\TU/LinLibertine_R.otf(2)/m/n/10 – @@ -716,7 +716,7 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(0)/m/n/10 fi ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10 r -....\kern4.92 +....\kern4.92 (font) ....\TU/LinLibertine_R.otf(0)/m/n/10 e ....\discretionary (penalty 50) .....< \kern5.0 (font) @@ -733,14 +733,14 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(3)/m/n/10 i ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(3)/m/n/10 r -....\kern4.92 +....\kern4.92 (font) ....\TU/LinLibertine_R.otf(3)/m/n/10 e ....\discretionary (penalty 50) .....< \kern5.0 (font) .....< \TU/LinLibertine_R.otf(3)/m/n/10 - .....= \kern5.0 (font) ....\TU/LinLibertine_R.otf(3)/m/n/10 f -....\kern5.4 +....\kern5.4 (font) ....\TU/LinLibertine_R.otf(3)/m/n/10 l ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(3)/m/n/10 y @@ -748,7 +748,7 @@ Completed box being shipped out [1] ....\TU/LinLibertine_R.otf(3)/m/n/10 a ....\kern5.0 (font) ....\TU/LinLibertine_R.otf(3)/m/n/10 b -....\kern5.1 +....\kern5.1 (font) ....\TU/LinLibertine_R.otf(3)/m/n/10 c ....\glue(\spaceskip) 7.5 plus 3.75 minus 2.49998 ....\TU/LinLibertine_R.otf(3)/m/n/10 –