Skip to content

Commit

Permalink
#2539 #2612 fix (#2620)
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis authored Dec 21, 2024
1 parent b79ac38 commit f5fb3d2
Show file tree
Hide file tree
Showing 11 changed files with 103 additions and 52 deletions.
1 change: 1 addition & 0 deletions changes/32.3.0.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
* Make Cyrillic Capital/Small Letter Yn (U+A65E‥U+A65F) to follow Greek Capital Lambda (cv72) instead of V/v. (#2539)
* Make certain M-width characters slightly wider under Quasi-Proportional. Affected characters:
- LATIN CAPITAL LETTER W (`U+0057`).
- LATIN SMALL LETTER M (`U+006D`).
Expand Down
4 changes: 2 additions & 2 deletions packages/font-glyphs/src/letter/cyrillic/big-yus.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ glyph-block Letter-Cyrillic-BigYus : begin
include sf.rb.outer

create-glyph 'cyrl/BigYusIotified' 0x46C : glyph-proc
local df : include : DivFrame (para.diversityM ** 2) 4
local df : include : DivFrame (para.diversityM ** 2) 4.25
include : df.markSet.capital
include : CyrIotifiedBigYusShape true df CAP 0.575

create-glyph 'cyrl/bigYusIotified' 0x46D : glyph-proc
local df : include : DivFrame para.diversityM 4
local df : include : DivFrame para.diversityM 4.25
include : df.markSet.e
include : CyrIotifiedBigYusShape false df XH 0.55
1 change: 1 addition & 0 deletions packages/font-glyphs/src/letter/cyrillic/che.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ glyph-block Letter-Cyrillic-Che : begin
top -- top
bottom -- (bar - DToothlessRise - 0.5 * sw)
sw -- sw
fine -- 0.5 * sw

local xTopBarLeft : df.leftSB - SideJut
local xTopBarRight : mix xTopBarLeft (left + [HSwToV : 0.5 * sw]) 2
Expand Down
12 changes: 10 additions & 2 deletions packages/font-glyphs/src/letter/cyrillic/el.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ glyph-block Letter-Cyrillic-El : begin
include : df.markSet.capDesc

local xm : df.middle + [HSwToV : 0.5 * df.mvs]
include : CyrElShape df.leftSB xm CAP BODY-STRAIGHT [if SLAB SLAB-ALL SLAB-NONE] df.mvs
include : difference
CyrElShape df.leftSB xm CAP BODY-STRAIGHT [if SLAB SLAB-ALL SLAB-NONE] df.mvs
intersection
MaskBelow Stroke
MaskRight [mix xm (df.rightSB - [HSwToV df.mvs]) 0.625]
include : MidHook.m df CAP

create-glyph 'cyrl/ElSoft.serifless' : glyph-proc
Expand Down Expand Up @@ -112,7 +116,11 @@ glyph-block Letter-Cyrillic-El : begin
include : df.markSet.p

local xm : df.middle + [HSwToV : 0.5 * df.mvs]
include : CyrElShape df.leftSB xm XH body [if SLAB [if para.isItalic slabItalic slabUpright] SLAB-NONE] df.mvs
include : difference
CyrElShape df.leftSB xm XH body [if SLAB [if para.isItalic slabItalic slabUpright] SLAB-NONE] df.mvs
intersection
MaskBelow Stroke
MaskRight [mix xm (df.rightSB - [HSwToV df.mvs]) 0.625]
include : MidHook.m df XH

define cyrSoftElDf : DivFrame para.diversityM 3
Expand Down
8 changes: 4 additions & 4 deletions packages/font-glyphs/src/letter/cyrillic/small-yus.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -98,31 +98,31 @@ glyph-block Letter-Cyrillic-SmallYus : begin
include sf.rb.outer

create-glyph : glyph-proc
local df : include : DivFrame (para.diversityM ** 2) 4
local df : include : DivFrame (para.diversityM ** 2) 4.25
include : df.markSet.capital
create-forked-glyph 'cyrl/SmallYusIotified.straight'
CyrIotifiedSmallYusShape false true df CAP true
create-forked-glyph 'cyrl/SmallYusIotified.curly'
CyrIotifiedSmallYusShape false true df CAP false

create-glyph : glyph-proc
local df : include : DivFrame para.diversityM 4
local df : include : DivFrame para.diversityM 4.25
include : df.markSet.e
create-forked-glyph 'cyrl/smallYusIotified.straight'
CyrIotifiedSmallYusShape false false df XH true
create-forked-glyph 'cyrl/smallYusIotified.curly'
CyrIotifiedSmallYusShape false false df XH false

create-glyph : glyph-proc
local df : include : DivFrame para.diversityM 4
local df : include : DivFrame para.diversityM 4.25
include : df.markSet.capital
create-forked-glyph 'cyrl/SmallYusClosedIotified.straight'
CyrIotifiedSmallYusShape true true df CAP true
create-forked-glyph 'cyrl/SmallYusClosedIotified.curly'
CyrIotifiedSmallYusShape true true df CAP false

create-glyph : glyph-proc
local df : include : DivFrame para.diversityM 4
local df : include : DivFrame para.diversityM 4.25
include : df.markSet.e
create-forked-glyph 'cyrl/smallYusClosedIotified.straight'
CyrIotifiedSmallYusShape true false df XH true
Expand Down
4 changes: 3 additions & 1 deletion packages/font-glyphs/src/letter/cyrillic/te-midhook.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ glyph-block Letter-Cyrillic-Te-MidHook : begin
include : VSerif.dr xTopBarRight top VJut

if slabBot : begin
include : HSerif.mb (left + [HSwToV : 0.5 * sw]) 0 Jut
include : intersection
MaskLeft : mix (left + [HSwToV sw]) (df.rightSB - [HSwToV sw]) 0.625
HSerif.mb (left + [HSwToV : 0.5 * sw]) 0 Jut

foreach { suffix { div doST doSB } } [Object.entries TConfig] : do
create-glyph "cyrl/TeMidHook.\(suffix)" : glyph-proc
Expand Down
66 changes: 64 additions & 2 deletions packages/font-glyphs/src/letter/greek/upper-lambda-delta.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ $$include '../../meta/macros.ptl'

import [mix fallback SuffixCfg] from "@iosevka/util"
import [MathSansSerif] from "@iosevka/glyph/relation"
import [bitOr] from "@iosevka/util/mask-bit"
import [bitOr maskBits maskOffBits] from "@iosevka/util/mask-bit"

glyph-module

Expand All @@ -11,7 +11,7 @@ glyph-block Letter-Latin-Upper-Lambda-Delta : begin
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared : CreateTurnedLetter
glyph-block-import Letter-Latin-Upper-A : AShape ASerifs
glyph-block-import Letter-Latin-V : VShapeOutline VShape
glyph-block-import Letter-Latin-V : VShapeOutline VShape VHookRightShape

define SLAB-NONE 0
define SLAB-TOP 1
Expand Down Expand Up @@ -40,6 +40,24 @@ glyph-block Letter-Latin-Upper-Lambda-Delta : begin
include : VShapeOutline df fBarStraight top sw
include : FlipAround df.middle (top / 2)

define flex-params [LambdaHookLeftShape] : glyph-proc
local-parameter : df
local-parameter : fBarStraight
local-parameter : slabKind
local-parameter : top
local-parameter : sw
local-parameter : hookWidthOuter -- (TailX / 3)
local-parameter : hookWidthInner -- (TailX / 3)
include : VHookRightShape
df -- df
fBarStraight -- fBarStraight
top -- top
sw -- sw
hookWidthOuter -- hookWidthOuter
hookWidthInner -- hookWidthInner
include : FlipAround df.middle (top / 2)
include : ASerifs df top sw [maskOffBits slabKind SLAB-LEFT]

foreach { suffix { fStraightBar slabKind } } [Object.entries LambeaConfig] : do
create-glyph "grek/Lambda.\(suffix)" : glyph-proc
include : MarkSet.capital
Expand Down Expand Up @@ -68,13 +86,57 @@ glyph-block Letter-Latin-Upper-Lambda-Delta : begin
top -- XH
sw -- Stroke

create-glyph "cyrl/Yn.\(suffix)" : glyph-proc
include : MarkSet.capDesc
local df : DivFrame 1 3
local vHeight : CAP * 0.875
local sw : AdviceStroke 3

include : with-transform [ApparentTranslate 0 (CAP - vHeight)] : LambdaHookLeftShape
df -- df
fBarStraight -- fStraightBar
slabKind -- slabKind
top -- vHeight
sw -- df.mvs
hookWidthInner -- (TailX / 3 - [HSwToV : 0.25 * df.mvs])

include : dispiro
g4.down.start Middle CAP [widths.center.heading [AdviceStroke 6] Downward]
flat Middle 0 [widths.center.heading df.mvs Downward]
curl Middle Descender [widths.center.heading df.mvs Downward]
if [maskBits slabKind SLAB-RIGHT] : begin
include : HSerif.mb Middle Descender MidJutCenter

create-glyph "cyrl/yn.\(suffix)" : glyph-proc
include : MarkSet.p
local df : DivFrame 1 3
local sw : AdviceStroke 3

include : LambdaHookLeftShape
df -- df
fBarStraight -- fStraightBar
slabKind -- slabKind
top -- XH
sw -- df.mvs
hookWidthInner -- (TailX / 3 - [HSwToV : 0.25 * df.mvs])

include : dispiro
g4.down.start Middle XH [widths.center.heading [AdviceStroke 6] Downward]
flat Middle 0 [widths.center.heading df.mvs Downward]
curl Middle Descender [widths.center.heading df.mvs Downward]
if [maskBits slabKind SLAB-RIGHT] : begin
include : HSerif.mb Middle Descender MidJutCenter

select-variant 'grek/Lambda' 0x39B
link-reduced-variant 'grek/Lambda/sansSerif' 'grek/Lambda' MathSansSerif
select-variant 'grek/smcpLambda' 0x1D27 (follow -- 'grek/Lambda')

alias 'cyrl/El.BGR' null 'grek/Lambda'
select-variant 'cyrl/el.BGR' (follow -- 'grek/Lambda')

select-variant 'cyrl/yn' 0xA65F (follow -- 'grek/Lambda')
select-variant 'cyrl/Yn' 0xA65E (follow -- 'grek/Lambda')

# Delta
glyph-block-export DeltaShape
define [DeltaShape] : with-params [df top sw fBarStraight] : union
Expand Down
9 changes: 5 additions & 4 deletions packages/font-glyphs/src/letter/latin-ext/rams-horn.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ glyph-block Letter-Latin-Rams-Horn : begin
local kIntersection 0.15
local d : 0.25 * (RightSB - SB) * k1 * TanSlope

local sw : AdviceStroke : if SLAB 3 2.75
local fine : AdviceStroke : if SLAB 3.75 3.5
local sw : AdviceStroke : if SLAB 3.50 2.75
local fine : AdviceStroke : if SLAB 3.75 3.50
local coFine : mix sw fine (kIntersection / k2)
local fillOffset : sw * 0.25

Expand All @@ -69,8 +69,9 @@ glyph-block Letter-Latin-Rams-Horn : begin
else : no-shape

if SLAB : begin
include : VSerif.dl SB (top - sw) (VJut * (sw / Stroke) - sw) fine
include : VSerif.dr RightSB (top - sw) (VJut * (sw / Stroke) - sw) fine
local swSlab : AdviceStroke 4.5
include : VSerif.dl SB (top - sw) (VJut * (sw / Stroke) - sw) swSlab
include : VSerif.dr RightSB (top - sw) (VJut * (sw / Stroke) - sw) swSlab

create-glyph 'ramshorn' 0x264 : glyph-proc
include : MarkSet.e
Expand Down
12 changes: 10 additions & 2 deletions packages/font-glyphs/src/letter/latin/upper-h.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,11 @@ glyph-block Letter-Latin-Upper-H : begin

local xm : df.middle + [HSwToV : 0.5 * df.mvs]
include : Body df.leftSB xm CAP df.mvs
include : HSerifs slabType CAP 0 df.leftSB xm df.mvs
include : difference
HSerifs slabType CAP 0 df.leftSB xm df.mvs
intersection
MaskBelow Stroke
MaskRight [mix xm (df.rightSB - [HSwToV df.mvs]) 0.625]
include : MidHook.m df CAP

create-glyph "cyrl/enMidHook.\(suffix)" : glyph-proc
Expand All @@ -237,7 +241,11 @@ glyph-block Letter-Latin-Upper-H : begin

local xm : df.middle + [HSwToV : 0.5 * df.mvs]
include : Body df.leftSB xm XH df.mvs
include : HSerifs slabType XH 0 df.leftSB xm df.mvs
include : difference
HSerifs slabType XH 0 df.leftSB xm df.mvs
intersection
MaskBelow Stroke
MaskRight [mix xm (df.rightSB - [HSwToV df.mvs]) 0.625]
include : MidHook.m df XH

select-variant 'H' 'H'
Expand Down
35 changes: 1 addition & 34 deletions packages/font-glyphs/src/letter/latin/v.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ glyph-block Letter-Latin-V : begin
mix xArcMidBottom xArcRight 0.5
mix O yArcRight : archv.yFromX 0.5 2

glyph-block-export VHookRightShape
define [VHookRightShape] : with-params [df fBarStraight top [sw Stroke] [hookWidthOuter (TailX / 3)] [hookWidthInner (TailX / 3)]] : glyph-proc
include : VShape df fBarStraight top (sw -- sw)
eject-contour 'strokeUp'
Expand Down Expand Up @@ -240,38 +241,6 @@ glyph-block Letter-Latin-V : begin
eject-contour 'serifRT'
include : OShape (Ascender - vPartHeight + Stroke + O) 0 SB RightSB

create-glyph "cyrl/Yn.\(suffix)" : glyph-proc
include : MarkSet.capDesc
local vPartHeight : CAP * 0.875
local sw : AdviceStroke 3

include : with-transform [FlipAround Middle (CAP / 2)] : glyph-proc
include : VHookRightShape [DivFrame 1] fStraightBar vPartHeight (sw -- sw) (hookWidthInner -- (TailX / 3 - [HSwToV : 0.25 * sw]))
include : Serifs [DivFrame 1] fStraightBar vPartHeight
eject-contour 'serifRT'

include : dispiro
g4.down.start Middle CAP [widths.center.heading [AdviceStroke 6] Downward]
flat Middle 0 [widths.center.heading sw Downward]
curl Middle Descender [widths.center.heading sw Downward]
if SLAB : include : HSerif.mb Middle Descender MidJutCenter

create-glyph "cyrl/yn.\(suffix)" : glyph-proc
include : MarkSet.p
local vPartHeight : XH * 1
local sw : AdviceStroke 3

include : with-transform [FlipAround Middle (XH / 2)] : glyph-proc
include : VHookRightShape [DivFrame 1] fStraightBar vPartHeight (sw -- sw) (hookWidthInner -- (TailX / 3 - [HSwToV : 0.25 * sw]))
include : Serifs [DivFrame 1] fStraightBar vPartHeight
eject-contour 'serifRT'

include : dispiro
g4.down.start Middle XH [widths.center.heading [AdviceStroke 6] Downward]
flat Middle 0 [widths.center.heading sw Downward]
curl Middle Descender [widths.center.heading sw Downward]
if SLAB : include : HSerif.mb Middle Descender MidJutCenter

create-glyph "vPalatalHook.\(suffix)" : glyph-proc
include [refer-glyph "v.\(suffix)"] AS_BASE ALSO_METRICS
include : PalatalHook.r
Expand Down Expand Up @@ -311,13 +280,11 @@ glyph-block Letter-Latin-V : begin

select-variant 'vHookRight' 0x2C71 (follow -- 'v/nonCursive')
select-variant 'cyrl/ukUnblended' 0x1C88 (follow -- 'v/nonCursive')
select-variant 'cyrl/yn' 0xA65F (follow -- 'v/nonCursive')

select-variant 'vLoop' 0x2C74

select-variant 'cyrl/Izhitsa' 0x474 (follow -- 'VHookRight') (shapeFrom -- 'VHookRight')
select-variant 'cyrl/Uk' 0xA64A (follow -- 'VHookRight')
select-variant 'cyrl/Yn' 0xA65E (follow -- 'VHookRight')
alias 'cyrl/izhitsa' 0x475 'vHookRight'

CreateTurnedLetter 'turnV' 0x245 'V' HalfAdvance (CAP / 2)
Expand Down
3 changes: 2 additions & 1 deletion packages/font-glyphs/src/letter/shared.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ glyph-block Letter-Shared-Shapes : begin
local-parameter : bottom
local-parameter : adb -- ArchDepthB
local-parameter : sw -- Stroke
local-parameter : fine -- sw

define xMid : mix left right 0.5
define rise DToothlessRise
Expand All @@ -309,7 +310,7 @@ glyph-block Letter-Shared-Shapes : begin
flat left top [widths.lhs.heading sw Downward]
curl left (bottom + adb)
arch.lhs.centerAt.ltr.b (xMid + [HSwToV : 0.2 * sw]) bottom
g4 right (bottom + rise + 0.25 * sw)
g4 right (bottom + rise + 0.25 * sw) [widths.lhs fine]

glyph-block-export : OBarLeft
define OBarLeft : namespace
Expand Down

0 comments on commit f5fb3d2

Please sign in to comment.