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

Refactor of the u and che's bowl shape function #2573

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
130 changes: 60 additions & 70 deletions packages/font-glyphs/src/letter/armenian/lower-u-group.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ glyph-module
glyph-block Letter-Armenian-Lower-U-Group : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : nShoulder nShoulderKnots SerifFrame
glyph-block-import Letter-Shared-Shapes : nShoulder uBowl SerifFrame
glyph-block-import Letter-Armenian-Shared-Shapes : ArmHBar TwoNeck
glyph-block-import Letter-Latin-U : USerifs
glyph-block-import Letter-Latin-Lower-M : SmallMArches
Expand Down Expand Up @@ -48,7 +48,7 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
local df : include : DivFrame 1
include : df.markSet.p
include : VBar.l df.leftSB Descender XH df.mvs
include : nShoulder
include : nShoulder.shape
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
top -- XH
Expand All @@ -67,7 +67,7 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
local df : include : DivFrame 1
include : df.markSet.p
include : VBar.l df.leftSB 0 XH df.mvs
include : nShoulder
include : nShoulder.shape
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
top -- XH
Expand All @@ -86,13 +86,12 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
create-glyph 'armn/ech' 0x565 : glyph-proc
local df : include : DivFrame 1
include : df.markSet.b
include : nShoulder
top -- 0
bottom -- (-Ascender)
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
include : uBowl.shape
top -- Ascender
bottom -- 0
left -- df.leftSB
right -- (df.rightSB - [HSwToV df.mvs])
stroke -- df.mvs
include : FlipAround df.middle 0
include : VBar.r df.rightSB 0 [mix 0 XH 0.6] df.mvs
include : [ArmHBar.normal df 0].high
if SLAB : include : USerifs.Toothed df Ascender df.mvs
Expand All @@ -103,7 +102,7 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
local df : include : DivFrame 1
include : df.markSet.b
include : VBar.l df.leftSB Descender XH df.mvs
include : nShoulder
include : nShoulder.shape
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
top -- XH
Expand All @@ -121,7 +120,7 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
local df : include : DivFrame 1
include : df.markSet.bp
include : VBar.l df.leftSB Descender Ascender df.mvs
include : nShoulder
include : nShoulder.shape
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
top -- XH
Expand All @@ -137,14 +136,13 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
create-glyph 'armn/xeh' 0x56D : glyph-proc
local df : include : DivFrame para.diversityM 3
include : df.markSet.bp
include : nShoulder
top -- XH
bottom -- (XH / 2)
left -- (df.leftSB + [HSwToV df.mvs])
right -- (df.middle + [HSwToV : df.mvs / 2])
include : uBowl.shape
top -- (XH / 2)
bottom -- 0
left -- (df.middle - [HSwToV : df.mvs / 2])
right -- (df.rightSB - [HSwToV df.mvs])
stroke -- df.mvs
include : FlipAround df.middle (XH / 2)
include : nShoulder
include : nShoulder.shape
top -- XH
bottom -- (XH / 2)
left -- (df.leftSB + [HSwToV df.mvs])
Expand All @@ -164,13 +162,12 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
create-glyph 'armn/ken' 0x56F : glyph-proc
local df : include : DivFrame 1
include : df.markSet.bp
include : nShoulder
top -- 0
bottom -- (-Ascender)
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
include : uBowl.shape
top -- Ascender
bottom -- 0
left -- df.leftSB
right -- (df.rightSB - [HSwToV df.mvs])
stroke -- df.mvs
include : FlipAround df.middle 0
include : VBar.r df.rightSB Descender XH df.mvs
if SLAB : begin
local sf : SerifFrame.fromDf df Ascender 0
Expand All @@ -185,7 +182,7 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
local df : include : DivFrame 1
include : df.markSet.b
include : VBar.l df.leftSB 0 Ascender df.mvs
include : nShoulder
include : nShoulder.shape
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
top -- XH
Expand All @@ -202,7 +199,7 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
local df : include : DivFrame 1
include : df.markSet.p
include : VBar.l df.leftSB 0 XH df.mvs
include : nShoulder
include : nShoulder.shape
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
top -- XH
Expand All @@ -218,13 +215,12 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
create-glyph 'armn/men' 0x574 : glyph-proc
local df : include : DivFrame 1
include : df.markSet.b
include : nShoulder
top -- 0
bottom -- (-XH)
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
include : uBowl.shape
top -- XH
bottom -- 0
left -- df.leftSB
right -- (df.rightSB - [HSwToV df.mvs])
stroke -- df.mvs
include : FlipAround df.middle 0
include : VBar.r df.rightSB 0 Ascender df.mvs
include : [ArmHBar.right df 0 SLAB].top
if SLAB : begin
Expand All @@ -236,13 +232,12 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
create-glyph 'armn/nu' 0x576 : glyph-proc
local df : include : DivFrame 1
include : df.markSet.b
include : nShoulder
top -- 0
bottom -- (-Ascender)
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
include : uBowl.shape
top -- Ascender
bottom -- 0
left -- df.leftSB
right -- (df.rightSB - [HSwToV df.mvs])
stroke -- df.mvs
include : FlipAround df.middle 0
include : VBar.r df.rightSB 0 XH df.mvs
include : [ArmHBar.left df 0 SLAB].top
if SLAB : begin
Expand All @@ -255,7 +250,7 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
local df : include : DivFrame 1
include : df.markSet.e
include : VBar.l df.leftSB 0 XH df.mvs
include : nShoulder
include : nShoulder.shape
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
top -- XH
Expand Down Expand Up @@ -286,7 +281,7 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
include : df.markSet.e
include : VBar.l df.leftSB 0 XH df.mvs

# Combination of nShoulderKnots and the straight 2 shape
# Combination of nShoulder.knots and the straight 2 shape
local fine : df.mvs * (ShoulderFine / Stroke)
local left : Math.max (df.rightSB - [HSwToV df.mvs] - jut) df.middle
include : dispiro
Expand All @@ -303,7 +298,7 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
include : composite-proc sf.lb.outer

# Alternate straight 'n' form
# include : nShoulder
# include : nShoulder.shape
# left -- (df.leftSB + [HSwToV df.mvs])
# right -- df.rightSB
# top -- XH
Expand All @@ -320,13 +315,12 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
create-glyph 'armn/seh' 0x57D : glyph-proc
local df : include : DivFrame 1
include : df.markSet.e
include : nShoulder
top -- 0
bottom -- (-XH)
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
include : uBowl.shape
top -- XH
bottom -- 0
left -- df.leftSB
right -- (df.rightSB - [HSwToV df.mvs])
stroke -- df.mvs
include : FlipAround df.middle 0
include : VBar.r df.rightSB 0 XH df.mvs
if SLAB : begin
local sf : SerifFrame.fromDf df XH 0
Expand All @@ -338,13 +332,12 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
create-glyph 'armn/vew' 0x57E : glyph-proc
local df : include : DivFrame 1
include : df.markSet.bp
include : nShoulder
top -- 0
bottom -- (-XH)
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
include : uBowl.shape
top -- XH
bottom -- 0
left -- df.leftSB
right -- (df.rightSB - [HSwToV df.mvs])
stroke -- df.mvs
include : FlipAround df.middle 0
include : VBar.r df.rightSB Descender Ascender df.mvs
include : [ArmHBar.right df 0 SLAB].desc

Expand All @@ -357,14 +350,13 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
create-glyph 'armn/tiun' 0x57F : glyph-proc
local df : include : DivFrame para.diversityM 3
include : df.markSet.e
include : nShoulder
include : uBowl.shape
top -- XH
bottom -- 0
left -- (df.middle + [HSwToV : df.mvs / 2])
right -- df.rightSB
left -- df.leftSB
right -- (df.middle - [HSwToV : 0.5 * df.mvs])
stroke -- df.mvs
include : FlipAround df.middle (XH / 2)
include : nShoulder
include : nShoulder.shape
top -- XH
bottom -- 0
left -- (df.middle + [HSwToV : df.mvs / 2])
Expand All @@ -381,7 +373,7 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
create-glyph 'armn/reh' 0x580 : glyph-proc
local df : include : DivFrame 1
include : df.markSet.b
include : nShoulder
include : nShoulder.shape
top -- XH
bottom -- 0
left -- (df.leftSB + [HSwToV df.mvs])
Expand All @@ -398,14 +390,13 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
create-glyph 'armn/piur' 0x583 : glyph-proc
local df : include : DivFrame para.diversityM 3
include : df.markSet.bp
include : nShoulder
include : uBowl.shape
top -- XH
bottom -- 0
left -- (df.middle + [HSwToV : df.mvs / 2])
right -- df.rightSB
left -- df.leftSB
right -- (df.middle - [HSwToV : 0.5 * df.mvs])
stroke -- df.mvs
include : FlipAround df.middle (XH / 2)
include : nShoulder
include : nShoulder.shape
top -- XH
bottom -- 0
left -- (df.middle + [HSwToV : df.mvs / 2])
Expand All @@ -424,13 +415,12 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
create-glyph 'armn/ew' 0x587 : glyph-proc
local df : include : DivFrame para.diversityM 3
include : df.markSet.b
include : nShoulder
top -- 0
bottom -- (-Ascender)
left -- (df.middle + [HSwToV : df.mvs / 2])
right -- df.rightSB
include : uBowl.shape
top -- Ascender
bottom -- 0
left -- df.leftSB
right -- (df.middle - [HSwToV : 0.5 * df.mvs])
stroke -- df.mvs
include : FlipAround df.middle 0
include : VBar.m df.middle 0 XH df.mvs
include : HBar.b df.middle df.rightSB 0 df.mvs
if SLAB : begin
Expand Down
4 changes: 2 additions & 2 deletions packages/font-glyphs/src/letter/armenian/to.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ glyph-module
glyph-block Letter-Armenian-To : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : nShoulderKnots SerifFrame
glyph-block-import Letter-Shared-Shapes : nShoulder SerifFrame
glyph-block-import Letter-Armenian-Shared-Shapes : ArmHBar

# Common Params
Expand Down Expand Up @@ -45,7 +45,7 @@ glyph-block Letter-Armenian-To : begin
include : VBar.l df.leftSB Descender XH df.mvs
local barPosT : XH / 2 + df.mvs / 2
include : dispiro
nShoulderKnots
nShoulder.knots
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
top -- XH
Expand Down
16 changes: 8 additions & 8 deletions packages/font-glyphs/src/letter/cyrillic/che.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ glyph-block Letter-Cyrillic-Che : begin
glyph-block-import Common-Derivatives
glyph-block-import Mark-Adjustment : LeaningAnchor
glyph-block-import Letter-Shared : CreateSelectorVariants DefineSelectorGlyph CreateTurnedLetter
glyph-block-import Letter-Shared-Shapes : SerifFrame RightwardTailedBar DToothlessRise
glyph-block-import Letter-Shared-Shapes : cheBowl SerifFrame RightwardTailedBar DToothlessRise
glyph-block-import Letter-Shared-Shapes : TopHook CyrDescender BottomExtension
glyph-block-import Letter-Latin-Lower-M : EarlessCornerDoubleArchSmallMShape

Expand Down Expand Up @@ -38,12 +38,12 @@ glyph-block Letter-Cyrillic-Che : begin
[Just BODY.TAILED] : RightwardTailedBar df.rightSB 0 top (sw -- sw)
__ : VBar.r df.rightSB 0 top sw

include : dispiro
widths.lhs sw
flat df.leftSB top [heading Downward]
curl df.leftSB (bar - DToothlessRise + ArchDepthB - HalfStroke)
arch.lhs.centerAt.ltr.b df.middle (bar - DToothlessRise - HalfStroke)
g4 (df.rightSB - 1 / 16) (bar - HalfStroke) [heading Rightward]
include : cheBowl.shape
left -- df.leftSB
right -- df.rightSB
top -- top
bottom -- (bar - DToothlessRise - 0.5 * sw)
sw -- sw

local sf : SerifFrame.fromDf df top 0
include : tagged 'serifLT' : match slabType
Expand Down Expand Up @@ -252,7 +252,7 @@ glyph-block Letter-Cyrillic-Che : begin
include [refer-glyph "cyrl/Shha.\(suffix)"] AS_BASE ALSO_METRICS
eject-contour 'strokeR'
eject-contour 'serifRB'
include : TopHook.lBarInner SB 0 CAP
include : TopHook.toRight.lBarInner SB 0 CAP
include : LeaningAnchor.Above.VBar.l SB

select-variant 'cyrl/Shha' 0x4BA (follow -- 'H')
Expand Down
2 changes: 1 addition & 1 deletion packages/font-glyphs/src/letter/cyrillic/tshe.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ glyph-block Letter-Cyrillic-Tshe : begin
local xTopBarRightSym : 2 * left + [HSwToV sw] - xTopBarLeft
local xTopBarRight : Math.max xTopBarRightSym : mix left RightSB 0.475

include : nShoulder
include : nShoulder.shape
left -- (left + [HSwToV sw])
right -- right
top -- [Math.min XH : if SLAB (CAP - 1.25 * VJut) XH]
Expand Down
2 changes: 1 addition & 1 deletion packages/font-glyphs/src/letter/greek/pi.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ glyph-block Letter-Greek-Pi : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Blackboard : BBS BBD BBBarLeft BBBarRight
glyph-block-import Letter-Shared-Shapes : RightwardTailedBar SerifFrame nShoulder
glyph-block-import Letter-Shared-Shapes : RightwardTailedBar SerifFrame
glyph-block-import Letter-Shared-Shapes : CyrDescender MidHook

glyph-block-export PiShape
Expand Down
5 changes: 2 additions & 3 deletions packages/font-glyphs/src/letter/latin-ext/hwair.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ glyph-block Letter-Latin-Hwair : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Mark-Adjustment : LeaningAnchor
glyph-block-import Letter-Shared-Shapes : nShoulderKnots
glyph-block-import Letter-Shared-Shapes : SerifFrame
glyph-block-import Letter-Shared-Shapes : nShoulder SerifFrame

define Variants : object
straightSerifless { false false }
Expand All @@ -24,7 +23,7 @@ glyph-block Letter-Latin-Hwair : begin
include : LeaningAnchor.Above.VBar.l df.leftSB
include : VBar.l df.leftSB 0 Ascender df.mvs
include : dispiro
nShoulderKnots (df.leftSB + [HSwToV df.mvs]) (df.middle + [HSwToV : 0.5 * df.mvs]) (df.mvs * 0.4) nothing (XH * 0.51) (SmallArchDepthA * 0.6 * df.div) (SmallArchDepthB * 0.6 * df.div) df.mvs
nShoulder.knots (df.leftSB + [HSwToV df.mvs]) (df.middle + [HSwToV : 0.5 * df.mvs]) (df.mvs * 0.4) nothing (XH * 0.51) (SmallArchDepthA * 0.6 * df.div) (SmallArchDepthB * 0.6 * df.div) df.mvs
flat (df.middle + [HSwToV : 0.5 * df.mvs]) (XH * 0.5) [heading Downward]
curl (df.middle + [HSwToV : 0.5 * df.mvs]) (SmallArchDepthB * 0.6 * df.div)
arcvh
Expand Down
2 changes: 1 addition & 1 deletion packages/font-glyphs/src/letter/latin-ext/lower-ae-oe.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ glyph-block Letter-Latin-Lower-AE-OE : begin
glyph-block-import Common-Derivatives
glyph-block-import Mark-Adjustment : LeaningAnchor
glyph-block-import Letter-Shared : CreateTurnedLetter
glyph-block-import Letter-Shared-Shapes : nShoulder OBarLeft
glyph-block-import Letter-Shared-Shapes : OBarLeft
glyph-block-import Letter-Latin-Lower-M : MEnoughSpaceForFullSerifs dfM

glyph-block-export SubDfAndShift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ glyph-module
glyph-block Letter-Latin-Middle-Welsh-V : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : nShoulderKnots

define [MiddleWelshVShape top pL pR] : glyph-proc
include : dispiro
Expand Down
Loading
Loading