Skip to content

Commit

Permalink
Initial cleanup of #2556 . (#2560)
Browse files Browse the repository at this point in the history
* Initial cleanup of #2556 .

* Fix serifs of `լ` under Etoile.

* Optimize side bearings of `Ա`.

* Improve serifs under italics and monospace.
  • Loading branch information
jmcwilliams403 authored Oct 26, 2024
1 parent 69dadb1 commit 7593710
Show file tree
Hide file tree
Showing 12 changed files with 118 additions and 114 deletions.
1 change: 0 additions & 1 deletion packages/font-glyphs/src/letter/armenian/aliases.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ glyph-module
glyph-block Letter-Armenian-Aliases : begin
glyph-block-import Common-Derivatives

alias 'armn/Seh' 0x54D 'U'
alias 'armn/Tiun' 0x54F 'S/sansSerif'
alias 'armn/Piur' 0x553 'grek/Phi'
alias 'armn/Oh' 0x555 'O'
Expand Down
4 changes: 1 addition & 3 deletions packages/font-glyphs/src/letter/armenian/eh-liun-hiun.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ glyph-block Letter-Armenian-Eh-Liun-Hiun : begin
local xMiddle : df.middle - [IBalance2 df]
include : VBar.m xMiddle Descender XH df.mvs
include : HBar.b xMiddle (xMiddle + LongJut * df.div) Descender df.mvs
if SLAB : begin
local sf : SerifFrame.fromDf df XH Descender
include : sf.mt.leftAt xMiddle
if SLAB : include : HSerif.lt xMiddle XH Jut df.mvs

do "Hiun"
create-glyph 'armn/Hiun' 0x552 : glyph-proc
Expand Down
4 changes: 1 addition & 3 deletions packages/font-glyphs/src/letter/armenian/keh.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,4 @@ glyph-block Letter-Armenian-Keh : begin
include : HCrossBar (df.leftSB - jut + [HSwToV : 0.5 * df.mvs]) df.rightSB 0 ostroke
if SLAB : begin
local sf : SerifFrame.fromDf df XH Descender
include sf.lt.outer
if [not para.isItalic] : begin
include sf.lb.full
include : composite-proc sf.lt.outer sf.lb.full
26 changes: 12 additions & 14 deletions packages/font-glyphs/src/letter/armenian/lower-q-group.ptl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$$include '../../meta/macros.ptl'

import [mix linreg clamp fallback] from "@iosevka/util"
import [mix linreg clamp fallback SuffixCfg] from "@iosevka/util"
import [DependentSelector] from "@iosevka/glyph/relation"

glyph-module
Expand All @@ -10,18 +10,16 @@ glyph-block Letter-Armenian-Lower-Q-Group : begin
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : SerifFrame
glyph-block-import Letter-Armenian-Shared-Shapes : ArmHBar
glyph-block-import Letter-Latin-Lower-Q : QConfig

do "Gim"
create-glyph 'armn/gim' 0x563 : glyph-proc
local df : include : DivFrame 1
include : df.markSet.p
include : refer-glyph 'q/tailless'
include : [ArmHBar.right df 0].base
foreach { suffix { Body {terminal fTail} {sRT sRB} } } [Object.entries QConfig] : if [not fTail] : do
create-glyph "armn/gim.\(suffix)" : glyph-proc
include [refer-glyph "q.\(suffix)"] AS_BASE ALSO_METRICS
include : [ArmHBar.right [DivFrame 1] 0].base

do "Za"
create-glyph 'armn/za' 0x566 : glyph-proc
local df : include : DivFrame 1
include : df.markSet.p
include : refer-glyph 'q/tailless'
eject-contour 'serifRB'
include : [ArmHBar.right df 0].desc
if [not sRB] : create-glyph "armn/za.\(suffix)" : glyph-proc
include [refer-glyph "q.\(suffix)"] AS_BASE ALSO_METRICS
include : [ArmHBar.right [DivFrame 1] 0].desc

select-variant 'armn/gim' 0x563 (follow -- 'q/tailless')
select-variant 'armn/za' 0x566 (follow -- 'qRTail')
73 changes: 39 additions & 34 deletions packages/font-glyphs/src/letter/armenian/lower-u-group.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,30 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
include : [ArmHBar.normal df 0].base
if SLAB : begin
local sf : SerifFrame.fromDf df XH Descender
include sf.lt.outer
include : composite-proc sf.lt.outer sf.lb.full
if [not para.isItalic] : begin
local sf2 : SerifFrame.fromDf df XH (XH / 2)
include : composite-proc sf.lb.full sf2.rb.full
include sf2.rb.full

do "Da"
create-glyph 'armn/da' 0x564 : glyph-proc
local df : include : DivFrame 1
include : df.markSet.p
include : refer-glyph 'latn/eta'
include : VBar.l df.leftSB 0 XH df.mvs
include : nShoulder
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
top -- XH
bottom -- Descender
stroke -- df.mvs
include : [ArmHBar.right df 0].base
if SLAB : begin
local sf : SerifFrame.fromDf df XH 0
local sf2 : SerifFrame.fromDf df XH Descender
if para.isItalic
include sf.lt.outer
include : composite-proc sf.lt.outer sf.lb.full
include sf2.rb.full

do "Ech"
create-glyph 'armn/ech' 0x565 : glyph-proc
Expand Down Expand Up @@ -76,9 +89,7 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
local sf : SerifFrame.fromDf df XH Descender
local sf2 : SerifFrame.fromDf df XH 0
include sf.lt.outer
if para.isItalic
include sf2.rb.outer
include : composite-proc sf.lb.full sf2.rb.full
include : if para.isItalic sf2.rb.outer sf2.rb.full

do "Ini"
create-glyph 'armn/ini' 0x56B : glyph-proc
Expand All @@ -94,10 +105,8 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
if SLAB : begin
local sf : SerifFrame.fromDf df Ascender Descender
local sf2 : SerifFrame.fromDf df XH 0
include sf.lt.outer
if para.isItalic
include sf2.rb.outer
include : composite-proc sf.lb.full sf2.rb.full
include : composite-proc sf.lt.outer sf.lb.full
include : if para.isItalic sf2.rb.outer sf2.rb.full

do "Xeh"
create-glyph 'armn/xeh' 0x56D : glyph-proc
Expand All @@ -121,10 +130,10 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
if SLAB : begin
local sf : SerifFrame.fromDf df Ascender Descender
local sf2 : SerifFrame.fromDf df XH 0
include sf.lt.outer
if para.isItalic
include : composite-proc sf.lt.outer sf.lb.full
if ([not para.isItalic] && sf2.enoughSpaceForFullSerifs)
include : composite-proc sf2.rt.inner sf2.rb.outer
include sf2.rb.outer
include : composite-proc sf.lb.full sf2.rt.inner sf2.rb.outer

do "Ken"
create-glyph 'armn/ken' 0x56F : glyph-proc
Expand All @@ -143,7 +152,7 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
local sf2 : SerifFrame.fromDf df XH Descender
include sf.lt.outer
if para.isItalic
include sf2.rb.outer
include sf2.rb.full
include : composite-proc sf2.rt.inner sf2.rb.full

do "Ghat"
Expand All @@ -157,13 +166,11 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
top -- XH
bottom -- Descender
stroke -- df.mvs
include : [ArmHBar.right df 0 (SLAB && [not para.isItalic])].desc
include : [ArmHBar.right df 0].desc
if SLAB : begin
local sf : SerifFrame.fromDf df XH 0
include sf.lt.outer
if [not para.isItalic] : begin
local sf2 : SerifFrame.fromDf df XH Descender
include : composite-proc sf.lb.full sf2.rb.full
if [not para.isItalic] : include sf.lb.full

do "Men"
create-glyph 'armn/men' 0x574 : glyph-proc
Expand Down Expand Up @@ -253,10 +260,8 @@ glyph-block Letter-Armenian-Lower-U-Group : begin

if SLAB : begin
local sf : SerifFrame.fromDf df XH 0
include sf.lt.outer
if [not para.isItalic] : begin
local sf2 : SerifFrame.fromDf df Ascender Descender
include sf2.rt.inner
local sf2 : SerifFrame.fromDf df Ascender Descender
include : composite-proc sf.lt.outer sf2.rt.inner

do "Tiun"
create-glyph 'armn/tiun' 0x57F : glyph-proc
Expand All @@ -278,8 +283,10 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
include : VBar.m df.middle 0 XH df.mvs
if SLAB : begin
local sf : SerifFrame.fromDf df XH 0
include : composite-proc sf.lt.outer sf.rb.outer
if [not para.isItalic] : include : composite-proc sf.mt.left sf.mb.right sf.rb.outer
include sf.lt.outer
if ([not para.isItalic] && sf.enoughSpaceForFullSerifs)
include : composite-proc sf.mt.left sf.mb.right sf.rb.full
include sf.rb.outer

do "Reh"
create-glyph 'armn/reh' 0x580 : glyph-proc
Expand All @@ -295,10 +302,8 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
if SLAB : begin
local sf : SerifFrame.fromDf df XH Descender
local sf2 : SerifFrame.fromDf df XH 0
include sf.lt.outer
if para.isItalic
include sf2.rb.outer
include : composite-proc sf.lb.full sf2.rb.full
include : composite-proc sf.lt.outer sf.lb.full
include : if para.isItalic sf2.rb.outer sf2.rb.full

do "P'iur"
create-glyph 'armn/piur' 0x583 : glyph-proc
Expand All @@ -321,10 +326,10 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
if SLAB : begin
local sf : SerifFrame.fromDf df XH 0
local sf2 : SerifFrame.fromDf df Ascender Descender
include sf.lt.outer
if para.isItalic
include sf.rb.outer
include : composite-proc sf2.mt.left sf2.mb.full sf.rb.full
include : if ([not para.isItalic] && sf.enoughSpaceForFullSerifs)
composite-proc sf.lt.outer sf.rb.full
composite-proc sf.lt.outer sf.rb.outer
include : composite-proc sf2.mt.left sf2.mb.full

do "Ew"
create-glyph 'armn/ew' 0x587 : glyph-proc
Expand All @@ -341,7 +346,7 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
include : HBar.b df.middle df.rightSB 0 df.mvs
if SLAB : begin
local sf : SerifFrame.fromDf df Ascender 0
local sf2 : SerifFrame.fromDf df XH 0
include sf.lt.outer
if [not para.isItalic] : begin
local sf2 : SerifFrame.fromDf df XH 0
if ([not para.isItalic] && sf2.enoughSpaceForFullSerifs) : begin
include sf2.mt.left
4 changes: 1 addition & 3 deletions packages/font-glyphs/src/letter/armenian/to.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,4 @@ glyph-block Letter-Armenian-To : begin
curl (df.rightSB + jut - [HSwToV : 0.5 * df.mvs]) barPosT
if SLAB : begin
local sf : SerifFrame.fromDf df XH Descender
include sf.lt.outer
if [not para.isItalic] : begin
include sf.lb.full
include : composite-proc sf.lt.outer sf.lb.full
12 changes: 10 additions & 2 deletions packages/font-glyphs/src/letter/armenian/upper-u-group.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ glyph-block Letter-Armenian-Upper-U-Group : begin
do "Ayb"
glyph-block-import Letter-Latin-Upper-Q : QCrossing
create-glyph 'armn/Ayb' 0x531 : glyph-proc
local df : include : DivFrame 1 3
local df : include : DivFrame 1
include : df.markSet.capital
include : UShape df CAP 1 df.mvs
include : QCrossing df CAP df.mvs
include : QCrossing df CAP [AdviceStroke 4]
if SLAB : include : USerifs.Toothless df CAP df.mvs

do "Men"
Expand Down Expand Up @@ -50,3 +50,11 @@ glyph-block Letter-Armenian-Upper-U-Group : begin
if SLAB : begin
local sf : SerifFrame.fromDf df CAP 0
include : composite-proc sf.lb.full sf.rb.full

do "Seh"
create-glyph 'armn/Seh' 0x54D : glyph-proc
local df : include : DivFrame 1
include : df.markSet.capital
include : UShape df CAP 1 df.mvs
if SLAB : begin
include : USerifs.Toothless df CAP df.mvs
6 changes: 4 additions & 2 deletions packages/font-glyphs/src/letter/armenian/upper-xeh.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@ glyph-block Letter-Armenian-Upper-Xeh : begin
if SLAB : begin
local sf : SerifFrame.fromDf df CAP 0
local sf2 : SerifFrame.fromDf df XH 0
include : composite-proc sf.lt.full sf.lb.full sf2.rt.full
if sf2.enoughSpaceForFullSerifs : include sf2.mt.full
include : composite-proc sf.lt.full sf.lb.full
if sf2.enoughSpaceForFullSerifs
include : composite-proc sf2.mt.full sf2.rt.full
include sf2.rt.outer
25 changes: 11 additions & 14 deletions packages/font-glyphs/src/letter/latin/lower-g.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ glyph-block Letter-Latin-Lower-G : begin
include : SeriflessBody df top
include : spiro-outline
corner df.rightSB top
corner df.rightSB (top - Stroke / 2)
corner (df.rightSB - [HSwToV Stroke]) (top - Stroke / 2)
corner df.rightSB (top - HalfStroke)
corner (df.rightSB - [HSwToV Stroke]) (top - HalfStroke)

export : define [SeriflessBody df top] : glyph-proc
include : OBarRight.shape (top -- top) (left -- df.leftSB) (right -- df.rightSB) (sw -- df.mvs)
Expand Down Expand Up @@ -154,13 +154,12 @@ glyph-block Letter-Latin-Lower-G : begin
singleStorey SingleStorey.RoundHook
singleStoreyFlatHook SingleStorey.FlatHook
object # ear/serif
"" { SingleStorey.AutoSerifedBody 0 }
serifless { SingleStorey.SeriflessBody 0 }
serifed { SingleStorey.SerifedBody 0 }
earlessCorner { SingleStorey.EarlessCornerBody DToothlessRise }
earlessCornerHTB { SingleStorey.EarlessCornerBody 0 }
earlessRounded { SingleStorey.EarlessRoundedBody (XH - SmallArchDepthA) }
scriptCut { SingleStorey.ScriptCutBody (Stroke / 2) }
scriptCut { SingleStorey.ScriptCutBody HalfStroke }

foreach { suffix { hookShape {bodyShape hookStart} } } [Object.entries SingleStoreyConfig] : do
create-glyph "g.\(suffix)" : glyph-proc
Expand Down Expand Up @@ -196,33 +195,31 @@ glyph-block Letter-Latin-Lower-G : begin
include [refer-glyph "g.\(suffix)"] AS_BASE ALSO_METRICS
include : OverlayW [AdviceStroke2 2 4 XH]

create-glyph "gScriptCrossedTail.\(suffix)" : glyph-proc
include : MarkSet.p
set-base-anchor 'overlay' Middle (XH / 2)
define df : DivFrame 1
include : bodyShape df XH
include : SingleStorey.CrossedHook df (XH - hookStart)

select-variant 'g' 'g'
link-reduced-variant 'g/sansSerif' 'g' MathSansSerif
CreateTurnedLetter 'turng' 0x1D77 'g' HalfAdvance [mix Descender XH 0.5]
select-variant "gBar" 0x1E5 (follow -- 'g')

select-variant 'g/hookTopBase' null (shapeFrom -- 'g')

select-variant 'gScript' 0x261 (shapeFrom -- 'g') (follow -- 'gScript')
select-variant 'GScript' 0xA7AC (follow -- 'gScript')
select-variant 'gScriptPalatalHook' 0x1D83 (follow -- 'gScript')
select-variant 'gScriptCrossedTail' 0xAB36

select-variant 'cyrl/de.BGR' (shapeFrom -- 'g') (follow -- [conditional-follow SLAB 'g/single/autoSerifed/slab' 'g/single/autoSerifed/sans'])
alias 'cyrl/de.SRB' null 'cyrl/de.BGR'

select-variant 'g/hookTopBase' (shapeFrom -- 'g')
derive-glyphs 'gHookTop' 0x260 "g/hookTopBase" : function [src gr] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
include : TopHook.rBarOuter RightSB 0 XH
include : LeaningAnchor.Above.VBar.r RightSB

create-glyph 'gScriptCrossedTail' 0xAB36 : glyph-proc
include : MarkSet.p
set-base-anchor 'overlay' Middle (XH / 2)
define df : DivFrame 1
include : SingleStorey.ScriptCutBody df XH
include : SingleStorey.CrossedHook df (XH - HalfStroke)

glyph-block-import Letter-Blackboard : BBS BBD BBBarRight
create-glyph 'mathbb/g' 0x1D558 : glyph-proc
include : MarkSet.p
Expand Down
Loading

0 comments on commit 7593710

Please sign in to comment.