Skip to content

Commit

Permalink
Optimize serifed semi-chancery variants for x.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcwilliams403 committed Oct 20, 2024
1 parent 50f37ec commit 6b857e6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions changes/31.9.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
- LONG RIGHT TACK (`U+27DD`).
- LONG LEFT TACK (`U+27DE`).
- UP ARROW THROUGH CIRCLE (`U+29BD`).
* Optimize `semi-chancery-straight-serifed` and `semi-chancery-curly-serifed` variants for `x` (`cv58`).
15 changes: 9 additions & 6 deletions packages/font-glyphs/src/letter/latin/x.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ glyph-block Letter-Latin-X : begin
include : HalfXStrand stb slab xLeft yLeft xMid yMid turn pStraight tension _sw (-0.001)
include : HalfXStrand stb slab xRight yRight xMid yMid turn pStraight tension _sw (-0.001)

define [XChanceryStrand sign leftX leftY rightX rightY fHalf _sw] : begin
define [XChanceryStrand sign fSlab _leftX leftY _rightX rightY fHalf _sw] : begin
local sw : fallback _sw Stroke
local blendK1X : StrokeWidthBlend 0.58 0.65
local blendK1Y 0.2
Expand All @@ -63,6 +63,9 @@ glyph-block Letter-Latin-X : begin

local fine : [AdviceStroke 3] * (sw / Stroke)

local leftX : _leftX - [if fSlab SideJut 0]
local rightX : _rightX + [if fSlab SideJut 0]

return : dispiro
if fHalf
flat [mix leftX rightX 0.5] [mix leftY rightY 0.5] [widths.center fine]
Expand Down Expand Up @@ -142,7 +145,7 @@ glyph-block Letter-Latin-X : begin
include : match stroke1
[Just STROKE-STRAIGHT] : XStrand true fSlab df.leftSB bot df.rightSB top turn 0.4 tension sw
[Just STROKE-CURLY] : XStrand false fSlab df.leftSB bot df.rightSB top turn 0.4 tension sw
[Just STROKE-CHANCERY] : XChanceryStrand (-1) df.leftSB bot df.rightSB top false sw
[Just STROKE-CHANCERY] : XChanceryStrand (-1) fSlab df.leftSB bot df.rightSB top false sw
([Just STROKE-CURSIVE] || [Just STROKE-CURSIVE-FLAT]) : composite-proc
XCursiveHalfShape top bot df.middle df.rightSB
swCoEnd -- swCursiveCoEnd
Expand All @@ -154,7 +157,7 @@ glyph-block Letter-Latin-X : begin
include : match stroke2
[Just STROKE-STRAIGHT] : XStrand true fSlab df.leftSB top df.rightSB bot turn 0.4 tension sw
[Just STROKE-CURLY] : XStrand false fSlab df.leftSB top df.rightSB bot turn 0.4 tension sw
[Just STROKE-CHANCERY] : XChanceryStrand (+1) df.leftSB top df.rightSB bot false sw
[Just STROKE-CHANCERY] : XChanceryStrand (+1) fSlab df.leftSB top df.rightSB bot false sw
[Just STROKE-CURSIVE] : XCursiveHalfShape top bot df.middle df.rightSB
swCoEnd -- swCursiveCoEnd
swEnd -- swCursiveEnd
Expand All @@ -168,12 +171,12 @@ glyph-block Letter-Latin-X : begin
include : match stroke1
[Just STROKE-STRAIGHT] : HalfXStrand true fSlab df.rightSB top df.middle midy turn 0.4 tension sw
[Just STROKE-CURLY] : HalfXStrand false fSlab df.rightSB top df.middle midy turn 0.4 tension sw
[Just STROKE-CHANCERY] : XChanceryStrand (-1) df.leftSB bot df.rightSB top true sw
[Just STROKE-CHANCERY] : XChanceryStrand (-1) fSlab df.leftSB bot df.rightSB top true sw
__ : glyph-proc
include : match stroke2
[Just STROKE-STRAIGHT] : HalfXStrand true fSlab df.rightSB bot df.middle midy turn 0.4 tension sw
[Just STROKE-CURLY] : HalfXStrand false fSlab df.rightSB bot df.middle midy turn 0.4 tension sw
[Just STROKE-CHANCERY] : XChanceryStrand (+1) df.leftSB top df.rightSB bot true sw
[Just STROKE-CHANCERY] : XChanceryStrand (+1) fSlab df.leftSB top df.rightSB bot true sw
[Just STROKE-CURSIVE] : XCursiveHalfShape top bot df.middle df.rightSB
swCoEnd -- swCursiveCoEnd
swEnd -- swCursiveEnd
Expand All @@ -196,7 +199,7 @@ glyph-block Letter-Latin-X : begin
cursive { STROKE-CURSIVE STROKE-CURSIVE null false }
semiChanceryStraightSerifless { STROKE-STRAIGHT STROKE-CHANCERY null false }
semiChanceryCurlySerifless { STROKE-CURLY STROKE-CHANCERY null false }
chancery { STROKE-CHANCERY STROKE-CHANCERY null false }
chancery { STROKE-CHANCERY STROKE-CHANCERY null SLAB }
straightSerifed { STROKE-STRAIGHT STROKE-STRAIGHT XSerifs.Full true }
curlySerifed { STROKE-CURLY STROKE-CURLY XSerifs.Full true }
semiChanceryStraightSerifed { STROKE-STRAIGHT STROKE-CHANCERY XSerifs.SemiChancery true }
Expand Down

0 comments on commit 6b857e6

Please sign in to comment.