* \[**Breaking**\]: Made serifed variants of X, Y, Z, x and z selectable via variant selector (#939).

* \[**Breaking**\]: Rename variants of `A`, `X`, `Y`, `Z`, `x` and `z`.
 * Update SS02 and SS16 to better reflect their source fonts (#939).
 * Remove unnecessary serifs of Slab Italic Small Cyrillic KA (#938).
This commit is contained in:
be5invis 2021-04-07 19:18:18 -07:00
parent 584e7a7fe0
commit 373eafa6a5
12 changed files with 780 additions and 435 deletions

View file

@ -1 +1,5 @@
* \[**Breaking**\]: The grades for width is updated to make the unit width of Extended subfamily being 0.6em.
* \[**Breaking**\]: The grades for width is updated to make the unit width of Extended subfamily being 0.6em.
* \[**Breaking**\]: Made serifed variants of `X`, `Y`, `Z`, `x` and `z` selectable via variant selector (#939).
* \[**Breaking**\]: Rename variants of `A`, `X`, `Y`, `Z`, `x` and `z`.
* Update SS02 and SS16 to better reflect their source fonts (#939).
* Remove unnecessary serifs of Slab Italic Small Cyrillic KA (#938).

View file

@ -221,22 +221,22 @@ glyph-block Letter-Latin-K : begin
VerticalHook (SB + [KBalance slab straightBar] + HalfStroke * HVContrast) (CAP - Hook - HalfStroke) HookX (-Hook)
define UpperKConfig : object
straight { KNormalLegs KStraightLegShapeImpl [if SLAB 1 0] [if SLAB 1 0] [if SLAB 1 0] }
curly { KCurlyLegs KCurlyLegShapeImpl [if SLAB 1 0] [if SLAB 1 0] [if SLAB 1 0] }
symmetricTouching { KSymmetricTouchingLegs [KSymmetricLegsImpl false] [if SLAB 1 0] [if SLAB 1 0] [if SLAB 1 0] }
symmetricConnected { KSymmetricConnectedLegs [KSymmetricLegsImpl true] [if SLAB 1 0] [if SLAB 1 0] [if SLAB 1 0] }
straightSmallCyrl { KNormalLegs KStraightLegShapeImpl [if SLAB [if para.isItalic 2 1] 0] [if SLAB [if para.isItalic 0 1] 0] [if SLAB 1 0] }
curlySmallCyrl { KCurlyLegs KCurlyLegShapeImpl [if SLAB [if para.isItalic 2 1] 0] [if SLAB [if para.isItalic 0 1] 0] [if SLAB 1 0] }
symmetricTouchingSmallCyrl { KSymmetricTouchingLegs [KSymmetricLegsImpl false] [if SLAB [if para.isItalic 2 1] 0] [if SLAB [if para.isItalic 0 1] 0] [if SLAB 1 0] }
symmetricConnectedSmallCyrl { KSymmetricConnectedLegs [KSymmetricLegsImpl true] [if SLAB [if para.isItalic 2 1] 0] [if SLAB [if para.isItalic 0 1] 0] [if SLAB 1 0] }
straightSerifless { KNormalLegs KStraightLegShapeImpl 0 0 0 }
curlySerifless { KCurlyLegs KCurlyLegShapeImpl 0 0 0 }
symmetricTouchingSerifless { KSymmetricTouchingLegs [KSymmetricLegsImpl false] 0 0 0 }
symmetricConnectedSerifless { KSymmetricConnectedLegs [KSymmetricLegsImpl true] 0 0 0 }
straightMotionSerifed { KNormalLegs KStraightLegShapeImpl 2 0 0}
curlyMotionSerifed { KCurlyLegs KCurlyLegShapeImpl 2 0 0}
symmetricTouchingMotionSerifed { KSymmetricTouchingLegs [KSymmetricLegsImpl false] 2 0 0}
symmetricConnectedMotionSerifed { KSymmetricConnectedLegs [KSymmetricLegsImpl true] 2 0 0}
straight { KNormalLegs KStraightLegShapeImpl [if SLAB 1 0] [if SLAB 1 0] [if SLAB 1 0] }
curly { KCurlyLegs KCurlyLegShapeImpl [if SLAB 1 0] [if SLAB 1 0] [if SLAB 1 0] }
symmetricTouching { KSymmetricTouchingLegs [KSymmetricLegsImpl false] [if SLAB 1 0] [if SLAB 1 0] [if SLAB 1 0] }
symmetricConnected { KSymmetricConnectedLegs [KSymmetricLegsImpl true] [if SLAB 1 0] [if SLAB 1 0] [if SLAB 1 0] }
straightSmallCyrl { KNormalLegs KStraightLegShapeImpl [if SLAB [if para.isItalic 2 1] 0] [if SLAB [if para.isItalic 0 1] 0] [if SLAB [if para.isItalic 0 1] 0] }
curlySmallCyrl { KCurlyLegs KCurlyLegShapeImpl [if SLAB [if para.isItalic 2 1] 0] [if SLAB [if para.isItalic 0 1] 0] [if SLAB [if para.isItalic 0 1] 0] }
symmetricTouchingSmallCyrl { KSymmetricTouchingLegs [KSymmetricLegsImpl false] [if SLAB [if para.isItalic 2 1] 0] [if SLAB [if para.isItalic 0 1] 0] [if SLAB [if para.isItalic 0 1] 0] }
symmetricConnectedSmallCyrl { KSymmetricConnectedLegs [KSymmetricLegsImpl true] [if SLAB [if para.isItalic 2 1] 0] [if SLAB [if para.isItalic 0 1] 0] [if SLAB [if para.isItalic 0 1] 0] }
straightSerifless { KNormalLegs KStraightLegShapeImpl 0 0 0 }
curlySerifless { KCurlyLegs KCurlyLegShapeImpl 0 0 0 }
symmetricTouchingSerifless { KSymmetricTouchingLegs [KSymmetricLegsImpl false] 0 0 0 }
symmetricConnectedSerifless { KSymmetricConnectedLegs [KSymmetricLegsImpl true] 0 0 0 }
straightMotionSerifed { KNormalLegs KStraightLegShapeImpl 2 0 0 }
curlyMotionSerifed { KCurlyLegs KCurlyLegShapeImpl 2 0 0 }
symmetricTouchingMotionSerifed { KSymmetricTouchingLegs [KSymmetricLegsImpl false] 2 0 0 }
symmetricConnectedMotionSerifed { KSymmetricConnectedLegs [KSymmetricLegsImpl true] 2 0 0 }
define [UpperKLTSerif slabTop top straightBar] : match slabTop
2 : LeftwardTopSerif (SB + [KBalance slabTop straightBar]) top SideJut

View file

@ -14,54 +14,51 @@ glyph-block Letter-Latin-Lower-D : begin
glyph-block-import Recursive-Build : Widen
glyph-block-import Letter-Shared-Shapes : CurlyTail
create-glyph 'd.toothed' : glyph-proc
create-glyph 'd.toothedSerifless' : glyph-proc
include : MarkSet.b
include : OBarRightShape
include : VBarRight RightSB 0 CAP
if SLAB : begin
include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
include : tagged 'serifRT' : LeftwardTopSerif (RightSB - Stroke * HVContrast) CAP SideJut
create-glyph 'd.tailed' : glyph-proc
create-glyph 'd.toothedTopSerifed' : glyph-proc
include : MarkSet.b
include : OBarRightShape
include : VBarRight RightSB 0 CAP
include : tagged 'serifRT' : LeftwardTopSerif (RightSB - Stroke * HVContrast) CAP SideJut
create-glyph 'd.toothedSerifed' : glyph-proc
include : MarkSet.b
include : OBarRightShape
include : VBarRight RightSB 0 CAP
include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
include : tagged 'serifRT' : LeftwardTopSerif (RightSB - Stroke * HVContrast) CAP SideJut
create-glyph 'd.tailedSerifless' : glyph-proc
include : MarkSet.b
include : OBarRightShape
include : RightwardTailedBar RightSB 0 CAP
if SLAB : begin
include : tagged 'serifRT' : LeftwardTopSerif (RightSB - Stroke * HVContrast) CAP SideJut
create-glyph 'd.toothlessCorner' : glyph-proc
create-glyph 'd.toothlessCornerSerifless' : glyph-proc
include : MarkSet.b
include : OBarRightToothlessShape XH RightSB DToothlessRise DMBlend
include : VBarRight RightSB DToothlessRise CAP
if SLAB : begin
include : tagged 'serifRT' : LeftwardTopSerif (RightSB - Stroke * HVContrast) CAP SideJut
create-glyph 'd.toothlessRounded' : glyph-proc
create-glyph 'd.toothlessRoundedSerifless' : glyph-proc
include : MarkSet.b
include : OBarRightRoundedShape XH RightSB CAP
if SLAB : begin
include : tagged 'serifRT' : LeftwardTopSerif (RightSB - Stroke * HVContrast) CAP SideJut
create-glyph 'd.toothedMotionSerifed' : glyph-proc
include : MarkSet.b
include : OBarRightShape
include : VBarRight RightSB 0 CAP
include : tagged 'serifRT' : LeftwardTopSerif (RightSB - Stroke * HVContrast) CAP SideJut
include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
create-glyph 'd.motionSerifedTailed' : glyph-proc
create-glyph 'd.tailedSerifed' : glyph-proc
include : MarkSet.b
include : OBarRightShape
include : RightwardTailedBar RightSB 0 CAP
include : tagged 'serifRT' : LeftwardTopSerif (RightSB - Stroke * HVContrast) CAP SideJut
create-glyph 'd.toothlessCornerMotionSerifed' : glyph-proc
create-glyph 'd.toothlessCornerSerifed' : glyph-proc
include : MarkSet.b
include : OBarRightToothlessShape XH RightSB DToothlessRise DMBlend
include : VBarRight RightSB DToothlessRise CAP
include : tagged 'serifRT' : LeftwardTopSerif (RightSB - Stroke * HVContrast) CAP SideJut
create-glyph 'd.toothlessRoundedMotionSerifed' : glyph-proc
create-glyph 'd.toothlessRoundedSerifed' : glyph-proc
include : MarkSet.b
include : OBarRightRoundedShape XH RightSB CAP
include : tagged 'serifRT' : LeftwardTopSerif (RightSB - Stroke * HVContrast) CAP SideJut
@ -97,42 +94,44 @@ glyph-block Letter-Latin-Lower-D : begin
include : LeftwardTopSerif (m1 - Stroke * HVContrast) CAP SideJut
define yDHookTopConnect : CAP - Hook - HalfStroke
create-glyph 'dhooktop.toothed' : glyph-proc
create-glyph 'dhooktop.toothedSerifless' : glyph-proc
include : MarkSet.b
include : OBarRightShape
include : VBarRight RightSB 0 yDHookTopConnect
include : VerticalHook (RightSB - HalfStroke * HVContrast) yDHookTopConnect HookX (-Hook)
if SLAB : include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
create-glyph 'dhooktop.tailed' : glyph-proc
create-glyph 'dhooktop.toothedBottomSerifed' : glyph-proc
include : MarkSet.b
include : OBarRightShape
include : VBarRight RightSB 0 yDHookTopConnect
include : VerticalHook (RightSB - HalfStroke * HVContrast) yDHookTopConnect HookX (-Hook)
include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
create-glyph 'dhooktop.tailedSerifless' : glyph-proc
include : MarkSet.b
include : OBarRightShape
include : RightwardTailedBar RightSB 0 yDHookTopConnect
include : VerticalHook (RightSB - HalfStroke * HVContrast) yDHookTopConnect HookX (-Hook)
if SLAB : include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
create-glyph 'dhooktop.toothlessCorner' : glyph-proc
create-glyph 'dhooktop.toothlessCornerSerifless' : glyph-proc
include : MarkSet.b
include : OBarRightToothlessShape XH RightSB DToothlessRise DMBlend
include : VBarRight RightSB DToothlessRise yDHookTopConnect
include : VerticalHook (RightSB - HalfStroke * HVContrast) yDHookTopConnect HookX (-Hook)
if SLAB : include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
create-glyph 'dhooktop.toothlessRounded' : glyph-proc
create-glyph 'dhooktop.toothlessRoundedSerifless' : glyph-proc
include : MarkSet.b
include : OBarRightRoundedShape XH RightSB yDHookTopConnect
include : VerticalHook (RightSB - HalfStroke * HVContrast) yDHookTopConnect HookX (-Hook)
if SLAB : include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
select-variant 'dhooktop' 0x257
create-glyph 'dHookBottom' 0x256 : glyph-proc
include [refer-glyph 'd.toothed'] AS_BASE ALSO_METRICS
eject-contour 'serifRB'
include [refer-glyph : if SLAB 'd.toothedTopSerifed' 'd.toothedSerifless'] AS_BASE ALSO_METRICS
include : refer-glyph 'rtailBR'
create-glyph 'dHookTopBottom' 0x1D91 : composite-proc
refer-glyph 'dhooktop.toothed'
refer-glyph 'dhooktop.toothedSerifless'
refer-glyph 'rtailBR'
with-related-glyphs 'ddot' 0x1E0B 'd' : lambda [src sel] : glyph-proc

View file

@ -13,8 +13,9 @@ glyph-block Letter-Latin-Upper-A : begin
glyph-block-import Letter-Latin-V : VShapeOutline VShape
glyph-block-export LambdaShape AMaskShape DeltaShape
define SLAB-AUTO 1
define SLAB-MOTION 2
define SLAB-NONE 0
define SLAB-TOP 1
define SLAB-BASE 2
define SLAB-TRI 3
define [AMaskShape df top sw barStraight] : new-glyph : glyph-proc
@ -24,17 +25,19 @@ glyph-block Letter-Latin-Upper-A : begin
define [ABarPosition slab top] : mix [if fBaseSlabs Stroke 0] top (XH / 2 / CAP)
define AConfig : object
straight { true SLAB-AUTO SLAB }
curly { false SLAB-AUTO SLAB }
straightMotionSerifed { true SLAB-MOTION false }
curlyMotionSerifed { false SLAB-MOTION false }
straightTriSerifed { true SLAB-TRI true }
curlyTriSerifed { false SLAB-TRI true }
straightSerifless { true SLAB-NONE false }
curlySerifless { false SLAB-NONE false }
straightTopSerifed { true SLAB-TOP false }
curlyTopSerifed { false SLAB-TOP false }
straightBaseSerifed { true SLAB-BASE true }
curlyBaseSerifed { false SLAB-BASE true }
straightTriSerifed { true SLAB-TRI true }
curlyTriSerifed { false SLAB-TRI true }
define [ASerifs df top kind] : glyph-proc : match kind
[Just SLAB-TRI] : begin
include : LeftwardTopSerif df.middle top (MidJutSide + Stroke * HVContrast * 0.25)
[Just SLAB-MOTION] : begin
[Just SLAB-TOP] : begin
include : LeftwardTopSerif Middle top [mix MidJutSide LongJut 0.5]
foreach { suffix { fStraightBar slabKind fBaseSlabs } } [Object.entries AConfig] : do

View file

@ -29,8 +29,9 @@ glyph-block Letter-Latin-Upper-T : begin
include : tagged 'serifMB' : LeftwardBottomSerif Middle 0 MidJutCenter
define TConfig : object
standard { SLAB SLAB }
motionSerifed { true false }
serifless { false false }
motionSerifed { true false }
serifed { true true }
foreach { suffix { doST doSB } } [Object.entries TConfig] : do
create-glyph "T.\(suffix)" : glyph-proc

View file

@ -14,7 +14,8 @@ glyph-block Letter-Latin-Upper-Y : begin
define BODY-CURLY 0
define BODY-STRAIGHT 1
define SLAB-AUTO 1
define SLAB-NONE 0
define SLAB-ALL 1
define SLAB-BASE 2
define SLAB-MOTION 3
@ -28,7 +29,7 @@ glyph-block Letter-Latin-Upper-Y : begin
set-base-anchor 'overlay' Middle cross
match slabType
[Just SLAB-AUTO] : if SLAB : begin
[Just SLAB-ALL] : begin
include : VSerifs top
include : CenterBottomSerif Middle [fallback bot 0] MidJutSide
[Just SLAB-MOTION] : include : tagged 'serifLT' : LeftwardTopSerif SB top SideJut
@ -53,12 +54,14 @@ glyph-block Letter-Latin-Upper-Y : begin
define YConfig : object
straight { BODY-STRAIGHT SLAB-AUTO }
curly { BODY-CURLY SLAB-AUTO }
straightSerifless { BODY-STRAIGHT SLAB-NONE }
curlySerifless { BODY-CURLY SLAB-NONE }
straightBaseSerifed { BODY-STRAIGHT SLAB-BASE }
curlyBaseSerifed { BODY-CURLY SLAB-BASE }
straightMotionSerifed { BODY-STRAIGHT SLAB-MOTION }
curlyMotionSerifed { BODY-CURLY SLAB-MOTION }
straightSerifed { BODY-STRAIGHT SLAB-ALL }
curlySerifed { BODY-CURLY SLAB-ALL }
foreach { suffix { bodyType slabType } } [Object.entries YConfig] : do
create-glyph "Y.\(suffix)" : glyph-proc

View file

@ -54,14 +54,20 @@ glyph-block Letter-Latin-X : begin
define [XMotionSerifs top] : glyph-proc
include : tagged 'serifLT' : LeftwardTopSerif SB top SideJut
create-glyph 'X.straight' : glyph-proc
create-glyph 'X.straightSerifless' : glyph-proc
include : MarkSet.capital
include : WithAIHSerifsMask CAP 0 SB RightSB : UpperXBase true
include : NeedSlab SLAB : HSerifs CAP
create-glyph 'X.curly' : glyph-proc
create-glyph 'X.curlySerifless' : glyph-proc
include : MarkSet.capital
include : WithAIHSerifsMask CAP 0 SB RightSB : UpperXBase false
include : NeedSlab SLAB : HSerifs CAP
create-glyph 'X.straightSerifed' : glyph-proc
include : MarkSet.capital
include : WithAIHSerifsMask CAP 0 SB RightSB : UpperXBase true
include : HSerifs CAP
create-glyph 'X.curlySerifed' : glyph-proc
include : MarkSet.capital
include : WithAIHSerifsMask CAP 0 SB RightSB : UpperXBase false
include : HSerifs CAP
create-glyph 'X.straightMotionSerifed' : glyph-proc
include : MarkSet.capital
include : UpperXBase true
@ -78,14 +84,20 @@ glyph-block Letter-Latin-X : begin
XStrand fStraight SLAB SB 0 RightSB XH turn 0.4 tension
XStrand fStraight SLAB SB XH RightSB 0 turn 0.4 tension
create-glyph 'x.straight' : glyph-proc
create-glyph 'x.straightSerifless' : glyph-proc
include : MarkSet.e
include : WithAIHSerifsMask XH 0 SB RightSB : LowerXBase true
include : NeedSlab SLAB : HSerifs XH
create-glyph 'x.curly' : glyph-proc
create-glyph 'x.curlySerifless' : glyph-proc
include : MarkSet.e
include : WithAIHSerifsMask XH 0 SB RightSB : LowerXBase false
include : NeedSlab SLAB : HSerifs XH
create-glyph 'x.straightSerifed' : glyph-proc
include : MarkSet.e
include : WithAIHSerifsMask XH 0 SB RightSB : LowerXBase true
include : HSerifs XH
create-glyph 'x.curlySerifed' : glyph-proc
include : MarkSet.e
include : WithAIHSerifsMask XH 0 SB RightSB : LowerXBase false
include : HSerifs XH
create-glyph 'x.straightMotionSerifed' : glyph-proc
include : MarkSet.e
include : LowerXBase true
@ -94,46 +106,59 @@ glyph-block Letter-Latin-X : begin
include : MarkSet.e
include : LowerXBase false
include : XMotionSerifs XH
define [XCursiveHalfShape fFlatEnd] : begin
local sma : SmoothAOf (Smooth * 0.8) (Width / 2)
local smb : SmoothBOf (Smooth * 0.8) (Width / 2)
define kThin 0.550
define swEnd : AdviceStroke 3
define swMid : AdviceStroke 3.125
define xCenterRight : Middle + HVContrast * swMid / 2
define xCenterLeft : Middle - HVContrast * swMid / 2
define xTurn : mix (RightSB - swEnd * HVContrast) xCenterRight 0.5
define hook1Depth : Hook + Stroke * 0.125
define hook1StraightDepth : Math.min
hook1Depth - swEnd * 1.125
Math.max 1 : hook1Depth / 5 - swEnd / 4
define fineMid : swMid * kThin
define rIn : Math.max (0.2 * (RightSB - SB) - 0.7 * Stroke * HVContrast) [AdviceStroke 16]
define flatHookDepth : 0.7 * (RightSB - SB) - swEnd - 1.5 * rIn
return : union
dispiro
curl (RightSB - OX) (XH - hook1Depth) [widths.lhs.heading swEnd Upward]
flat (RightSB - OX) (XH - hook1Depth + hook1StraightDepth) [heading Upward]
arcvh 16
ShoulderMidKnotLhsRev (xTurn) (XH - O) fineMid swEnd (-1) (-1)
archv 16
flat (xCenterRight - HVContrast * fineMid) (XH - sma) [widths.lhs fineMid]
curl (xCenterRight - HVContrast * fineMid) (XH / 2 + O)
if fFlatEnd
: then : dispiro
flat (xCenterRight - 0.5 * HVContrast * fineMid) (XH / 2 - O) [widths.center fineMid]
curl (xCenterRight - 0.5 * HVContrast * fineMid) smb
arcvh 16
flat [mix xCenterRight RightSB 0.5] HalfStroke [widths.center.heading Stroke Rightward]
curl RightSB HalfStroke [heading Rightward]
: else : dispiro
flat (xCenterRight - 0.5 * HVContrast * fineMid) (XH / 2 - O) [widths.center fineMid]
curl (xCenterRight - 0.5 * HVContrast * fineMid) [Math.min smb (swMid + rIn)]
arcvh 16
DiagonalTailF 1 [DivFrame 1] (xCenterRight - 0.5 * HVContrast * Stroke + TanSlope * rIn) 0 rIn 50 flatHookDepth Stroke
create-glyph 'x.cursive' : glyph-proc
include : MarkSet.e
define [halfShape] : begin
local sma : SmoothAOf (Smooth * 0.8) (Width / 2)
local smb : SmoothBOf (Smooth * 0.8) (Width / 2)
define kThin 0.550
define swEnd : AdviceStroke 3
define swMid : AdviceStroke 3.125
define xCenterRight : Middle + HVContrast * swMid / 2
define xCenterLeft : Middle - HVContrast * swMid / 2
define xTurn : mix (RightSB - swEnd * HVContrast) xCenterRight 0.5
define hook1Depth : Hook + Stroke * 0.125
define hook1StraightDepth : Math.min
hook1Depth - swEnd * 1.125
Math.max 1 : hook1Depth / 5 - swEnd / 4
define fineMid : swMid * kThin
define rIn : Math.max (0.2 * (RightSB - SB) - 0.7 * Stroke * HVContrast) [AdviceStroke 16]
define flatHookDepth : 0.7 * (RightSB - SB) - swEnd - 1.5 * rIn
return : union
dispiro
curl (RightSB - OX) (XH - hook1Depth) [widths.lhs.heading swEnd Upward]
flat (RightSB - OX) (XH - hook1Depth + hook1StraightDepth) [heading Upward]
arcvh 16
ShoulderMidKnotLhsRev (xTurn) (XH - O) fineMid swEnd (-1) (-1)
archv 16
flat (xCenterRight - HVContrast * fineMid) (XH - sma) [widths.lhs fineMid]
curl (xCenterRight - HVContrast * fineMid) (XH / 2 + O)
dispiro
flat (xCenterRight - 0.5 * HVContrast * fineMid) (XH / 2 - O) [widths.center fineMid]
curl (xCenterRight - 0.5 * HVContrast * fineMid) [Math.min smb (swMid + rIn)]
arcvh 16
DiagonalTailF 1 [DivFrame 1] (xCenterRight - 0.5 * HVContrast * Stroke + TanSlope * rIn) 0 rIn 50 flatHookDepth Stroke
include : halfShape
include : XCursiveHalfShape
include : FlipAround Middle (XH / 2)
include : halfShape
include : XCursiveHalfShape
create-glyph 'x.cursiveCyrlHaDescenderBase' : glyph-proc
include : MarkSet.e
include : XCursiveHalfShape
include : FlipAround Middle (XH / 2)
include : XCursiveHalfShape true
define [ChiBase fStraight] : union
XStrand fStraight false SB Descender RightSB XH 0.05 0.4 0.11
@ -147,7 +172,8 @@ glyph-block Letter-Latin-X : begin
alias 'cyrl/Ha' 0x425 'X'
select-variant 'x' 'x'
select-variant 'cyrl/ha' 0x445 (shapeFrom -- 'x')
select-variant 'xCyrlHaDescenderBase' nothing (shapeFrom -- 'x')
select-variant 'cyrl/ha' 0x445 (shapeFrom -- 'x')
select-variant 'grek/chi' 0x3C7
alias 'latinchi' 0xAB53 'grek/chi'
@ -156,7 +182,7 @@ glyph-block Letter-Latin-X : begin
include [refer-glyph src] AS_BASE ALSO_METRICS
include : CyrDescender RightSB (connex -- 0.5)
with-related-glyphs 'cyrl/hadescender' 0x4B3 'cyrl/ha' : lambda [src sel] : glyph-proc
with-related-glyphs 'cyrl/hadescender' 0x4B3 'xCyrlHaDescenderBase' : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
include : CyrDescender RightSB (connex -- 0.5)

View file

@ -13,10 +13,11 @@ glyph-block Letter-Latin-Z : begin
glyph-block-import Letter-Blackboard : BBS BBD
glyph-block-import Letter-Latin-X : XStrand
define [ZSerifless top] : glyph-proc
define [ZStdSerifs top] : glyph-proc
if SLAB : begin
include : tagged 'serifLT' : DownwardLeftSerif SB top VJut
include : tagged 'serifRB' : UpwardRightSerif RightSB 0 VJut
include : tagged 'serifLT' : DownwardLeftSerif SB top VJut
include : tagged 'serifRB' : UpwardRightSerif RightSB 0 VJut
define [ZMotionSerifsB top] : glyph-proc
include : tagged 'serifRB' : UpwardRightSerif RightSB 0 VJut
@ -25,8 +26,6 @@ glyph-block Letter-Latin-Z : begin
include : tagged 'serifLT' : DownwardLeftSerif SB top VJut
define [ZBaseShape] : glyph-proc
include : MarkSet.capital
local cor : 1.15 * HVContrast
include : tagged 'strokeTop' : HBarTop SB RightSB CAP
include : spiro-outline
@ -37,49 +36,14 @@ glyph-block Letter-Latin-Z : begin
include : tagged 'strokeBottom' : HBarBottom SB RightSB 0
define [ZCurlyShape] : glyph-proc
include : MarkSet.capital
include : tagged 'strokeTop' : HBarTop SB (RightSB - Stroke * HVContrast) CAP
include : XStrand false SLAB SB 0 RightSB CAP 0.125 0.4 0.32
include : tagged 'strokeBottom' : HBarBottom (SB + Stroke * HVContrast) RightSB 0
create-glyph 'Z.standard' : glyph-proc
include : ZBaseShape
include : ZStdSerifs CAP
create-glyph 'Z.withHorizontalCrossBar' : glyph-proc
include : ZBaseShape
include : ZStdSerifs CAP
include : refer-glyph 'barOver'
create-glyph 'Z.withCrossBar' : glyph-proc
include : ZBaseShape
include : ZStdSerifs CAP
include : refer-glyph 'antiSlashOver'
create-glyph 'Z.motionSerifed' : glyph-proc
include : ZBaseShape
include : ZMotionSerifsB CAP
create-glyph 'Z.topMotionSerifed' : glyph-proc
include : ZBaseShape
include : ZMotionSerifsT CAP
create-glyph 'Z.curly' : glyph-proc
include : ZCurlyShape
include : ZStdSerifs CAP
create-glyph 'Z.curlyWithHorizontalCrossBar' : glyph-proc
include : ZCurlyShape
include : ZStdSerifs CAP
include : refer-glyph 'barOver'
create-glyph 'Z.curlyWithCrossBar' : glyph-proc
include : ZCurlyShape
include : ZStdSerifs CAP
include : refer-glyph 'antiSlashOver'
create-glyph 'Z.curlyMotionSerifed' : glyph-proc
include : ZCurlyShape
include : ZMotionSerifsB CAP
create-glyph 'Z.curlyTopMotionSerifed' : glyph-proc
include : ZCurlyShape
include : ZMotionSerifsT CAP
define [HBarOver] : refer-glyph 'barOver'
define [DBarOver] : refer-glyph 'antiSlashOver'
define [SmallZBaseShape] : glyph-proc
include : MarkSet.e
local cor : 1.2 * HVContrast
include : tagged 'strokeTop' : HBarTop SB RightSB XH
include : spiro-outline
@ -90,14 +54,11 @@ glyph-block Letter-Latin-Z : begin
include : tagged 'strokeBottom' : HBarBottom SB RightSB 0
define [SmallZCurlyShape] : glyph-proc
include : MarkSet.e
include : tagged 'strokeTop' : HBarTop SB (RightSB - Stroke * HVContrast) XH
include : XStrand false SLAB SB 0 RightSB XH 0.125 0.4 0.36
include : tagged 'strokeBottom' : HBarBottom (SB + Stroke * HVContrast) RightSB 0
define [SmallZCursiveShape] : glyph-proc
include : MarkSet.e
define hookTerminalWidth : AdviceStroke 3.5
define xDiagWidth : 1 * Stroke
define yFootHeight : Math.max (0.15 * XH) (Stroke * 0.625)
@ -151,48 +112,47 @@ glyph-block Letter-Latin-Z : begin
flat [mix (RightSB - xHookDepth) SB kBot] (kBot * yTailDepth)
curl SB (yTailDepth)
create-glyph 'z.standard' : glyph-proc
include : SmallZBaseShape
include : ZStdSerifs XH
create-glyph 'z.withHorizontalCrossBar' : glyph-proc
include : SmallZBaseShape
include : ZStdSerifs XH
include : refer-glyph 'barOver'
create-glyph 'z.withCrossBar' : glyph-proc
include : SmallZBaseShape
include : ZStdSerifs XH
include : refer-glyph 'antiSlashOver'
create-glyph 'z.motionSerifed' : glyph-proc
include : SmallZBaseShape
include : ZMotionSerifsB XH
create-glyph 'z.topMotionSerifed' : glyph-proc
include : SmallZBaseShape
include : ZMotionSerifsT XH
create-glyph 'z.curly' : glyph-proc
include : SmallZCurlyShape
include : ZStdSerifs XH
create-glyph 'z.curlyWithHorizontalCrossBar' : glyph-proc
include : SmallZCurlyShape
include : ZStdSerifs XH
include : refer-glyph 'barOver'
create-glyph 'z.curlyWithCrossBar' : glyph-proc
include : SmallZCurlyShape
include : ZStdSerifs XH
include : refer-glyph 'antiSlashOver'
create-glyph 'z.curlyMotionSerifed' : glyph-proc
include : SmallZCurlyShape
include : ZMotionSerifsB XH
create-glyph 'z.curlyTopMotionSerifed' : glyph-proc
include : SmallZCurlyShape
include : ZMotionSerifsT XH
create-glyph 'z.cursive' : glyph-proc
include : SmallZCursiveShape
create-glyph 'z.cursiveWithHorizontalCrossBar' : glyph-proc
include : SmallZCursiveShape
include : refer-glyph 'barOver'
create-glyph 'z.cursiveWithCrossBar' : glyph-proc
include : SmallZCursiveShape
include : refer-glyph 'antiSlashOver'
define ZConfig : object
straightSerifless { ZBaseShape SmallZBaseShape ZSerifless null }
straightSeriflessWithCrossBar { ZBaseShape SmallZBaseShape ZSerifless DBarOver }
straightSeriflessWithHorizontalCrossBar { ZBaseShape SmallZBaseShape ZSerifless HBarOver }
curlySerifless { ZCurlyShape SmallZCurlyShape ZSerifless null }
curlySeriflessWithCrossBar { ZCurlyShape SmallZCurlyShape ZSerifless DBarOver }
curlySeriflessWithHorizontalCrossBar { ZCurlyShape SmallZCurlyShape ZSerifless HBarOver }
straightSerifed { ZBaseShape SmallZBaseShape ZStdSerifs null }
straightSerifedWithCrossBar { ZBaseShape SmallZBaseShape ZStdSerifs DBarOver }
straightSerifedWithHorizontalCrossBar { ZBaseShape SmallZBaseShape ZStdSerifs HBarOver }
curlySerifed { ZCurlyShape SmallZCurlyShape ZStdSerifs null }
curlySerifedWithCrossBar { ZCurlyShape SmallZCurlyShape ZStdSerifs DBarOver }
curlySerifedWithHorizontalCrossBar { ZCurlyShape SmallZCurlyShape ZStdSerifs HBarOver }
straightBottomSerifed { ZBaseShape SmallZBaseShape ZMotionSerifsB null }
straightBottomSerifedWithCrossbar { ZBaseShape SmallZBaseShape ZMotionSerifsB DBarOver }
straightBottomSerifedWithHorizontalCrossBar { ZBaseShape SmallZBaseShape ZMotionSerifsB HBarOver }
curlyBottomSerifedWithCrossbar { ZCurlyShape SmallZCurlyShape ZMotionSerifsB null }
curlyBottomSerifedWithHorizontalCrossBar { ZCurlyShape SmallZCurlyShape ZMotionSerifsB DBarOver }
curlyBottomSerifed { ZCurlyShape SmallZCurlyShape ZMotionSerifsB HBarOver }
straightTopSerifed { ZBaseShape SmallZBaseShape ZMotionSerifsT null }
straightTopSerifedWithCrossbar { ZBaseShape SmallZBaseShape ZMotionSerifsT DBarOver }
straightTopSerifedWithHorizontalCrossBar { ZBaseShape SmallZBaseShape ZMotionSerifsT HBarOver }
curlyTopSerifed { ZCurlyShape SmallZCurlyShape ZMotionSerifsT null }
curlyTopSerifedWithCrossbar { ZCurlyShape SmallZCurlyShape ZMotionSerifsT DBarOver }
curlyTopSerifedWithHorizontalCrossBar { ZCurlyShape SmallZCurlyShape ZMotionSerifsT HBarOver }
cursive { null SmallZCursiveShape ZSerifless null }
cursiveWithCrossBar { null SmallZCursiveShape ZSerifless DBarOver }
cursiveWithHorizontalCrossBar { null SmallZCursiveShape ZSerifless HBarOver }
foreach { suffix { capital small serifs slash } } [Object.entries ZConfig] : do
if capital : create-glyph "Z.\(suffix)" : glyph-proc
include : MarkSet.capital
include : capital
if serifs : include : serifs CAP
if slash : include : slash CAP
if small : create-glyph "z.\(suffix)" : glyph-proc
include : MarkSet.e
include : small
if serifs : include : serifs XH
if slash : include : slash XH
select-variant 'Z' 'Z'
select-variant 'z' 'z'

View file

@ -143,14 +143,26 @@ class Composite {
this.upright = cfg.upright || cfg["upright-oblique"];
this.oblique = cfg.oblique || cfg["upright-oblique"];
this.italic = cfg.italic;
const slabOverrideCfg = cfg["slab-override"] || {};
this.slabOverride = {
design: slabOverrideCfg.design,
override: slabOverrideCfg.upright || slabOverrideCfg["upright-oblique"],
oblique: slabOverrideCfg.oblique || slabOverrideCfg["upright-oblique"],
italic: slabOverrideCfg.italic
};
}
decompose(para, selTree) {
const ans = [];
const cfg = Object.assign(
{},
this.design,
para.isItalic ? this.italic : para.isOblique ? this.oblique : this.upright
this.decomposeSlabOverride(this.design, this.slabOverride.design, para),
para.isItalic
? this.decomposeSlabOverride(this.italic, this.slabOverride.italic, para)
: para.isOblique
? this.decomposeSlabOverride(this.oblique, this.slabOverride.oblique, para)
: this.decomposeSlabOverride(this.upright, this.slabOverride.upright, para)
);
for (const [k, v] of Object.entries(cfg)) {
const pv = selTree.get(k, v);
@ -159,6 +171,10 @@ class Composite {
}
return ans;
}
decomposeSlabOverride(d, sd, para) {
if (para.slab) return Object.assign({}, d, sd);
else return d;
}
resolve(para, selTree, catalog, vs) {
if (this.inherits) {
if (!catalog.has(this.inherits)) {

File diff suppressed because it is too large Load diff

View file

@ -16,13 +16,9 @@ module.exports = async function () {
const primes = getCvData(varDatParsed);
const composites = getSsData(varDatParsed);
const defaults = getDefaultCompData(varDatParsed);
const defaults = getCompWithLens(varDatParsed, null, x => x.composition);
return {
primes,
composites,
defaults: defaults
};
return { primes, composites, defaults };
};
function getCvData(parsed) {
@ -34,9 +30,18 @@ function getCvData(parsed) {
return Array.from(samplerGroups.values());
}
const UPRIGHT = {};
const OBLIQUE = { isOblique: true };
const ITALIC = { isItalic: true };
const mockPara = {
sans: {
upright: {},
oblique: { isOblique: true },
italic: { isItalic: true }
},
slab: {
upright: { slab: 2 },
oblique: { slab: 2, isOblique: true },
italic: { slab: 2, isItalic: true }
}
};
function getSsData(variants) {
const result = [
@ -45,51 +50,73 @@ function getSsData(variants) {
tag: "off",
rank: 0,
description: "Default",
uprightComposition: {},
italicComposition: {},
obliqueComposition: {},
hotCharSetUpright: [],
hotCharSetItalic: [],
hotCharSetOblique: []
composition: {
sans: { upright: {}, italic: {}, oblique: {} },
slab: { upright: {}, italic: {}, oblique: {} }
},
hotChars: {
sans: { upright: [], italic: [], oblique: [] },
slab: { upright: [], italic: [], oblique: [] }
}
}
];
const hcSansUpright = buildupComposite(variants, UPRIGHT, variants.defaultComposite).hotChars;
const hcSansItalic = buildupComposite(variants, ITALIC, variants.defaultComposite).hotChars;
const hcSansOblique = buildupComposite(variants, OBLIQUE, variants.defaultComposite).hotChars;
const hcDefault = getCompWithLens(variants, null, x => x.hotChars);
for (const [key, composite] of variants.composites) {
if (!composite.tag) continue;
const upright = buildupComposite(variants, UPRIGHT, composite);
const oblique = buildupComposite(variants, OBLIQUE, composite);
const italic = buildupComposite(variants, ITALIC, composite);
result.push({
key,
tag: composite.tag,
rank: 1,
description: composite.description,
uprightComposition: upright.composition,
italicComposition: italic.composition,
obliqueComposition: oblique.composition,
hotCharSetUpright: uniqueHotChars(hcSansUpright, upright.hotChars),
hotCharSetItalic: uniqueHotChars(hcSansItalic, italic.hotChars),
hotCharSetOblique: uniqueHotChars(hcSansOblique, oblique.hotChars)
composition: getCompWithLens(variants, composite, x => x.composition),
hotChars: getCompWithLens(variants, composite, (x, style, slope) =>
uniqueHotChars(x.hotChars, hcDefault[style][slope])
)
});
}
return result;
}
function getDefaultCompData(variants) {
function getCompWithLens(variants, c, lens) {
const cDefault = variants.defaultComposite;
const cSlab = variants.composites.get("slab");
return {
sansUpright: buildupComposite(variants, UPRIGHT, cDefault).composition,
sansItalic: buildupComposite(variants, ITALIC, cDefault).composition,
sansOblique: buildupComposite(variants, OBLIQUE, cDefault).composition,
slabUpright: buildupComposite(variants, UPRIGHT, cDefault, cSlab).composition,
slabItalic: buildupComposite(variants, ITALIC, cDefault, cSlab).composition,
slabOblique: buildupComposite(variants, OBLIQUE, cDefault, cSlab).composition
sans: {
upright: lens(
buildupComposite(variants, mockPara.sans.upright, cDefault, c),
"sans",
"upright"
),
italic: lens(
buildupComposite(variants, mockPara.sans.italic, cDefault, c),
"sans",
"italic"
),
oblique: lens(
buildupComposite(variants, mockPara.sans.oblique, cDefault, c),
"sans",
"oblique"
)
},
slab: {
upright: lens(
buildupComposite(variants, mockPara.slab.upright, cDefault, cSlab, c),
"slab",
"upright"
),
italic: lens(
buildupComposite(variants, mockPara.slab.italic, cDefault, cSlab, c),
"slab",
"italic"
),
oblique: lens(
buildupComposite(variants, mockPara.slab.oblique, cDefault, cSlab, c),
"slab",
"oblique"
)
}
};
}
@ -105,6 +132,7 @@ function buildupComposite(variants, para, ...composites) {
let compositionMap = new Map();
let hotChars = new Map();
for (const composite of composites) {
if (!composite) continue;
for (const [prime, variant] of composite.decompose(para, variants.selectorTree)) {
if (!prime.sampler) continue;
const key = getSelectorKey(prime, variant);

View file

@ -58,7 +58,7 @@ async function main() {
applyFeature: `'${ss.tag}' ${ss.rank}`,
name: `stylistic-set-u-${ss.tag}-${ss.rank}`,
applyCallback: `cbAmendStylisticSetContents`,
applyCallbackArgs: { hotChars: ss.hotCharSetUpright }
applyCallbackArgs: { hotChars: ss.hotChars.sans.upright }
});
readmeSnapshotTasks.push({
el: "#packaging-sampler",
@ -66,7 +66,7 @@ async function main() {
applyFeature: `'${ss.tag}' ${ss.rank}`,
name: `stylistic-set-i-${ss.tag}-${ss.rank}`,
applyCallback: `cbAmendStylisticSetContents`,
applyCallbackArgs: { hotChars: ss.hotCharSetItalic }
applyCallbackArgs: { hotChars: ss.hotChars.sans.italic }
});
}
await fs.writeJson(