Skip to content

Commit

Permalink
Don't turn font kerns into user kerns while letterspacing
Browse files Browse the repository at this point in the history
  • Loading branch information
zauguin committed Apr 6, 2024
1 parent 12521e8 commit fe766fd
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 30 deletions.
1 change: 0 additions & 1 deletion src/luaotfload-letterspace.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions testfiles/issue53-whatsits.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
54 changes: 27 additions & 27 deletions testfiles/letterspace1.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -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 –
Expand All @@ -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 –
Expand Down Expand Up @@ -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 –
Expand Down Expand Up @@ -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 –
Expand Down Expand Up @@ -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 –
Expand All @@ -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)
Expand All @@ -237,22 +237,22 @@ 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
....\glue(\spaceskip) 7.5 plus 3.75 minus 2.49998
....\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 –
Expand Down Expand Up @@ -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 -
Expand All @@ -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 -
Expand Down Expand Up @@ -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 -
Expand Down Expand Up @@ -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 -
Expand Down Expand Up @@ -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 -
Expand Down Expand Up @@ -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)
Expand All @@ -501,22 +501,22 @@ 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
....\glue(\spaceskip) 7.5 plus 3.75 minus 2.49998
....\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 -
Expand Down Expand Up @@ -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 –
Expand All @@ -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 –
Expand All @@ -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 –
Expand Down Expand Up @@ -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 –
Expand Down Expand Up @@ -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 –
Expand All @@ -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)
Expand All @@ -733,22 +733,22 @@ 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
....\glue(\spaceskip) 7.5 plus 3.75 minus 2.49998
....\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 –
Expand Down

0 comments on commit fe766fd

Please sign in to comment.