Make a specialized "tri-serif" variant for "A" (#925).

This commit is contained in:
be5invis 2021-03-27 03:34:44 -07:00
parent 274358f97d
commit e8121d4cc7
16 changed files with 81 additions and 61 deletions

View file

@ -2,4 +2,4 @@
* Add central serif for Cyrillic Zhe, Big Yus and Small Yus (#922).
* Reduce serifs of italic Cyrillic Ka, El, Em, En, Che, Yer, and Yu (#922).
* Add rounded and cursive shape for Yer, Yeri, Yery, Nje and Lje (#922).
* Add top serif to slab `A` (#925).
* Add a tri-serif variant to `A` (#925).

View file

@ -355,40 +355,42 @@ glyph-block CommonShapes : begin
define sideSerifK 0.5
define [JutIn left right] : Math.min Jut (HalfStroke + [Math.max (Stroke * TanSlope) ((right - left - Stroke * 2 * HVContrast) * 0.4)])
define [AIVSerifs top _left _right] : glyph-proc
define [NeedSlab level p] : if level p [glyph-proc]
define [VSerifs top _left _right] : glyph-proc
local left : fallback _left SB
local right : fallback _right RightSB
local jutIn : JutIn left right
if SLAB : begin
include : tagged 'serifLT' : CenterTopSerifAsymmetric (left + Stroke * sideSerifK * HVContrast) top Jut jutIn
include : tagged 'serifRT' : CenterTopSerifAsymmetric (right - Stroke * sideSerifK * HVContrast) top jutIn Jut
define [AIHSerifs top _left _right] : glyph-proc
include : tagged 'serifLT' : CenterTopSerifAsymmetric (left + Stroke * sideSerifK * HVContrast) top Jut jutIn
include : tagged 'serifRT' : CenterTopSerifAsymmetric (right - Stroke * sideSerifK * HVContrast) top jutIn Jut
define [HSerifs top _left _right] : glyph-proc
local left : fallback _left SB
local right : fallback _right RightSB
local jutIn : JutIn left right
if SLAB : begin
include : AIVSerifs top _left _right
include : tagged 'serifLB'
CenterBottomSerifAsymmetric (left + Stroke * sideSerifK * HVContrast) 0 Jut jutIn
include : tagged 'serifRB'
CenterBottomSerifAsymmetric (right - Stroke * sideSerifK * HVContrast) 0 jutIn Jut
define [AICyrISerifs top _left _right] : glyph-proc
include : VSerifs top _left _right
include : tagged 'serifLB'
CenterBottomSerifAsymmetric (left + Stroke * sideSerifK * HVContrast) 0 Jut jutIn
include : tagged 'serifRB'
CenterBottomSerifAsymmetric (right - Stroke * sideSerifK * HVContrast) 0 jutIn Jut
define [CyrISerifs top _left _right] : glyph-proc
local left : fallback _left SB
local right : fallback _right RightSB
if SLAB : begin
include : LeftwardBottomSerif left 0 SideJut
include : RightwardTopSerif right top SideJut
include : CenterTopSerif (left + Stroke * sideSerifK * HVContrast) top Jut
include : tagged 'serifRB'
CenterBottomSerif (right - Stroke * sideSerifK * HVContrast) 0 Jut
define [AIMSerifs top _left _right] : glyph-proc
include : LeftwardBottomSerif left 0 SideJut
include : RightwardTopSerif right top SideJut
include : CenterTopSerif (left + Stroke * sideSerifK * HVContrast) top Jut
include : tagged 'serifRB'
CenterBottomSerif (right - Stroke * sideSerifK * HVContrast) 0 Jut
define [MSerifs top _left _right] : glyph-proc
local left : fallback _left SB
local right : fallback _right RightSB
if SLAB : begin
include : LeftwardTopSerif (left + Stroke * (sideSerifK - 0.5) * HVContrast) top SideJut
include : RightwardTopSerif (right - Stroke * (sideSerifK - 0.5) * HVContrast) top SideJut
include : CenterBottomSerif (left + Stroke * sideSerifK * HVContrast) 0 Jut
include : CenterBottomSerif (right - Stroke * sideSerifK * HVContrast) 0 Jut
include : LeftwardTopSerif (left + Stroke * (sideSerifK - 0.5) * HVContrast) top SideJut
include : RightwardTopSerif (right - Stroke * (sideSerifK - 0.5) * HVContrast) top SideJut
include : CenterBottomSerif (left + Stroke * sideSerifK * HVContrast) 0 Jut
include : CenterBottomSerif (right - Stroke * sideSerifK * HVContrast) 0 Jut
define [WithAIHSerifsMask top bottom left right s] : if [not SLAB] s : begin
local leftCenter : left + HalfStroke * HVContrast
local rightCenter : right - HalfStroke * HVContrast
@ -671,4 +673,4 @@ glyph-block CommonShapes : begin
corner [mix x1 x2 (-k)] [mix y1 y2 (-k)]
corner [mix x1 x2 (1+k)] [mix y1 y2 (1+k)]
glyph-block-export Rect SquareAt Ring RingAt DotAt RingStroke RingStrokeAt DotStrokeAt CircleRing CircleRingAt CircleDotAt OShape OShapeOutline OBarLeftShape OBarRightShape LeftwardTopSerif LeftwardBottomSerif RightwardTopSerif RightwardBottomSerif CenterTopSerif CenterBottomSerif DownwardRightSerif UpwardRightSerif DownwardLeftSerif UpwardLeftSerif AIVSerifs AIHSerifs AICyrISerifs AIMSerifs HBar HBarTop HBarBottom HOverlayBar VBar VBarLeft VBarRight VerticalHook LegShape LeftHook HooktopLeftBar FlatSlashShape hookstart hookend CyrDescender CyrLeftDescender FlipAround ScaleAround Realign ForceUpright DiagCor CreateWaveShape NameUni PointingTo WithAIHSerifsMask WithTransform clear-anchors OBarLeftToothlessShape OBarLeftRoundedShape OBarRightToothlessShape OBarRightRoundedShape AsRadical ExtLineCenter DiagCorDs HCrossBar VERY-FAR MaskAbove MaskBelow MaskLeft MaskRight
glyph-block-export Rect SquareAt Ring RingAt DotAt RingStroke RingStrokeAt DotStrokeAt CircleRing CircleRingAt CircleDotAt OShape OShapeOutline OBarLeftShape OBarRightShape LeftwardTopSerif LeftwardBottomSerif RightwardTopSerif RightwardBottomSerif CenterTopSerif CenterBottomSerif DownwardRightSerif UpwardRightSerif DownwardLeftSerif UpwardLeftSerif NeedSlab VSerifs HSerifs CyrISerifs MSerifs HBar HBarTop HBarBottom HOverlayBar VBar VBarLeft VBarRight VerticalHook LegShape LeftHook HooktopLeftBar FlatSlashShape hookstart hookend CyrDescender CyrLeftDescender FlipAround ScaleAround Realign ForceUpright DiagCor CreateWaveShape NameUni PointingTo WithAIHSerifsMask WithTransform clear-anchors OBarLeftToothlessShape OBarLeftRoundedShape OBarRightToothlessShape OBarRightRoundedShape AsRadical ExtLineCenter DiagCorDs HCrossBar VERY-FAR MaskAbove MaskBelow MaskLeft MaskRight

View file

@ -16,7 +16,7 @@ glyph-block Letter-Cyrillic-Dzhe : begin
include : VBarRight RightSB 0 top
include : VBar Middle Descender Stroke
if SLAB : begin
include : AIVSerifs top
include : VSerifs top
include : LeftwardBottomSerif SB 0 SideJut
include : RightwardBottomSerif RightSB 0 SideJut

View file

@ -26,7 +26,7 @@ glyph-block Letter-Cyrillic-I : begin
include : dispiro
flat (RightSB - halftopstroke) top [widths.heading 0 topstroke Downward]
curl (SB + halftopstroke) 0 [widths.heading topstroke 0 Downward]
include : AICyrISerifs top
include : NeedSlab SLAB : CyrISerifs top
create-glyph 'cyrl/I' 0x418 : glyph-proc
include : MarkSet.capital

View file

@ -16,7 +16,7 @@ glyph-block Letter-Cyrillic-Tse : begin
include : VBarRight RightSB 0 top
include : CyrDescender RightSB (shift -- 0.05)
if SLAB : begin
include : AIVSerifs top
include : VSerifs top
include : LeftwardBottomSerif SB 0 SideJut
include : RightwardBottomSerif RightSB 0 SideJut

View file

@ -158,7 +158,7 @@ glyph-block Letter-Latin-Lower-Y : begin
SmallYStrokeSplitMask top bottom false (-1)
Rect (bottom + HalfStroke) (bottom - top) 0 Width
if doSlabTop : include : AIVSerifs top
if doSlabTop : include : NeedSlab SLAB : VSerifs top
if doSlabBottom : include : yBaseSerif top bottom
if doSlabMotion : include : LeftwardTopSerif SB top SideJut
@ -188,7 +188,7 @@ glyph-block Letter-Latin-Lower-Y : begin
SmallYStrokeSplitMask top bottom true (-1)
if doSlabTop : begin
include : AIVSerifs top
include : NeedSlab SLAB : VSerifs top
eject-contour 'serifRT'
if doSlabBottom : include : yBaseSerif top bottom

View file

@ -119,13 +119,15 @@ glyph-block Letter-Latin-U : begin
define [SmallUMotionTailedSlabs top] : glyph-proc
include : UTopLeftSerif top
define [ToothlessSlabs top] : NeedSlab SLAB : VSerifs top
define CapitalUConfig : object
toothed { UToothed SmallUSlabs }
tailed { UTailed SmallUTailedSlabs }
motionSerifed { UToothed SmallUMotionSlabs }
motionSerifedTailed { UTailed SmallUMotionTailedSlabs }
toothlessCorner { UToothlessCorner AIVSerifs }
toothlessRounded { UToothlessRounded AIVSerifs }
toothlessCorner { UToothlessCorner ToothlessSlabs }
toothlessRounded { UToothlessRounded ToothlessSlabs }
toothlessCornerBilateralMotionSerifed { UToothlessCorner CapitalUMotionToothlessSlabs }
toothlessRoundedBilateralMotionSerifed { UToothlessRounded CapitalUMotionToothlessSlabs }
toothlessCornerUnilateralMotionSerifed { UToothlessCorner SmallUMotionTailedSlabs }

View file

@ -15,6 +15,7 @@ glyph-block Letter-Latin-Upper-A : begin
define SLAB-AUTO 1
define SLAB-MOTION 2
define SLAB-TRI 3
define [AMaskShape df top sw barStraight] : new-glyph : glyph-proc
include : VShapeOutline df top sw barStraight
@ -27,10 +28,12 @@ glyph-block Letter-Latin-Upper-A : begin
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 }
define [ASerifs df top kind] : glyph-proc : match kind
[Just SLAB-AUTO] : begin
if SLAB : include : LeftwardTopSerif df.middle top (MidJutSide + Stroke * HVContrast * 0.25)
[Just SLAB-TRI] : begin
include : LeftwardTopSerif df.middle top (MidJutSide + Stroke * HVContrast * 0.25)
[Just SLAB-MOTION] : begin
include : LeftwardTopSerif Middle top [mix MidJutSide LongJut 0.5]

View file

@ -20,11 +20,12 @@ glyph-block Letter-Latin-Upper-H : begin
include : tagged 'strokeR' : VBarRight RightSB 0 top
include : HBar (SB - O) (RightSB + O) (top * HBarPos)
include : match slabType
[Just SLAB-AUTO] : AIHSerifs top
[Just SLAB-AUTO] : NeedSlab SLAB : HSerifs top
[Just SLAB-MOTION] : tagged 'serifLT' : LeftwardTopSerif SB top SideJut
[Just SLAB-SMALL-CYRILLIC] : if [not para.isItalic] [AIHSerifs top] : glyph-proc
if SLAB : include : tagged 'serifLT' : LeftwardTopSerif SB top SideJut
if SLAB : include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
[Just SLAB-SMALL-CYRILLIC] : if [not para.isItalic] [NeedSlab SLAB : HSerifs top]
NeedSlab SLAB : composite-proc
tagged 'serifLT' : LeftwardTopSerif SB top SideJut
tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
create-glyph 'H.standard' : glyph-proc
include : MarkSet.capital
@ -97,10 +98,10 @@ glyph-block Letter-Latin-Upper-H : begin
if SLAB : begin
include : DownwardRightSerif barRight top VJut (MVertStroke / HVContrast)
include : match slabType
[Just SLAB-AUTO] : AIHSerifs top SB right
[Just SLAB-AUTO] : HSerifs top SB right
[Just SLAB-MOTION] : tagged 'serifLT' : LeftwardTopSerif SB top SideJut
[Just SLAB-SMALL-CYRILLIC] : if [not para.isItalic]
then : AIHSerifs top SB right
then : HSerifs top SB right
else : glyph-proc
if SLAB : include : tagged 'serifLT' : LeftwardTopSerif SB top SideJut
if SLAB : include : tagged 'serifRB' : RightwardBottomSerif right 0 SideJut

View file

@ -41,14 +41,14 @@ glyph-block Letter-Latin-Upper-M : begin
curl df.middle middleY [widths.heading (swSideTop / 2) (swSideTop / 2) Downward]
include : match slabType
[Just SLAB-AUTO] : AIMSerifs top df.leftSB df.rightSB
[Just SLAB-AUTO] : NeedSlab SLAB : MSerifs top df.leftSB df.rightSB
[Just SLAB-MOTION] : tagged 'serifLT' : LeftwardTopSerif df.leftSB top SideJut
[Just SLAB-SMALL-CYRILLIC] : if [not para.isItalic]
AIMSerifs top df.leftSB df.rightSB
glyph-proc
if SLAB : include : tagged 'serifLT' : LeftwardTopSerif df.leftSB top SideJut
if SLAB : include : tagged 'serifLB' : LeftwardBottomSerif df.leftSB 0 SideJut
if SLAB : include : tagged 'serifRB' : RightwardBottomSerif df.rightSB 0 SideJut
NeedSlab SLAB : MSerifs top df.leftSB df.rightSB
NeedSlab SLAB : composite-proc
tagged 'serifLT' : LeftwardTopSerif df.leftSB top SideJut
tagged 'serifLB' : LeftwardBottomSerif df.leftSB 0 SideJut
tagged 'serifRB' : RightwardBottomSerif df.rightSB 0 SideJut
define MConfig : object
hanging { FORM-HANGING SLAB-AUTO }

View file

@ -29,7 +29,7 @@ glyph-block Letter-Latin-Upper-Y : begin
match slabType
[Just SLAB-AUTO] : if SLAB : begin
include : AIVSerifs top
include : VSerifs top
include : CenterBottomSerif Middle [fallback bot 0] MidJutSide
[Just SLAB-MOTION] : include : tagged 'serifLT' : LeftwardTopSerif SB top SideJut
[Just SLAB-BASE] : include : CenterBottomSerif Middle [fallback bot 0] MidJutSide

View file

@ -102,7 +102,7 @@ glyph-block Letter-Latin-V : begin
#bottom cap
include : VBottomCapShape df barStraight sw
if slab : include : AIVSerifs top
if slab : include : VSerifs top
define [VCursiveShapeBarPos k] : mix SB RightSB k
define [VCursiveShape] : params [k top [sw Stroke]] : glyph-proc

View file

@ -152,7 +152,7 @@ glyph-block Letter-Latin-W : begin
local oSlabPos : if bodyType (O * 2) 0
include : match slabType
[Just SERIFS-AUTO] : AIVSerifs top df.leftSB df.rightSB
[Just SERIFS-AUTO] : NeedSlab SLAB : VSerifs top df.leftSB df.rightSB
[Just SERIFS-MOTION] : tagged 'serifLT' : LeftwardTopSerif (df.leftSB + oSlabPos) top SideJut
[Just SERIFS-CURSIVE] : glyph-proc
if SLAB : include : tagged 'serifLT' : LeftwardTopSerif (df.leftSB + oSlabPos) top SideJut
@ -160,7 +160,7 @@ glyph-block Letter-Latin-W : begin
if SLAB : include : tagged 'serifLT' : LeftwardTopSerif (df.leftSB + oSlabPos) top SideJut
if SLAB : include : tagged 'serifRT' : RightwardTopSerif (df.rightSB - oSlabPos) top SideJut
[Just SERIFS-ASYMMETRIC] : glyph-proc
include : AIVSerifs top df.leftSB df.rightSB
include : NeedSlab SLAB : VSerifs top df.leftSB df.rightSB
eject-contour 'serifLT'
if SLAB : include : tagged 'serifLT' : LeftwardTopSerif (df.leftSB + oSlabPos) top SideJut

View file

@ -57,11 +57,11 @@ glyph-block Letter-Latin-X : begin
create-glyph 'X.straight' : glyph-proc
include : MarkSet.capital
include : WithAIHSerifsMask CAP 0 SB RightSB : UpperXBase true
include : AIHSerifs CAP
include : NeedSlab SLAB : HSerifs CAP
create-glyph 'X.curly' : glyph-proc
include : MarkSet.capital
include : WithAIHSerifsMask CAP 0 SB RightSB : UpperXBase false
include : AIHSerifs CAP
include : NeedSlab SLAB : HSerifs CAP
create-glyph 'X.straightMotionSerifed' : glyph-proc
include : MarkSet.capital
include : UpperXBase true
@ -81,11 +81,11 @@ glyph-block Letter-Latin-X : begin
create-glyph 'x.straight' : glyph-proc
include : MarkSet.e
include : WithAIHSerifsMask XH 0 SB RightSB : LowerXBase true
include : AIHSerifs XH
include : NeedSlab SLAB : HSerifs XH
create-glyph 'x.curly' : glyph-proc
include : MarkSet.e
include : WithAIHSerifsMask XH 0 SB RightSB : LowerXBase false
include : AIHSerifs XH
include : NeedSlab SLAB : HSerifs XH
create-glyph 'x.straightMotionSerifed' : glyph-proc
include : MarkSet.e
include : LowerXBase true

View file

@ -129,14 +129,14 @@ define-macro glyph-block-import : syntax-rules
define allExports : object
Common-Derivatives `[select-variant orthographic-italic refer-glyph query-glyph
alias turned HDual HCombine VDual VCombine with-related-glyphs glyph-is-needed
alias turned HDual HCombine VDual VCombine with-related-glyphs glyph-is-needed
HalfAdvance TurnMarks]
CommonShapes `[Rect SquareAt Ring RingAt DotAt RingStroke RingStrokeAt DotStrokeAt
CircleRing CircleRingAt CircleDotAt OShape OShapeOutline OBarLeftShape OBarRightShape
LeftwardTopSerif LeftwardBottomSerif RightwardTopSerif RightwardBottomSerif
CenterTopSerif CenterBottomSerif DownwardRightSerif UpwardRightSerif DownwardLeftSerif
UpwardLeftSerif AIVSerifs AIHSerifs AICyrISerifs AIMSerifs HBar
UpwardLeftSerif NeedSlab VSerifs HSerifs CyrISerifs MSerifs HBar
HBarTop HBarBottom HOverlayBar VBar VBarLeft VBarRight VerticalHook LegShape LeftHook
HooktopLeftBar FlatSlashShape hookstart hookend CyrDescender CyrLeftDescender FlipAround
ScaleAround Realign ForceUpright DiagCor CreateWaveShape NameUni PointingTo

View file

@ -5,28 +5,40 @@ tag = "cv01"
[prime.capital-a.variants.straight]
rank = 1
description = "Standard, straight `A`"
description = "Standard, straight `A`, with bottom serifs visible in Slab families"
selector.A = "straight"
selector.AE = "straight"
[prime.capital-a.variants.curly]
rank = 2
description = "Slightly curly `A`, like Iosevka 2.x"
description = "Slightly curly `A`, like Iosevka 2.x, with bottom serifs visible in Slab families"
selector.A = "curly"
selector.AE = "curly"
[prime.capital-a.variants.straight-motion-serifed]
rank = 3
description = "Standard, straight `A`"
description = "Straight `A` with motion serif at top"
selector.A = "straightMotionSerifed"
selector.AE = "straight"
[prime.capital-a.variants.curly-motion-serifed]
rank = 4
description = "Slightly curly `A`, like Iosevka 2.x"
description = "Slightly curly `A`, like Iosevka 2.x, with motion serif at top"
selector.A = "curlyMotionSerifed"
selector.AE = "curly"
[prime.capital-a.variants.straight-tri-serifed]
rank = 5
description = "Straight `A` with serif at both top and bottom"
selector.A = "straightTriSerifed"
selector.AE = "straight"
[prime.capital-a.variants.curly-tri-serifed]
rank = 6
description = "Slightly curly `A`, like Iosevka 2.x, with serif at both top and bottom"
selector.A = "curlyTriSerifed"
selector.AE = "curly"
[prime.capital-b]