Optimize closed epsilon shapes under heavier weights. (#2534)

* Optimize closed epsilon shapes for heavier weights

* Unify parameters between beta symbol and beta.
This commit is contained in:
John McWilliams 2024-10-06 16:24:11 -04:00 committed by GitHub
parent a03ee9ff6e
commit b5acd21122
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 85 additions and 64 deletions

View file

@ -1 +1,5 @@
* Optimize glyphs for `rounded-serifless` and `rounded-serifed` variants for Capital Eszett (`ẞ`). * Optimize glyphs for `rounded-serifless` and `rounded-serifed` variants for Capital Eszett (`ẞ`).
* Optimize glyphs for closed epsilon shapes (`U+025E`, `U+029A`).
* Optimize glyphs for cursive variants for Greek Lower Beta (`β`) and Cyrillic Lower Ve (`в`).
* Optimize glyphs for Volapük Ae/Oe/Ue (`U+A79A`..`U+A79F`).
* Optimize glyph for Cyrillic Lower Dzze (`U+A689`) under italics.

View file

@ -183,10 +183,12 @@ glyph-block Letter-Cyrillic-De : begin
local xZeLeft : dfLeft.leftSB + df.width - dfLeft.width + OX local xZeLeft : dfLeft.leftSB + df.width - dfLeft.width + OX
local xZeRight : dfLeft.rightSB + df.width - dfLeft.width - OX local xZeRight : dfLeft.rightSB + df.width - dfLeft.width - OX
local ze : CyrZe 1 sb XH Descender local ze : CyrZe 1 sb XH Descender
left -- xZeLeft left -- xZeLeft
right -- xZeRight right -- xZeRight
hook -- Hook blend -- 0.7
stroke -- df.mvs hook -- Hook
overflow -- 0
stroke -- df.mvs
include : union [ze.Shape] [ze.AutoEndSerifL] include : union [ze.Shape] [ze.AutoEndSerifL]
select-variant 'cyrl/Dzze' 0xA688 (follow -- 'cyrl/ZeBottomSerifOnly') select-variant 'cyrl/Dzze' 0xA688 (follow -- 'cyrl/ZeBottomSerifOnly')

View file

@ -28,16 +28,16 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
define CLOSED-STEM 8 define CLOSED-STEM 8
define StdBlend 0.65 define StdBlend 0.65
define VolBlend 0.52 define VolBlend 0.56
define [SmallEpsilon] : with-params [ define [SmallEpsilon] : with-params [
slabTop slabBot top bot slabTop slabBot top bot
[blend StdBlend] [hook Hook] [blend StdBlend] [hook Hook]
[stroke : AdviceStroke2 2 3 (top - bot)] [overflow : HSwToV stroke]
[ada2 SmallArchDepthA] [adb2 SmallArchDepthB] [ada2 SmallArchDepthA] [adb2 SmallArchDepthB]
] : namespace ] : namespace
export : define [Dim] : begin export : define [Dim] : begin
local stroke : AdviceStroke2 2 3 (top - bot) local midx : mix (SB + [HSwToV stroke] - overflow) (RightSB - [HSwToV stroke] + overflow) blend
local midx : mix SB RightSB blend
local midy : mix bot top OverlayPos local midy : mix bot top OverlayPos
local topHeight : top - bot local topHeight : top - bot
local midyHeight : midy - bot local midyHeight : midy - bot
@ -101,12 +101,13 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
glyph-block-export CyrZe glyph-block-export CyrZe
define [CyrZe] : with-params [ define [CyrZe] : with-params [
slabTop slabBot top bot [left SB] [right RightSB] slabTop slabBot top bot
[blend StdBlend] [hook Hook] [stroke : AdviceStroke2 2 3 (top - bot)] [left SB] [right RightSB] [blend StdBlend] [hook Hook]
[stroke : AdviceStroke2 2 3 (top - bot)] [overflow : HSwToV stroke]
[xo OX] [yo O] [op OverlayPos] [ada2 SmallArchDepthA] [adb2 SmallArchDepthB] [xo OX] [yo O] [op OverlayPos] [ada2 SmallArchDepthA] [adb2 SmallArchDepthB]
] : namespace ] : namespace
export : define [Dim] : begin export : define [Dim] : begin
local midx : mix right left blend local midx : mix (right - [HSwToV stroke] + overflow) (left + [HSwToV stroke] - overflow) blend
local midy : mix bot top op local midy : mix bot top op
local topHeight : top - bot local topHeight : top - bot
local midyHeight : midy - bot local midyHeight : midy - bot
@ -268,7 +269,7 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
create-glyph "cyrl/dzjeKomi.\(suffix)" : glyph-proc create-glyph "cyrl/dzjeKomi.\(suffix)" : glyph-proc
include : MarkSet.e include : MarkSet.e
local ze : CyrZe slabTop OPEN-VERTICAL XH 0 (hok -- SHook) local ze : CyrZe slabTop OPEN-VERTICAL XH 0 (hoоk -- SHook)
include : ze.Shape include : ze.Shape
include : ze.AutoStartSerifL include : ze.AutoStartSerifL
include : CyrDescender.rSideJut (RightSB - OX * 2) 0 include : CyrDescender.rSideJut (RightSB - OX * 2) 0
@ -335,35 +336,41 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
create-glyph 'epsilonClosed' 0x29A : glyph-proc create-glyph 'epsilonClosed' 0x29A : glyph-proc
include : MarkSet.e include : MarkSet.e
local eps : SmallEpsilon CLOSED-CIRCLE CLOSED-CIRCLE XH 0 local eps : SmallEpsilon CLOSED-CIRCLE CLOSED-CIRCLE XH 0
hook -- SHook blend -- 0.7
ada2 -- SmallArchDepthA hook -- SHook
adb2 -- SmallArchDepthB overflow -- 0
ada2 -- SmallArchDepthA
adb2 -- SmallArchDepthB
include : eps.Shape include : eps.Shape
create-glyph 'epsilonRevClosed' 0x25E : glyph-proc create-glyph 'epsilonRevClosed' 0x25E : glyph-proc
include : MarkSet.e include : MarkSet.e
local ze : CyrZe CLOSED-CIRCLE CLOSED-CIRCLE XH 0 local ze : CyrZe CLOSED-CIRCLE CLOSED-CIRCLE XH 0
hook -- SHook blend -- 0.7
ada2 -- SmallArchDepthA hook -- SHook
adb2 -- SmallArchDepthB overflow -- 0
ada2 -- SmallArchDepthA
adb2 -- SmallArchDepthB
include : ze.Shape include : ze.Shape
create-glyph 'OeVolapuk' 0xA79C : glyph-proc create-glyph 'OeVolapuk' 0xA79C : glyph-proc
include : MarkSet.capital include : MarkSet.capital
local eps : SmallEpsilon CLOSED-CIRCLE CLOSED-CIRCLE CAP 0 local eps : SmallEpsilon CLOSED-CIRCLE CLOSED-CIRCLE CAP 0
blend -- VolBlend blend -- VolBlend
hook -- Hook hook -- Hook
ada2 -- ArchDepthA overflow -- 0
adb2 -- ArchDepthB ada2 -- ArchDepthA
adb2 -- ArchDepthB
include : eps.Shape include : eps.Shape
create-glyph 'oeVolapuk' 0xA79D : glyph-proc create-glyph 'oeVolapuk' 0xA79D : glyph-proc
include : MarkSet.e include : MarkSet.e
local eps : SmallEpsilon CLOSED-CIRCLE CLOSED-CIRCLE XH 0 local eps : SmallEpsilon CLOSED-CIRCLE CLOSED-CIRCLE XH 0
blend -- VolBlend blend -- VolBlend
hook -- SHook hook -- SHook
ada2 -- SmallArchDepthA overflow -- 0
adb2 -- SmallArchDepthB ada2 -- SmallArchDepthA
adb2 -- SmallArchDepthB
include : eps.Shape include : eps.Shape
do "Volapuk AE" do "Volapuk AE"
@ -371,30 +378,33 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
define [FullBarBody df height bar hook ada2 adb2] : glyph-proc define [FullBarBody df height bar hook ada2 adb2] : glyph-proc
local eps : SmallEpsilon CLOSED-STEM CLOSED-STEM height 0 local eps : SmallEpsilon CLOSED-STEM CLOSED-STEM height 0
blend -- VolBlend blend -- VolBlend
hook -- hook hook -- hook
ada2 -- ada2 overflow -- 0
adb2 -- adb2 ada2 -- ada2
adb2 -- adb2
define [object stroke] : eps.Dim define [object stroke] : eps.Dim
include : eps.Shape include : eps.Shape
include : bar df height no-shape stroke include : bar df height no-shape stroke
define [EarlessCornerBody df height bar hook ada2 adb2] : glyph-proc define [EarlessCornerBody df height bar hook ada2 adb2] : glyph-proc
local eps : SmallEpsilon SLAB-INWARD CLOSED-STEM height 0 local eps : SmallEpsilon SLAB-INWARD CLOSED-STEM height 0
blend -- VolBlend blend -- VolBlend
hook -- hook hook -- hook
ada2 -- ada2 overflow -- 0
adb2 -- adb2 ada2 -- ada2
adb2 -- adb2
define [object stroke] : eps.Dim define [object stroke] : eps.Dim
include : eps.Shape include : eps.Shape
include : bar df (height - DToothlessRise) no-shape stroke include : bar df (height - DToothlessRise) no-shape stroke
define [EarlessRoundedBody df height bar hook ada2 adb2] : glyph-proc define [EarlessRoundedBody df height bar hook ada2 adb2] : glyph-proc
local eps : SmallEpsilon CLOSED-ROUND CLOSED-STEM height 0 local eps : SmallEpsilon CLOSED-ROUND CLOSED-STEM height 0
blend -- VolBlend blend -- VolBlend
hook -- hook hook -- hook
ada2 -- ada2 overflow -- 0
adb2 -- adb2 ada2 -- ada2
adb2 -- adb2
define [object stroke] : eps.Dim define [object stroke] : eps.Dim
include : eps.Shape include : eps.Shape
include : bar df (height - adb2) no-shape stroke include : bar df (height - adb2) no-shape stroke
@ -431,10 +441,11 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
define [UToothed df height slab hook ada2 adb2] : glyph-proc define [UToothed df height slab hook ada2 adb2] : glyph-proc
set-base-anchor 'trailing' df.rightSB 0 set-base-anchor 'trailing' df.rightSB 0
local eps : SmallEpsilon OPEN-VERTICAL CLOSED-STEM height 0 local eps : SmallEpsilon OPEN-VERTICAL CLOSED-STEM height 0
blend -- VolBlend blend -- VolBlend
hook -- hook hook -- hook
ada2 -- ada2 overflow -- 0
adb2 -- adb2 ada2 -- ada2
adb2 -- adb2
define [object stroke] : eps.Dim define [object stroke] : eps.Dim
include : eps.Shape include : eps.Shape
include : VBar.r df.rightSB 0 height stroke include : VBar.r df.rightSB 0 height stroke
@ -443,10 +454,11 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
define [UTailed df height slab hook ada2 adb2] : glyph-proc define [UTailed df height slab hook ada2 adb2] : glyph-proc
set-base-anchor 'trailing' (df.rightSB + SideJut) 0 set-base-anchor 'trailing' (df.rightSB + SideJut) 0
local eps : SmallEpsilon OPEN-VERTICAL CLOSED-STEM height 0 local eps : SmallEpsilon OPEN-VERTICAL CLOSED-STEM height 0
blend -- VolBlend blend -- VolBlend
hook -- hook hook -- hook
ada2 -- ada2 overflow -- 0
adb2 -- adb2 ada2 -- ada2
adb2 -- adb2
define [object stroke] : eps.Dim define [object stroke] : eps.Dim
include : eps.Shape include : eps.Shape
include : RightwardTailedBar df.rightSB 0 height stroke include : RightwardTailedBar df.rightSB 0 height stroke
@ -454,10 +466,11 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
define [UToothlessRounded df height slab hook ada2 adb2] : glyph-proc define [UToothlessRounded df height slab hook ada2 adb2] : glyph-proc
local eps : SmallEpsilon OPEN-VERTICAL CLOSED-ROUND height 0 local eps : SmallEpsilon OPEN-VERTICAL CLOSED-ROUND height 0
blend -- VolBlend blend -- VolBlend
hook -- hook hook -- hook
ada2 -- ada2 overflow -- 0
adb2 -- adb2 ada2 -- ada2
adb2 -- adb2
define [object stroke] : eps.Dim define [object stroke] : eps.Dim
include : eps.Shape include : eps.Shape
include : VBar.r df.rightSB ada2 height stroke include : VBar.r df.rightSB ada2 height stroke
@ -465,10 +478,11 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
define [UToothlessCorner df height slab hook ada2 adb2] : glyph-proc define [UToothlessCorner df height slab hook ada2 adb2] : glyph-proc
local eps : SmallEpsilon OPEN-VERTICAL SLAB-INWARD height 0 local eps : SmallEpsilon OPEN-VERTICAL SLAB-INWARD height 0
blend -- VolBlend blend -- VolBlend
hook -- hook hook -- hook
ada2 -- ada2 overflow -- 0
adb2 -- adb2 ada2 -- ada2
adb2 -- adb2
define [object stroke] : eps.Dim define [object stroke] : eps.Dim
include : eps.Shape include : eps.Shape
include : VBar.r df.rightSB DToothlessRise height stroke include : VBar.r df.rightSB DToothlessRise height stroke

View file

@ -190,25 +190,26 @@ glyph-block Letter-Latin-Upper-B : begin
define [CursiveCyrveShape top] : glyph-proc define [CursiveCyrveShape top] : glyph-proc
local stroke : AdviceStroke2 2 3 top local stroke : AdviceStroke2 2 3 top
local mid : mix RightSB SB 0.65
local midy : top * HBarPos
local adb : top - [mix (midy + stroke / 2) (top - O - stroke) (ArchDepthA / (ArchDepthA + ArchDepthB))] + [HSwToV TanSlope] * stroke
local ada : [mix (stroke + O) (midy - stroke / 2) (ArchDepthA / (ArchDepthA + ArchDepthB))] - [HSwToV TanSlope] * stroke
local fine : stroke * CThin local fine : stroke * CThin
local yMiddle : top * HBarPos
local adb : top - [mix (yMiddle + stroke / 2) (top - O - stroke) (ArchDepthA / (ArchDepthA + ArchDepthB))] + [HSwToV TanSlope] * stroke
local ada : [mix (stroke + O) (yMiddle - stroke / 2) (ArchDepthA / (ArchDepthA + ArchDepthB))] - [HSwToV TanSlope] * stroke
local xMidLeft : mix (RightSB - [HSwToV stroke]) (SB + [HSwToV stroke]) 0.7
local xMidArc : Math.max [mix xMidLeft RightSB 0.1] [mix SB RightSB 0.5]
include : dispiro include : dispiro
widths.lhs fine widths.lhs fine
flat mid (midy - (fine - stroke / 2)) [heading Rightward] flat xMidLeft (yMiddle - (fine - stroke / 2)) [heading Rightward]
curl Middle (midy - (fine - stroke / 2)) [heading Rightward] curl xMidArc (yMiddle - (fine - stroke / 2)) [heading Rightward]
archv archv
g4 (RightSB - (OX - O)) (top - adb) [widths.lhs stroke] g4 (RightSB - (OX - O)) (top - adb) [widths.lhs stroke]
arch.lhs top arch.lhs top
flat (SB + O) (top - SmallArchDepthA) flat (SB + O) (top - SmallArchDepthA)
curl (SB + O) SmallArchDepthB curl (SB + O) (0 + SmallArchDepthB)
arch.lhs 0 arch.lhs 0
g4 (RightSB - (OX - O) - O * 2) (ada) g4 (RightSB - (OX + O)) (0 + ada)
arcvh arcvh
flat Middle (midy + (fine - stroke / 2)) [widths.heading fine 0 Leftward] flat xMidArc (yMiddle + (fine - stroke / 2)) [widths.heading fine 0 Leftward]
curl mid (midy + (fine - stroke / 2)) [widths.heading fine 0 Leftward] curl xMidLeft (yMiddle + (fine - stroke / 2)) [widths.heading fine 0 Leftward]
create-glyph 'cyrl/ve.cursive' : glyph-proc create-glyph 'cyrl/ve.cursive' : glyph-proc
include : MarkSet.e include : MarkSet.e
@ -241,7 +242,7 @@ glyph-block Letter-Latin-Upper-B : begin
define yMiddle : [mix 0 Ascender pBar] - Stroke * 0.7 # Bottom edge define yMiddle : [mix 0 Ascender pBar] - Stroke * 0.7 # Bottom edge
define ada : ArchDepthAOf (ArchDepth * 0.75) (0.5 * Width) define ada : ArchDepthAOf (ArchDepth * 0.75) (0.5 * Width)
define adb : ArchDepthBOf (ArchDepth * 0.75) (0.5 * Width) define adb : ArchDepthBOf (ArchDepth * 0.75) (0.5 * Width)
define xMidLeft : mix (SB + [HSwToV Stroke]) (RightSB - [HSwToV Stroke]) 0.3 define xMidLeft : mix (RightSB - [HSwToV Stroke]) (SB + [HSwToV Stroke]) 0.7
define xMidArc : Math.max [mix xMidLeft RightSB 0.1] [mix SB RightSB 0.5] define xMidArc : Math.max [mix xMidLeft RightSB 0.1] [mix SB RightSB 0.5]
include : dispiro include : dispiro
widths.rhs widths.rhs