Optimize full-serifed variants for three k-derived letters. (#2783)

This commit is contained in:
John McWilliams 2025-05-26 15:38:58 -04:00 committed by GitHub
parent cec3263c77
commit 6479b62a62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 8 deletions

View file

@ -24,8 +24,9 @@ glyph-block Letter-Latin-K : begin
# F: Whether the serif is full
# B: Bottom serif type
# T: Top serif type
define [HasRtSerif mode] : maskBit mode 1
define [HasRbSerif mode] : maskBit mode 0
define [HasRtSerif mode] : maskBit mode 1
define [HasRbSerif mode] : maskBit mode 0
define [HasFullSerif mode] : maskBit mode 2
define flex-params [KLegSlabs] : glyph-proc
local-parameter : mode -- 0
@ -43,7 +44,7 @@ glyph-block Letter-Latin-K : begin
local sideJutAdj : Ok + [HSwToV stroke]
local symJutExtraAdj : HSwToV (0.5 * stroke)
local slabIsFull : maskBit mode 2
local slabIsFull : HasFullSerif mode
if [HasRtSerif mode] : include : tagged 'serifRT' : if slabIsFull
then : union
@ -419,7 +420,6 @@ glyph-block Letter-Latin-K : begin
topRightAndBottomRightSerifed { 0 0 3 }
triSerifed { 2 0 3 }
serifedKappa { 2 1 3 }
fullSerifedKappa { 2 1 7 }
serifed : match body
[Just 'symmetricConnectedKH'] { 1 1 2 }
__ { 1 1 3 }
@ -616,7 +616,8 @@ glyph-block Letter-Latin-K : begin
if slabLT : include : tagged 'serifLT' : union
HSerif.lt (xBarLeft + [HSwToV HalfStroke]) Ascender Jut
HSerif.rt (xBarLeft + [HSwToV HalfStroke]) Ascender MidJutSide
if slabLB : include : tagged 'serifLB'
if slabLB : include : tagged 'serifLB' : if [HasFullSerif slabLegs]
HSerif.mb (xBarLeft + [HSwToV HalfStroke]) 0 Jut
HSerif.lb xBarLeft 0 SideJut
include : FlipAround Middle (XH / 2)
include : MarkSet.p
@ -663,7 +664,7 @@ glyph-block Letter-Latin-K : begin
derive-composites 'kStrokeLegStroke' 0xA745 'kStroke' 'legSlashOver'
CreateTurnedLetter 'turnK' 0xA7B0 'K' HalfAdvance (CAP / 2)
CreateTurnedLetter 'smcpTurnK' 0x1DF10 'smcpK' HalfAdvance (XH / 2)
CreateTurnedLetter 'turnSmcpK' 0x1DF10 'smcpK' HalfAdvance (XH / 2)
select-variant 'turnk' 0x29E (follow -- 'k')