Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make scriptCut variants for a/b/g/q selectable via CV. #2634

Merged
merged 2 commits into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changes/32.3.2.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* Add `curved` variant for `¶` (#2045).
* Add `top-cut` variants for `a`/`g`/`q`.
jmcwilliams403 marked this conversation as resolved.
Show resolved Hide resolved
* Add `bottom-cut` variants for `b`.
* Add characters:
- CURVED STEM PARAGRAPH SIGN ORNAMENT (`U+2761`).
38 changes: 30 additions & 8 deletions packages/font-glyphs/src/letter/greek/lower-epsilon.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,21 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
include : eps.Shape
include : bar df top stroke

define [TopCutBody df top bar hook ada adb] : glyph-proc
local eps : SmallEpsilon CLOSED-STEM CLOSED-STEM top 0
blend -- VolBlend
hook -- hook
overflow -- 0
ada2 -- ada
adb2 -- adb
define [object stroke] : eps.Dim
include : eps.Shape
include : bar df (top - stroke / 2) stroke
include : spiro-outline
corner df.rightSB top
corner df.rightSB (top - stroke / 2)
corner (df.rightSB - [HSwToV stroke]) (top - stroke / 2)

define [EarlessCornerBody df top bar hook ada adb] : glyph-proc
local eps : SmallEpsilon SLAB-INWARD CLOSED-STEM top 0
blend -- VolBlend
Expand All @@ -415,16 +430,19 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
singleStoreySerifless { FullBarBody SingleStorey.SeriflessBar }
singleStoreyEarlessCornerSerifless { EarlessCornerBody SingleStorey.SeriflessBar }
singleStoreyEarlessRoundedSerifless { EarlessRoundedBody SingleStorey.SeriflessBar }
singleStoreyTopCutSerifless { TopCutBody SingleStorey.SeriflessBar }

singleStoreySerifed { FullBarBody SingleStorey.BottomSerifedBar }
singleStoreyEarlessCornerSerifed { EarlessCornerBody SingleStorey.BottomSerifedBar }
singleStoreyEarlessRoundedSerifed { EarlessRoundedBody SingleStorey.BottomSerifedBar }
singleStoreyTopCutSerifed { TopCutBody SingleStorey.BottomSerifedBar }

singleStoreyDoubleSerifed { FullBarBody SingleStorey.DoubleSerifedBar }

singleStoreyTailed { FullBarBody SingleStorey.TailedBar }
singleStoreyEarlessCornerTailed { EarlessCornerBody SingleStorey.TailedBar }
singleStoreyEarlessRoundedTailed { EarlessRoundedBody SingleStorey.TailedBar }
singleStoreyTopCutTailed { TopCutBody SingleStorey.TailedBar }

singleStoreyTailedSerifed { FullBarBody SingleStorey.TailedSerifedBar }

Expand Down Expand Up @@ -525,21 +543,26 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
select-variant 'UeVolapuk' 0xA79E (follow -- 'u')
select-variant 'ueVolapuk' 0xA79F (follow -- 'u')

alias 'grek/epsilon' 0x3B5 'latn/epsilon.serifless'
select-variant 'latn/Epsilon' 0x190
select-variant 'latn/epsilon' 0x25B

CreateTurnedLetter 'turnepsilon' 0x1D08 'latn/epsilon' HalfAdvance (XH / 2)

alias 'grek/epsilon' 0x3B5 'latn/epsilon.serifless'

alias 'cyrl/ZeRev' 0x510 'latn/Epsilon'
alias 'cyrl/zeRev' 0x511 'latn/epsilon'

select-variant 'cyrl/Ze' 0x417
select-variant 'cyrl/ze' 0x437
select-variant 'cyrl/KsiBase' (follow -- 'cyrl/ZeTopSerifOnly')
select-variant 'cyrl/ksiBase' (follow -- 'cyrl/zeTopSerifOnly')
select-variant 'cyrl/ze.BGR' (follow -- 'cyrl/ze')
select-variant 'cyrl/ze.BGR' (follow -- 'cyrl/ze')

alias 'latn/EpsilonRev' 0xA7AB 'cyrl/Ze'
alias 'latn/epsilonRev' 0x25C 'cyrl/ze'

select-variant 'cyrl/KsiBase' (follow -- 'cyrl/ZeTopSerifOnly')
select-variant 'cyrl/ksiBase' (follow -- 'cyrl/zeTopSerifOnly')

select-variant 'cyrl/ZjeKomi' 0x504 (follow -- 'cyrl/ZeTopSerifOnly')
select-variant 'cyrl/zjeKomi' 0x505 (follow -- 'cyrl/zeTopSerifOnly')
select-variant 'cyrl/DzjeKomi' 0x506 (follow -- 'cyrl/ZeTopSerifOnly')
Expand All @@ -563,13 +586,12 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
include : ExtendBelowBaseAnchors (-AccentHeight)

select-variant 'latn/epsilon/descBase' (shapeFrom -- 'latn/epsilon')
select-variant 'latn/epsilonRev/descBase' (shapeFrom -- 'cyrl/ze') (follow -- 'cyrl/ze/descBase')

derive-composites 'latn/epsilonRetroflexHook' 0x1D93 'latn/epsilon/descBase'
RetroflexHook.r RightSB 0 (refSw -- [AdviceStroke2 2 3 XH])

select-variant 'latn/epsilonRev/descBase' (shapeFrom -- 'cyrl/ze') (follow -- 'cyrl/ze/descBase')
derive-composites 'latn/epsilonRevRetroflexHook' 0x1D94 'latn/epsilonRev/descBase'
RetroflexHook.l SB 0 (refSw -- [AdviceStroke2 2 3 XH])
ExtendBelowBaseAnchors Descender
RetroflexHook.l SB 0 (refSw -- [AdviceStroke2 2 3 XH])

create-glyph 'voicedLaryngealSpirant' 0x1D24 : glyph-proc
include : MarkSet.b
Expand Down
16 changes: 8 additions & 8 deletions packages/font-glyphs/src/letter/latin/lower-a.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ glyph-block Letter-Latin-Lower-A : begin

export : define [Serifless df hookStyle sw] : union
HookAndBar df hookStyle 0 sw
Arc df 0 nothing nothing sw
Arc df 0 nothing sw
export : define [Serifed df hookStyle sw] : union
Serifless df hookStyle sw
begin [SerifFrame.fromDf df XH 0].rb.outer
export : define [Tailed df hookStyle sw] : union
HookAndBar df hookStyle (XH - [ADoubleStoreySmoothB df] + O) sw
Arc df 0 nothing nothing sw
Arc df 0 nothing sw
RightwardTailedBar df.rightSB 0 (XH - [ADoubleStoreySmoothB df]) (sw -- [fallback sw : ADoubleStoreyStroke df])
export : define [ToothlessCorner df hookStyle sw] : union
HookAndBar df hookStyle DToothlessRise sw
Expand All @@ -99,7 +99,7 @@ glyph-block Letter-Latin-Lower-A : begin
export : define [GetMask shapeFn df sw] : match shapeFn
[Just ToothlessCorner] : ArcMask df 1 DToothlessRise sw
[Just ToothlessRounded] : ArcMask df 2 [ADoubleStoreySmoothA df] sw
__ : ArcMask df 0 nothing nothing sw
__ : ArcMask df 0 nothing sw

glyph-block-export DoubleStoreyConfig
define DoubleStoreyConfig : object
Expand Down Expand Up @@ -154,7 +154,7 @@ glyph-block Letter-Latin-Lower-A : begin
local sw : fallback _sw df.mvs
include : EaredBodyImpl df top sw
include : bar df top sw
export : define [ScriptCutBody df top bar _sw] : glyph-proc
export : define [TopCutBody df top bar _sw] : glyph-proc
local sw : fallback _sw df.mvs
include : EaredBodyImpl df top sw
include : bar df (top - sw / 2) sw
Expand Down Expand Up @@ -220,21 +220,21 @@ glyph-block Letter-Latin-Lower-A : begin
singleStoreySerifless { SingleStorey.FullBarBody SingleStorey.SeriflessBar }
singleStoreyEarlessCornerSerifless { SingleStorey.EarlessCornerBody SingleStorey.SeriflessBar }
singleStoreyEarlessRoundedSerifless { SingleStorey.EarlessRoundedBody SingleStorey.SeriflessBar }
singleStoreyScriptCutSerifless { SingleStorey.ScriptCutBody SingleStorey.SeriflessBar }
singleStoreyTopCutSerifless { SingleStorey.TopCutBody SingleStorey.SeriflessBar }

singleStoreyTopSerifed { SingleStorey.FullBarBody SingleStorey.TopSerifedBar }

singleStoreySerifed { SingleStorey.FullBarBody SingleStorey.BottomSerifedBar }
singleStoreyEarlessCornerSerifed { SingleStorey.EarlessCornerBody SingleStorey.BottomSerifedBar }
singleStoreyEarlessRoundedSerifed { SingleStorey.EarlessRoundedBody SingleStorey.BottomSerifedBar }
singleStoreyScriptCutSerifed { SingleStorey.ScriptCutBody SingleStorey.BottomSerifedBar }
singleStoreyTopCutSerifed { SingleStorey.TopCutBody SingleStorey.BottomSerifedBar }

singleStoreyDoubleSerifed { SingleStorey.FullBarBody SingleStorey.DoubleSerifedBar }

singleStoreyTailed { SingleStorey.FullBarBody SingleStorey.TailedBar }
singleStoreyEarlessCornerTailed { SingleStorey.EarlessCornerBody SingleStorey.TailedBar }
singleStoreyEarlessRoundedTailed { SingleStorey.EarlessRoundedBody SingleStorey.TailedBar }
singleStoreyScriptCutTailed { SingleStorey.ScriptCutBody SingleStorey.TailedBar }
singleStoreyTopCutTailed { SingleStorey.TopCutBody SingleStorey.TailedBar }

singleStoreyTailedSerifed { SingleStorey.FullBarBody SingleStorey.TailedSerifedBar }

Expand Down Expand Up @@ -262,7 +262,7 @@ glyph-block Letter-Latin-Lower-A : begin
select-variant 'aScript' 0x251 (follow -- [conditional-follow SLAB 'aScript/autoSerifed/slab' 'aScript/autoSerifed/sans']) (shapeFrom -- 'a')
select-variant 'AScript' 0x2C6D (follow -- [conditional-follow SLAB 'aScript/autoSerifed/slab' 'aScript/autoSerifed/sans'])

derive-composites 'aScriptRetroflexHook' 0x1D90 'a.singleStoreyScriptCutSerifless'
derive-composites 'aScriptRetroflexHook' 0x1D90 'a.singleStoreyTopCutSerifless'
RetroflexHook.rSideJut RightSB 0 (yOverflow -- Stroke)

CreateTurnedLetter 'turnaScript' 0x252 'aScript' HalfAdvance (XH / 2)
Expand Down
13 changes: 11 additions & 2 deletions packages/font-glyphs/src/letter/latin/lower-b.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ glyph-block Letter-Latin-Lower-B : begin
OBarLeft.shape
VBar.l SB 0 yTop

define [BottomCutBody yTop] : union
OBarLeft.shape
VBar.l SB HalfStroke yTop
spiro-outline
corner SB 0
corner SB HalfStroke
corner (SB + [HSwToV Stroke]) HalfStroke

define [ToothlessCornerBody yTop] : union
OBarLeft.toothless (rise -- DToothlessRise) (mBlend -- DMBlend)
VBar.l SB DToothlessRise yTop
Expand All @@ -31,6 +39,7 @@ glyph-block Letter-Latin-Lower-B : begin
toothed ToothedBody
toothlessCorner ToothlessCornerBody
toothlessRounded ToothlessRoundedBody
bottomCut BottomCutBody
object # serifs
serifless { no-shape false }
motionSerifed { LTSerifs true }
Expand Down Expand Up @@ -65,7 +74,7 @@ glyph-block Letter-Latin-Lower-B : begin
local xRight : mix SB RightSB 0.9
include : HBar.t xLeft xRight Ascender
include : Serifs
if doTS : include : VSerif.dr [mix SB RightSB 0.9] Ascender VJut
if doTS : include : VSerif.dr xRight Ascender VJut
include : LeaningAnchor.Above.VBar.m [mix xLeft xRight 0.5]

if [not doTS] : create-glyph "bHookTop.\(suffix)" : glyph-proc
Expand Down Expand Up @@ -103,5 +112,5 @@ glyph-block Letter-Latin-Lower-B : begin
OShapeOutline.NoOvershoot XH 0 (SB + BBD + [HSwToV BBS]) RightSB
VBar.r (RightSB - BBD - OX) 0 XH BBS
include : OBarLeft.shape
left -- SB + BBD
left -- (SB + BBD)
sw -- BBS
24 changes: 12 additions & 12 deletions packages/font-glyphs/src/letter/latin/lower-d.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ glyph-block Letter-Latin-Lower-D : begin
if topSerif : include : topSerif df Ascender
if bottomSerif : include : bottomSerif df Ascender
include : LeaningAnchor.Above.VBar.r df.rightSB
set-base-anchor 'overlayOnExtension' (df.rightSB - [HSwToV : 0.5 * Stroke]) yOverlay
set-base-anchor 'overlayOnExtension' (df.rightSB - [HSwToV HalfStroke]) yOverlay

create-glyph "dStroke.\(suffix)" : glyph-proc
local df : DivFrame 1
Expand All @@ -110,7 +110,7 @@ glyph-block Letter-Latin-Lower-D : begin
local xRight : df.rightSB + O
include : HBar.t xLeft xRight Ascender
if topSerif : begin
include : VSerif.dl xLeft Ascender : Math.min VJut (0.8 * (Ascender - XH))
include : VSerif.dl xLeft Ascender [Math.min VJut : 0.8 * (Ascender - XH)]
if [not para.isItalic] : include : HSerif.rt df.rightSB Ascender SideJut
if bottomSerif : include : bottomSerif df Ascender
include : LeaningAnchor.Above.VBar.m [mix xLeft xRight 0.5]
Expand Down Expand Up @@ -198,20 +198,20 @@ glyph-block Letter-Latin-Lower-D : begin
local fine : AdviceStroke 4
local rinner : clamp (Width * 0.065) (XH * 0.05) (fine * 0.35)
local sw : AdviceStroke 2.75
local m1 : Math.min RightSB (Width - rinner * 2 - fine - OX)
local m : Math.min RightSB (Width - rinner * 2 - fine - OX)

include : LeaningAnchor.Above.VBar.r m1
include : OBarRight.shape (left -- SB) (right -- m1) (sw -- sw)
include : LeaningAnchor.Above.VBar.r m
include : OBarRight.shape (left -- SB) (right -- m) (sw -- sw)
include : dispiro
widths.lhs sw
flat (m1 - [HSwToV sw]) Ascender [heading Downward]
curl (m1 - [HSwToV sw]) (rinner * 2 + fine)
CurlyTail.n fine 0 (m1 + rinner * 2 + fine)
x2 -- ([mix SB m1 0.5] - [HSwToV : 0.75 * fine])
y2 -- 0.37 * Descender
flat (m - [HSwToV sw]) Ascender [heading Downward]
curl (m - [HSwToV sw]) (rinner * 2 + fine)
CurlyTail.n fine 0 (m + rinner * 2 + fine)
x2 -- ([mix SB m 0.5] - [HSwToV : 0.75 * fine])
y2 -- (0.37 * Descender)
swBefore -- sw
terminalSlopeAdj -- 0.25
if fSerif : include : HSerif.lt (m1 - [HSwToV sw]) Ascender SideJut
if fSerif : include : HSerif.lt (m - [HSwToV sw]) Ascender SideJut

select-variant 'dCurlyTail' 0x221

Expand All @@ -224,5 +224,5 @@ glyph-block Letter-Latin-Lower-D : begin
OShapeOutline.NoOvershoot XH 0 SB (RightSB - BBD - [HSwToV BBS])
VBar.l (SB + BBD + OX) 0 XH BBS
include : OBarRight.shape
right -- RightSB - BBD
right -- (RightSB - BBD)
sw -- BBS
Loading
Loading