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

View file

@ -3442,7 +3442,7 @@ disableIf = [ { body = "diagonal-tailed-cursive" } ]
descriptionAffix = "full serifs at legs" descriptionAffix = "full serifs at legs"
selectorAffix.k = "fullSerifed" selectorAffix.k = "fullSerifed"
selectorAffix."k/sansSerif" = "serifless" selectorAffix."k/sansSerif" = "serifless"
selectorAffix."latn/kappa" = "fullSerifedKappa" selectorAffix."latn/kappa" = "fullSerifed"
selectorAffix.kHookTop = "fullSerifed" selectorAffix.kHookTop = "fullSerifed"
selectorAffix.kDescender = "fullSerifed" selectorAffix.kDescender = "fullSerifed"
@ -6142,7 +6142,7 @@ selectorAffix."grek/kappa/sansSerif" = "serifless"
[prime.lower-kappa.variants-buildup.stages.serifs.full-serifed] [prime.lower-kappa.variants-buildup.stages.serifs.full-serifed]
rank = 8 rank = 8
descriptionAffix = "full serifs at legs" descriptionAffix = "full serifs at legs"
selectorAffix."grek/kappa" = "fullSerifedKappa" selectorAffix."grek/kappa" = "fullSerifed"
selectorAffix."grek/kappa/sansSerif" = "serifless" selectorAffix."grek/kappa/sansSerif" = "serifless"
@ -10573,6 +10573,7 @@ cyrl-a = "double-storey-toothless-corner"
cyrl-u = "straight-serifless" cyrl-u = "straight-serifless"
one = "base-flat-top-serif" one = "base-flat-top-serif"
four = "closed-serifless" four = "closed-serifless"
five = "upright-flat-serifless"
six = "straight-bar" six = "straight-bar"
seven = "straight-serifless" seven = "straight-serifless"
eight = "two-circles" eight = "two-circles"
@ -10632,6 +10633,7 @@ cyrl-ka = "symmetric-connected-serifed"
cyrl-capital-u = "straight-serifed" cyrl-capital-u = "straight-serifed"
cyrl-u = "straight-serifed" cyrl-u = "straight-serifed"
four = "closed-serifed" four = "closed-serifed"
five = "upright-flat-serifed"
seven = "straight-serifed" seven = "straight-serifed"
micro-sign = "toothless-rounded-serifed" micro-sign = "toothless-rounded-serifed"