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

Add new constant QuarterStroke. #2639

Merged
merged 2 commits into from
Jan 8, 2025
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
8 changes: 4 additions & 4 deletions packages/font-glyphs/src/auto-build/composite.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,7 @@ glyph-block Autobuild-Pnonetic-Ligatures : begin
local shrink : clamp 0 1 _shrink
local kern 0
foreach [cycle : range 0 8] : begin
set kern : kKern * (2 * SB * shrink + (0.5 * Stroke * [HSwToV shrink] - OX * 2))
set kern : kKern * (2 * SB * shrink + (HalfStroke * [HSwToV shrink] - OX * 2))
local tmpShrink : (wwM + kern * (mockNParts - 1)) / (mockNParts * Width)
set shrink : Math.max _shrink : clamp 0 1 tmpShrink

Expand Down Expand Up @@ -1679,7 +1679,7 @@ glyph-block Autobuild-Double-Emotions : begin
define CWidth : if FMosaicWide MosaicWidth (Width * div)
define shrink1 : if FMosaicWide 1 _shrink1
define shrink2 : if FMosaicWide 1 _shrink2
define kern : SB * shrink1 + SB * shrink2 + 0.5 * Stroke * [mix shrink1 shrink2 0.5] - OX * 2
define kern : SB * shrink1 + SB * shrink2 + HalfStroke * [mix shrink1 shrink2 0.5] - OX * 2

define jobs : CollectJobs NON-DECOMPOSABLE NOT-CENTERED ALLOW-PROPORTIONAL prefix MosaicNameSuffix demands
define df1 : CreateDerivedFontFromJobs jobs {} : lambda [gs] : Thinner gs shrink1 true
Expand All @@ -1699,7 +1699,7 @@ glyph-block Autobuild-Double-Emotions : begin
include : Translate (dfg1.advanceWidth * wadj1 - kern) 0
include : union dfg1 [with-transform [Translate (dfg1.advanceWidth) 0] dfm1]
include : Ungizmo
include : Translate (-refW / 2) 0
include : Translate ((-refW) / 2) 0
include : Scale [clamp 0 1 ((CWidth - SB * 1.25) / (CWidth - SB * 2) * CWidth / refW)] 1
include : Translate (CWidth / 2) 0
include : Regizmo
Expand All @@ -1725,7 +1725,7 @@ glyph-block Autobuild-Grouped-Digits : begin
HBar.b 0 Width (Descender * 0.75) [AdviceStroke 4]
glyph-proc
include : refer-glyph "denseShade.WWID"
include : Translate (-Width / 2) 0
include : Translate ((-Width) / 2) 0
include : Translate (-Width) 0

foreach [gid : items-of numberGlyphIDs] : foreach [nd : items-of {0 1 2 3 4 5 6}]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export : define Superscript : list
list 0xA717 'dotvbar'
list 0xA718 'dotslash'
list 0xA719 'dothbar'
list 0xA71A 'turnedRevNegate'
list 0xA71A 'invNegate'
list 0xA71B 'arrowUp.NWID'
list 0xA71C 'arrowDown.NWID'
list 0xA71D 'alveolarclick'
Expand Down
4 changes: 2 additions & 2 deletions packages/font-glyphs/src/letter/cyrillic/de.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ glyph-block Letter-Cyrillic-De : begin
glyph-block-import Letter-Greek-Lower-Epsilon : CyrZe EpsilonConfig

glyph-block-export BottomExtension
local BottomExtension : 0.25 * Stroke - LongVJut
local BottomExtension : QuarterStroke - LongVJut

glyph-block-export CyrDeBottom
define [CyrDeBottom left right _sw _desc] : glyph-proc
Expand Down Expand Up @@ -153,7 +153,7 @@ glyph-block Letter-Cyrillic-De : begin
local middle : mix left right 0.5
local sw : fallback _sw df.mvs

local yRingTop : Math.min (XH + O) (XH - Stroke * 0.25)
local yRingTop : Math.min (XH + O) (XH - QuarterStroke)
local ada : df.archDepthA (SmallArchDepth * yRingTop / XH)
local adb : df.archDepthB (SmallArchDepth * yRingTop / XH)

Expand Down
2 changes: 1 addition & 1 deletion packages/font-glyphs/src/letter/cyrillic/dzhe.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ glyph-block Letter-Cyrillic-Dzhe : begin
include : VBar.l SB 0 top
include : HBar.b SB RightSB 0
include : VBar.r RightSB 0 top
local desc : 0.25 * Stroke - LongVJut
local desc : QuarterStroke - LongVJut
include : VBar.m Middle desc Stroke
include : ExtendBelowBaseAnchors desc
if SLAB : let [sf : SerifFrame.fromDf [DivFrame 1] top 0] : begin
Expand Down
6 changes: 3 additions & 3 deletions packages/font-glyphs/src/letter/cyrillic/lower-be.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ glyph-block Letter-Cyrillic-Lower-Be : begin
create-glyph 'cyrl/be' 0x431 : glyph-proc
include : MarkSet.b

local yRingTop : Math.min (XH + O) (XH - Stroke * 0.25)
local yRingTop : Math.min (XH + O) (XH - QuarterStroke)
local ada : [DivFrame 1].archDepthA (SmallArchDepth * yRingTop / XH)
local adb : [DivFrame 1].archDepthB (SmallArchDepth * yRingTop / XH)

include : dispiro
widths.rhs ShoulderFine
straight.up.start (SB + OX + [HSwToV (Stroke - ShoulderFine)]) (yRingTop - ada)
straight.up.start (SB + OX + [HSwToV : Stroke - ShoulderFine]) (yRingTop - ada)
arch.rhs yRingTop (swBefore -- ShoulderFine)
flat (RightSB - OX) (yRingTop - adb)
curl (RightSB - OX) ada
arch.rhs 0
flat (SB + OX) adb
curl (SB + OX) (yRingTop - ada)
alsoThruThem [list {0.3 0.85} {0.65 0.925}] important g4
g4 (RightSB - (1 / 16) * [HSwToV Stroke]) Ascender [heading Rightward]
g4 (RightSB - [HSwToV : Stroke / 16]) Ascender [heading Rightward]
2 changes: 1 addition & 1 deletion packages/font-glyphs/src/letter/cyrillic/yat.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ glyph-block Letter-Cyrillic-Yat : begin
pBar -- pBar
stroke -- sw

local cTop : if SLAB (top - Stroke / 2) top
local cTop : if SLAB (top - HalfStroke) top

local _xCrossbarLeft : mix 0 df.leftSB : if SLAB 0.25 0.375
local xCrossbarLeft : fallback xCrossbarLeftOverride _xCrossbarLeft
Expand Down
32 changes: 16 additions & 16 deletions packages/font-glyphs/src/letter/cyrillic/yeri.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -280,58 +280,58 @@ glyph-block Letter-Cyrillic-Yeri : begin
local df : include : DivFrame 1
include : df.markSet.capital
include : Uc CAP
left -- df.leftSB
left -- df.leftSB
right -- df.rightSB
create-glyph "cyrl/yeri.\(suffix)" : glyph-proc
local df : include : DivFrame 1
include : df.markSet.e
include : Lc XH
left -- df.leftSB
left -- df.leftSB
right -- df.rightSB
create-glyph "cyrl/YeriBar.\(suffix)" : glyph-proc
local df : include : DivFrame 1
include : df.markSet.capital
include : Uc CAP
left -- df.leftSB
left -- df.leftSB
right -- df.rightSB
include : YeriOverlayBar df CAP
create-glyph "cyrl/yeriBar.\(suffix)" : glyph-proc
local df : include : DivFrame 1
include : df.markSet.e
include : Lc XH
left -- df.leftSB
left -- df.leftSB
right -- df.rightSB
include : YeriOverlayBar df XH
create-glyph "cyrl/Yer.\(suffix)" : glyph-proc
local df : include : DivFrame para.diversityT
include : df.markSet.capital
include : CyrBackYerShape Uc CAP
left -- df.leftSB
left -- df.leftSB
right -- df.rightSB
create-glyph "cyrl/yer.\(suffix)" : glyph-proc
local df : include : DivFrame para.diversityT
include : df.markSet.e
include : CyrBackYerShape Lc XH
left -- df.leftSB
left -- df.leftSB
right -- df.rightSB
create-glyph "cyrl/yerTall.\(suffix)" : glyph-proc
local df : include : DivFrame para.diversityT
include : df.markSet.b
include : CyrBackYerShape Lc Ascender
left -- df.leftSB
left -- df.leftSB
right -- df.rightSB
pBar -- (YeriBarPos * XH / Ascender)
pBar -- (YeriBarPos * XH / Ascender)
create-glyph "cyrl/YerNeutral.\(suffix)" : glyph-proc
local df : include : DivFrame para.diversityT
include : df.markSet.capital
include : CyrNeutralYerShape Uc CAP
left -- df.leftSB
left -- df.leftSB
right -- df.rightSB
create-glyph "cyrl/yerNeutral.\(suffix)" : glyph-proc
local df : include : DivFrame para.diversityT
include : df.markSet.e
include : CyrNeutralYerShape Lc XH
left -- df.leftSB
left -- df.leftSB
right -- df.rightSB
create-glyph "ZhuangToneSix.\(suffix)" : glyph-proc
include : MarkSet.capital
Expand Down Expand Up @@ -405,13 +405,13 @@ glyph-block Letter-Cyrillic-Yeri : begin
local xm : df.middle + [HSwToV : 0.5 * df.mvs]
include : RevYeri.RoundShape CAP df.leftSB xm df.mvs
include : UpwardHookShape
left -- df.middle - [HSwToV : 0.5 * df.mvs]
right -- df.rightSB
left -- df.middle - [HSwToV : 0.5 * df.mvs]
right -- df.rightSB
ybegin -- CAP
yend -- (CAP / 2)
ada -- (SmallArchDepthA * 0.6 * df.div)
adb -- (SmallArchDepthB * 0.6 * df.div)
sw -- df.mvs
yend -- (CAP / 2)
ada -- (SmallArchDepthA * 0.6 * df.div)
adb -- (SmallArchDepthB * 0.6 * df.div)
sw -- df.mvs
if SLAB : begin
include : HSerif.mt df.middle CAP Jut df.mvs
local sf2 : [SerifFrame.fromDf df (CAP / 2) 0].slice 1 2
Expand Down
13 changes: 6 additions & 7 deletions packages/font-glyphs/src/letter/greek/lower-delta.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ glyph-block Letter-Greek-Lower-Delta : begin
create-glyph 'grek/delta.rounded' : glyph-proc
include : MarkSet.b

local yRingTop : Stroke * 0.25 + Ascender * 0.619
local xNeck : mix SB RightSB 0.06
local yRingTop : QuarterStroke + Ascender * 0.619
local xNeck : mix SB RightSB 0.06
local xOTLeft : mix SB RightSB 0.5
local fine : Stroke * 0.5

include : dispiro
g4 [mix Middle RightSB 0.85] [mix XH Ascender 0.8] [widths.lhs]
Expand All @@ -32,15 +31,15 @@ glyph-block Letter-Greek-Lower-Delta : begin
flat (SB + OX) SmallArchDepthB
curl (SB + OX) (yRingTop - SmallArchDepthA)
arcvh
g4 xOTLeft (yRingTop - (Stroke - fine) / 2) [widths.rhs fine]
g4 xOTLeft (yRingTop - QuarterStroke) [widths.rhs HalfStroke]

create-glyph 'grek/delta.flatTop' : glyph-proc
include : MarkSet.b

local fine ShoulderFine
local coFine : mix fine Stroke 0.5
local yTop : Ascender - Stroke
local yMid : Stroke * 0.25 + [mix 0 XH (7 / 8)]
local yMid : QuarterStroke + [mix 0 XH (7 / 8)]
local yMid2 : mix yMid [YSmoothMidR yMid 0 SmallArchDepthA SmallArchDepthB] 0.95
local yMid3 : mix yMid [YSmoothMidR yMid 0 SmallArchDepthA SmallArchDepthB] 0.5
local yMockBarStart : yMid3 + 2.25 * Stroke
Expand All @@ -49,8 +48,8 @@ glyph-block Letter-Greek-Lower-Delta : begin
include : HBar.t SB RightSB Ascender
include : intersection [MaskBelow yTop] : dispiro
widths.lhs fine
flat (RightSB - OX - [HSwToV (Stroke - fine)]) SmallArchDepthA
curl (RightSB - OX - [HSwToV (Stroke - fine)]) (yMid - SmallArchDepthB)
flat (RightSB - OX - [HSwToV : Stroke - fine]) SmallArchDepthA
curl (RightSB - OX - [HSwToV : Stroke - fine]) (yMid - SmallArchDepthB)
arch.lhs yMid (swBefore -- fine)
flat (SB + OX) (yMid - SmallArchDepthA)
curl (SB + OX) SmallArchDepthB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ glyph-block Letter-Greek-Lower-Lunate-Epsilon : begin
arcvh
flat [mix SB RightSB 0.625] 0 [heading Rightward]
curl RightSB 0 [heading Rightward]
include : HBar.m (SB + [HSwToV HalfStroke]) ([mix SB RightSB 0.75] + 0.25 * Stroke) (XH / 2) [AdviceStroke2 2 3 XH]
include : HBar.m (SB + [HSwToV HalfStroke]) ([mix SB RightSB 0.75] + QuarterStroke) (XH / 2) [AdviceStroke2 2 3 XH]

create-glyph 'grek/lowerLunateEpsilonRev' 0x3F6 : glyph-proc
include : MarkSet.e
Expand All @@ -30,4 +30,4 @@ glyph-block Letter-Greek-Lower-Lunate-Epsilon : begin
arcvh
flat [mix RightSB SB 0.625] 0 [heading Leftward]
curl SB 0 [heading Leftward]
include : HBar.m ([mix RightSB SB 0.75] - 0.25 * Stroke) (RightSB - [HSwToV HalfStroke]) (XH / 2) [AdviceStroke2 2 3 XH]
include : HBar.m ([mix RightSB SB 0.75] - QuarterStroke) (RightSB - [HSwToV HalfStroke]) (XH / 2) [AdviceStroke2 2 3 XH]
2 changes: 1 addition & 1 deletion packages/font-glyphs/src/letter/greek/lower-nu.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ glyph-block Letter-Greek-Lower-Nu : begin

create-glyph 'grek/nu.casual' : glyph-proc
include : MarkSet.e
local xmid : Middle + HalfStroke * 0.75
local xmid : Middle + 0.375 * Stroke
include : dispiro
g4 (SB + [HSwToV : 0.4 * Stroke]) (XH - O) [widths.rhs]
bezControls 0.33 0.2 1 0.76 6 important
Expand Down
6 changes: 3 additions & 3 deletions packages/font-glyphs/src/letter/greek/pi.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ glyph-block Letter-Greek-Pi : begin
glyph-block-export PiShape
define [PiShape] : with-params [df top bottom [shrinkRate 0.05] [fine Stroke] [doSerif false] [endShrink 0] [tailed false]] : glyph-proc
local shrink : if doSerif 0 (shrinkRate * (df.rightSB - df.leftSB))
local endexpand : if doSerif 0 (- endShrink * (df.rightSB - df.leftSB) || shrink / 2)
local endexpand : if doSerif 0 ((-endShrink) * (df.rightSB - df.leftSB) || shrink / 2)
include : HBar.t (df.leftSB - endexpand) (df.rightSB + endexpand) top fine
include : VBar.l (df.leftSB + shrink) bottom (top - fine / 2) fine
if tailed
Expand All @@ -28,7 +28,7 @@ glyph-block Letter-Greek-Pi : begin

define [MathBBPiShape] : with-params [df top bottom [shrinkRate 0.05] [endShrink 0]] : glyph-proc
local shrink : shrinkRate * (df.rightSB - df.leftSB)
local endexpand : -endShrink * (df.rightSB - df.leftSB) || shrink / 2
local endexpand : (-endShrink) * (df.rightSB - df.leftSB) || shrink / 2
include : HBar.t (df.leftSB - endexpand) (df.rightSB + endexpand) top BBS
include : BBBarLeft (df.leftSB + shrink) bottom top
include : BBBarRight (df.rightSB - shrink) bottom top
Expand All @@ -53,7 +53,7 @@ glyph-block Letter-Greek-Pi : begin
derive-composites 'cyrl/PeDescender' 0x524 'cyrl/Pe' [CyrDescender.rSideJut RightSB 0]
derive-composites 'cyrl/peDescender.upright' null 'cyrl/pe.upright' [CyrDescender.rSideJut RightSB 0]

define SmallPiShrink : 1/6 - [HSwToV : 0.25 * Stroke] / (RightSB - SB)
define SmallPiShrink : (1/6) - [HSwToV QuarterStroke] / (RightSB - SB)

define SmallPiConfig : object
smallCap { {0 SLAB } false }
Expand Down
2 changes: 1 addition & 1 deletion packages/font-glyphs/src/letter/greek/qoppa.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ glyph-block Letter-Greek-Qoppa : begin

create-glyph 'grek/Qoppa' 0x3DE : glyph-proc
include : MarkSet.capital
define x1 : SB + [HSwToV : 0.25 * Stroke] - O
define x1 : SB + [HSwToV QuarterStroke] - O
define x1co : Width - x1
define x2 : mix SB RightSB 0.3
define x2co : Width - x2
Expand Down
4 changes: 2 additions & 2 deletions packages/font-glyphs/src/letter/greek/upper-gamma.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ glyph-block Letter-Greek-Upper-Gamma: begin
include : MidHook.general
left -- (GammaBarLeft + [HSwToV Stroke])
right -- RightSB
top -- (CAP * HBarPos + Stroke / 4)
top -- (CAP * HBarPos + QuarterStroke)
ada -- ArchDepthA
adb -- ArchDepthB

Expand All @@ -119,7 +119,7 @@ glyph-block Letter-Greek-Upper-Gamma: begin
include : MidHook.general
left -- (GammaBarLeft + [HSwToV Stroke])
right -- RightSB
top -- (XH * HBarPos + Stroke / 4)
top -- (XH * HBarPos + QuarterStroke)
ada -- (ArchDepthA * (HBarPos ** 0.3))
adb -- (ArchDepthB * (HBarPos ** 0.3))
if para.isItalic : eject-contour 'serifLB'
Expand Down
6 changes: 3 additions & 3 deletions packages/font-glyphs/src/letter/latin-ext/eth.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ glyph-block Letter-Latin-Eth : begin

define [ArcStartKnots] : list
widths.lhs fine
straight.up.mid (RightSB - OX - [HSwToV (Stroke - fine)]) yMid2
straight.up.mid (RightSB - OX - [HSwToV : Stroke - fine]) yMid2
arch.lhs yMid (swBefore -- fine)
g4 (SB + OX) [YSmoothMidL yMid 0 SmallArchDepthA SmallArchDepthB]
arch.lhs 0
Expand All @@ -34,7 +34,7 @@ glyph-block Letter-Latin-Eth : begin
create-glyph 'dInsular.straight-bar' : glyph-proc
include : MarkSet.b
local yMockBarStart : yMid2 + Stroke * 0.3
local xTerminal : [mix SB RightSB 0.4] + [HSwToV : 0.5 * Stroke]
local xTerminal : [mix SB RightSB 0.4] + [HSwToV HalfStroke]
local pStraightBarStart : 0.75 - (Stroke / Ascender)
include : intersection [MaskBelow Ascender] : dispiro
ArcStartKnots
Expand All @@ -46,7 +46,7 @@ glyph-block Letter-Latin-Eth : begin

derive-composites 'eth' 0xF0 'dInsular' : dispiro
widths.center OverlayStroke
flat [mix SB RightSB 0.1] [mix XH Ascender (-0.05)]
flat [mix SB RightSB 0.1] [mix XH Ascender (-0.05)]
curl [mix SB RightSB 0.95] [mix XH Ascender 0.35]

create-glyph 'DInsular' 0xA779 : glyph-proc
Expand Down
6 changes: 3 additions & 3 deletions packages/font-glyphs/src/letter/latin-ext/ezh.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ glyph-block Letter-Latin-Ezh : begin
corner ezhLeft yMidBar [widths.lhs : VSwToH sw]

define [CurisveStart df top bot ezhLeft ezhRight yMidBar sw hook] : glyph-proc
define hookTerminalWidth : [AdviceStroke 3.5] / Stroke * sw
define hookTerminalWidth : sw * ([AdviceStroke 3.5] / Stroke)
define xDiagWidth : 1 * sw
define yFootHeight : [Math.max (0.15 * (top - bot)) (sw * 0.625)] + 0.4 * sw
define yHookDepth : hook + sw * 0.25
Expand Down Expand Up @@ -171,7 +171,7 @@ glyph-block Letter-Latin-Ezh : begin
terminalShape -- CurlyTailTerminalShape

create-glyph "ezhRetroflexHook.\(suffix)" : glyph-proc
include : MarkSet.p
include : MarkSet.e
include : EzhShape [DivFrame 1] XH 0
isCursive -- isCursive
isSerifed -- isSerifed
Expand Down Expand Up @@ -218,7 +218,7 @@ glyph-block Letter-Latin-Ezh : begin

create-glyph "ezhRetroflexHook/phoneticRight.\(suffix)" : glyph-proc
include : MarkSet.p
local b : Math.min (O - SHook) ((-LongVJut) + 0.25 * Stroke)
local b : Math.min (O - SHook) ((-LongVJut) + QuarterStroke)
include : EzhShape [DivFrame 1] XH b
pLeft -- (4/15)
isCursive -- isCursive
Expand Down
8 changes: 4 additions & 4 deletions packages/font-glyphs/src/letter/latin-ext/insular-g.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ glyph-block Letter-Latin-Insular-G : begin
local fallArcShape : list {0.25 0.1} {0.5 0.21} {0.75 0.38}

local xFirstTurn : [mix SB RightSB 0.3] + [if SLAB 0.75 0.5] * [HSwToV Stroke]
local xIntersection : [mix xFirstTurn RightSB 0.3] - [HSwToV : 0.5 * Stroke]
local xIntersection : [mix xFirstTurn RightSB 0.3] - [HSwToV HalfStroke]

local yIntersection : [mix bot top 0.55] - 0.25 * Stroke
local yIntersection : [mix bot top 0.55] - QuarterStroke
local yFirstTurn : [mix yIntersection top 0.32] - 0.2 * Stroke
local yBottomRingLeft : [mix bot yIntersection (0.875 * pl)] + 0.25 * Stroke
local yBottomRingRight : [mix bot yIntersection (0.875 * pr)] + 0.25 * Stroke
local yBottomRingLeft : [mix bot yIntersection (0.875 * pl)] + QuarterStroke
local yBottomRingRight : [mix bot yIntersection (0.875 * pr)] + QuarterStroke
local yPhantomBowlEnd : mix bot yIntersection 1.2

include : HBar.t SB RightSB top
Expand Down
Loading
Loading