Skip to content

Commit

Permalink
Add italic form for cyrl/ge.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcwilliams403 committed Jan 22, 2025
1 parent d81c034 commit 03aaaf8
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 52 deletions.
1 change: 1 addition & 0 deletions changes/32.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
- VERTICAL RESISTOR SEGMENT (`U+1CC0A`).
- HORIZONTAL ZIGZAG LINE (`U+1CEB0`).
* Optimize metrics for bowl of Cyrillic Lower Ef (`ф`) and Greek Small Letter Phi Symbol (`ϕ`).
* Add italic form for Cyrillic Small Letter Ghe with Upturn (`ґ`).
35 changes: 19 additions & 16 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 : QuarterStroke - LongVJut
local BottomExtension : (-LongVJut) + QuarterStroke

glyph-block-export CyrDeBottom
define [CyrDeBottom left right _sw _desc] : glyph-proc
Expand All @@ -30,7 +30,7 @@ glyph-block Letter-Cyrillic-De : begin
VBar.r (right + descenderOverflow) desc 0.1 swOuter

glyph-block-export CyrDeShape
define [CyrDeShape top left right _sw _desc] : glyph-proc
define [CyrDeShape top left right _sw _desc fLower] : glyph-proc
local descenderOverflow : if SLAB SideJut ((right - left) * 0.075)
local xTopLeft : mix left right : StrokeWidthBlend 0.15 0.1
local xTopRight : mix left right : StrokeWidthBlend 0.95 0.96
Expand All @@ -50,13 +50,15 @@ glyph-block Letter-Cyrillic-De : begin
include : if SLAB
then : dispiro
widths.rhs swOuter
flat (xTopLeft - descenderOverflow) top
curl (xTopRight + descenderOverflow) top
flat (xTopLeft - descenderOverflow) top
if (fLower && para.isItalic)
then : list : curl xTopRight top [heading Rightward]
else : list : curl (xTopRight + descenderOverflow) top
else : HBar.t xTopLeft xTopRight top swOuter

return : object desc xTopLeft xTopRight

define [CyrSoftDeShape df top _sw vSlab] : glyph-proc
define [CyrSoftDeShape df top _sw _desc fLower vSlab] : glyph-proc
local descenderOverflow : if SLAB SideJut ((df.rightSB - df.leftSB) * 0.075)
local sw : fallback _sw Stroke
local xm : if SLAB
Expand All @@ -65,9 +67,9 @@ glyph-block Letter-Cyrillic-De : begin
local xTopRight : mix df.leftSB xm : StrokeWidthBlend 0.95 0.96
local xTopBarRightEnd : mix df.width df.rightSB : if vSlab 0.25 0.375

include : CyrDeShape top df.leftSB xm sw
include : CyrDeShape top df.leftSB xm sw _desc fLower

include : if SLAB
include : if (SLAB && !(fLower && para.isItalic))
then : HBar.t (xTopRight + descenderOverflow) xTopBarRightEnd top sw
else : HBar.t xTopRight xTopBarRightEnd top sw

Expand All @@ -85,33 +87,33 @@ glyph-block Letter-Cyrillic-De : begin

create-glyph 'cyrl/deLongLeg' 0x1C81 : glyph-proc
include : MarkSet.p
include : CyrDeShape XH SB RightSB Stroke Descender
include : CyrDeShape XH SB RightSB nothing Descender true

create-glyph 'cyrl/DeSoft.serifless' : glyph-proc
local df : include : DivFrame para.diversityM 3
include : df.markSet.capital
include : ExtendBelowBaseAnchors BottomExtension
include : CyrSoftDeShape df CAP df.mvs false
include : CyrSoftDeShape df CAP df.mvs nothing false false

create-glyph 'cyrl/DeSoft.topRightSerifed' : glyph-proc
local df : include : DivFrame para.diversityM 3
include : df.markSet.capital
include : ExtendBelowBaseAnchors BottomExtension
include : CyrSoftDeShape df CAP df.mvs true
include : CyrSoftDeShape df CAP df.mvs nothing false true

select-variant 'cyrl/DeSoft' 0xA662 (follow -- 'cyrl/EnGhe/GhePart')

create-glyph 'cyrl/deSoft.serifless' : glyph-proc
local df : include : DivFrame para.diversityM 3
include : df.markSet.e
include : ExtendBelowBaseAnchors BottomExtension
include : CyrSoftDeShape df XH df.mvs false
include : CyrSoftDeShape df XH df.mvs nothing true false

create-glyph 'cyrl/deSoft.topRightSerifed' : glyph-proc
local df : include : DivFrame para.diversityM 3
include : df.markSet.e
include : ExtendBelowBaseAnchors BottomExtension
include : CyrSoftDeShape df XH df.mvs true
include : CyrSoftDeShape df XH df.mvs nothing true true

select-variant 'cyrl/deSoft' 0xA663 (follow -- 'cyrl/enghe/ghePart')

Expand Down Expand Up @@ -170,8 +172,9 @@ glyph-block Letter-Cyrillic-De : begin
g4 (left + sw * 1.1) Ascender

create-glyph 'cyrl/de.italic' : glyph-proc
include : MarkSet.b
include : CyrDeItalicShapeT dispiro [DivFrame 1]
local df : include : DivFrame 1
include : df.markSet.b
include : CyrDeItalicShapeT dispiro df

foreach { suffix { st sb }} [Object.entries EpsilonConfig] : do
create-glyph "cyrl/dzze.italic.\(suffix)" : glyph-proc
Expand All @@ -192,6 +195,6 @@ glyph-block Letter-Cyrillic-De : begin
stroke -- df.mvs
include : union [ze.Shape] [ze.AutoEndSerifL]

select-variant 'cyrl/Dzze' 0xA688 (follow -- 'cyrl/ZeBottomSerifOnly')
select-variant 'cyrl/Dzze' 0xA688 (follow -- 'cyrl/ZeBottomSerifOnly')
select-variant 'cyrl/dzze.upright' (follow -- 'cyrl/zeBottomSerifOnly')
select-variant 'cyrl/dzze.italic' (follow -- 'cyrl/zeBottomSerifOnly')
select-variant 'cyrl/dzze.italic' (follow -- 'cyrl/zeBottomSerifOnly')
24 changes: 12 additions & 12 deletions packages/font-glyphs/src/letter/cyrillic/el.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@ glyph-block Letter-Cyrillic-El : begin
local xm : df.middle + [HSwToV : 0.5 * df.mvs]
include : CyrElShape df.leftSB xm CAP BODY-NONE [if SLAB SLAB-ALL SLAB-NONE] 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
local sf2 : [SerifFrame.fromDf df (CAP / 2) 0].slice 1 2
if SLAB : include sf2.rt.full

Expand All @@ -173,12 +173,12 @@ glyph-block Letter-Cyrillic-El : begin
local xm : df.middle + [HSwToV : 0.5 * df.mvs]
include : CyrElShape df.leftSB xm XH BODY-NONE [if SLAB [if para.isItalic SLAB-LOWER SLAB-ALL] SLAB-NONE] 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 -- XH
yend -- (XH / 2)
ada -- (SmallArchDepthA * 0.6 * df.div)
adb -- (SmallArchDepthB * 0.6 * df.div)
sw -- df.mvs
yend -- (XH / 2)
ada -- (SmallArchDepthA * 0.6 * df.div)
adb -- (SmallArchDepthB * 0.6 * df.div)
sw -- df.mvs
local sf2 : [SerifFrame.fromDf df (XH / 2) 0].slice 1 2
if SLAB : include sf2.rt.full
1 change: 1 addition & 0 deletions packages/font-glyphs/src/letter/cyrillic/orthography.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ glyph-block Letter-Cyrillic-Orthography : begin
orthographic-italic 'cyrl/dzhe' 0x45F
orthographic-italic 'cyrl/yat' 0x463
orthographic-italic 'cyrl/iShortTail' 0x48B
orthographic-italic 'cyrl/ge' 0x491
orthographic-italic 'cyrl/ghayn' 0x493
orthographic-italic 'cyrl/peMidHook' 0x4A7
orthographic-italic 'cyrl/teDescender' 0x4AD
Expand Down
4 changes: 2 additions & 2 deletions packages/font-glyphs/src/letter/greek/lower-gamma.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ glyph-block Letter-Greek-Lower-Gamma : begin
local xMid : [mix SB RightSB 0.46] + [HSwToV : 0.46 * swEqv]
local xStart : SB + [HSwToV : 0.4 * swEqv]

include : HBar.t (xStart - BBD) (xStart + (cor - 1) * BBD) XH BBS
include : HBar.b (xMid - BBD) (xMid) Descender BBS
include : HBar.t (xStart - BBD) (xStart + (cor - 1) * BBD) XH BBS
include : HBar.b (xMid - BBD) (xMid) Descender BBS

foreach {ob ot} [items-of {{ 0 (cor - 1) } { (-1) (-1) }}] : include : dispiro
g4 (xStart + ot * BBD) XH [widths.rhs.heading BBS Downward]
Expand Down
31 changes: 16 additions & 15 deletions packages/font-glyphs/src/letter/greek/pi.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,16 @@ glyph-block Letter-Greek-Pi : begin
local sf : SerifFrame top bottom (df.leftSB + shrink) (df.rightSB - shrink) (swRef -- fine)
include : composite-proc sf.lt.outer sf.rt.outer sf.lb.full sf.rb.full

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
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

create-glyph 'grek/Pi' 0x3A0 : glyph-proc
include : MarkSet.capital
include : PiShape [DivFrame 1] CAP 0 (shrinkRate -- 0) (doSerif -- SLAB)

alias 'cyrl/Pe' 0x41F 'grek/Pi'

create-glyph 'grek/smcpPi' 0x1D28 : glyph-proc
include : MarkSet.e
include : PiShape [DivFrame 1] XH 0 (shrinkRate -- 0) (doSerif -- SLAB)

create-glyph 'mathbb/grek/Pi' 0x213F : glyph-proc
include : MarkSet.capital
include : MathBBPiShape [DivFrame 1] CAP 0 (shrinkRate -- 0)

create-glyph 'cyrl/pe.upright' : glyph-proc
include : MarkSet.e
include : PiShape [DivFrame 1] XH 0 (shrinkRate -- 0) (doSerif -- SLAB)
Expand All @@ -68,10 +58,6 @@ glyph-block Letter-Greek-Pi : begin

select-variant 'grek/pi' 0x3C0

create-glyph 'mathbb/grek/pi' 0x213C : glyph-proc
include : MarkSet.e
include : MathBBPiShape [DivFrame 1] XH 0 (shrinkRate -- 0.06)

define [CyrlPeHookShape df top] : glyph-proc
local xm : df.middle + [HSwToV : 0.5 * df.mvs]
include : HBar.t df.leftSB xm top df.mvs
Expand Down Expand Up @@ -102,3 +88,18 @@ glyph-block Letter-Greek-Pi : begin
define df : include : DivFrame para.diversityMM 3
include : df.markSet.p
include : CyrlPeHookShape df XH

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
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

create-glyph 'mathbb/grek/Pi' 0x213F : glyph-proc
include : MarkSet.capital
include : MathBBPiShape [DivFrame 1] CAP 0 (shrinkRate -- 0)

create-glyph 'mathbb/grek/pi' 0x213C : glyph-proc
include : MarkSet.e
include : MathBBPiShape [DivFrame 1] XH 0 (shrinkRate -- 0.06)
24 changes: 17 additions & 7 deletions packages/font-glyphs/src/letter/greek/upper-gamma.ptl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
$$include '../../meta/macros.ptl'

import [mix linreg clamp fallback] from "@iosevka/util"
import [Point] from "@iosevka/geometry/point"
import [MathSansSerif] from "@iosevka/glyph/relation"
import [DesignParameters] from "../../meta/aesthetics.mjs"

Expand All @@ -9,7 +10,7 @@ glyph-module
glyph-block Letter-Greek-Upper-Gamma: begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : CyrDescender MidHook
glyph-block-import Letter-Shared-Shapes : CyrDescender MidHook LegShape
glyph-block-import Letter-Shared-Shapes : LetterBarOverlay PalatalHook
glyph-block-import Letter-Blackboard : BBS BBD BBBarLeft
glyph-block-import Letter-Latin-Upper-F : xMidBarShrink
Expand All @@ -23,8 +24,8 @@ glyph-block Letter-Greek-Upper-Gamma: begin
define GammaBarLeft : SB * 1.5
define [GammaShape top bot slabType] : glyph-proc
include : LeaningAnchor.Below.VBar.l GammaBarLeft
include : VBar.l GammaBarLeft bot top
include : HBar.t (GammaBarLeft - O) (RightSB - OX) top
include : tagged 'strokeV' : VBar.l GammaBarLeft bot top
include : tagged 'strokeH' : HBar.t (GammaBarLeft - O) (RightSB - OX) top
match slabType
[Just SLAB-ALL] : begin
include : HSerif.lt GammaBarLeft top SideJut
Expand Down Expand Up @@ -95,13 +96,21 @@ glyph-block Letter-Greek-Upper-Gamma: begin
eject-contour 'serifRT'
include : VBar.r (RightSB - OX) CAP (CAP + LongVJut - QuarterStroke) VJutStroke

create-glyph "cyrl/ge.\(suffix)" : glyph-proc
create-glyph "cyrl/ge.upright.\(suffix)" : glyph-proc
include : MarkSet.e
include : ExtendAboveBaseAnchors (XH + LongVJut - QuarterStroke)
include : GammaShape XH 0 slabType
eject-contour 'serifRT'
include : VBar.r (RightSB - OX) XH (XH + LongVJut - QuarterStroke) VJutStroke
if para.isItalic : eject-contour 'serifLB'

create-glyph "cyrl/ge.italic.\(suffix)" : glyph-proc
include [refer-glyph "cyrl/ge.upright.\(suffix)"] AS_BASE ALSO_METRICS
eject-contour 'serifLB'
eject-contour 'strokeV'
include : LegShape
ztop -- [Point.fromXY Point.Type.Corner GammaBarLeft XH]
zbot -- [Point.fromXY Point.Type.Corner [mix SB 0 : if doST 1 0.75] 0]
xb -- GammaBarLeft

create-glyph "cyrl/GheMidHook.\(suffix)" : glyph-proc
include [refer-glyph "grek/Gamma.\(suffix)"] AS_BASE ALSO_METRICS
Expand Down Expand Up @@ -135,9 +144,10 @@ glyph-block Letter-Greek-Upper-Gamma: begin
select-variant 'cyrl/ghe.upright'
select-variant 'cyrl/gheDescender.upright' (follow -- 'cyrl/ghe.upright')
select-variant 'cyrl/gheDHook.upright' (follow -- 'cyrl/ghe.upright')
select-variant 'grek/smcpGamma' 0x1D26 (shapeFrom -- 'cyrl/ghe.upright') (follow -- 'grek/Gamma')
select-variant 'cyrl/ge' 0x491
select-variant 'cyrl/ge.upright' (follow -- 'cyrl/ge')
select-variant 'cyrl/ge.italic' (follow -- 'cyrl/ge')
select-variant 'cyrl/gheMidHook' 0x495 (follow -- 'cyrl/ghe.upright')
select-variant 'grek/smcpGamma' 0x1D26 (shapeFrom -- 'cyrl/ghe.upright') (follow -- 'grek/Gamma')

select-variant 'grek/Digamma' 0x3DC (follow -- 'grek/Gamma')

Expand Down

0 comments on commit 03aaaf8

Please sign in to comment.