Further cleanup of #2556 . (#2563)

* Further cleanup of #2556 .

* Optimize arch depth of `Պ`.

* Further cleanup of `Ա`.

* Cleanup of `Յ`.

* EOL fixup.

* Cleanup of #2562 .
This commit is contained in:
John McWilliams 2024-10-28 14:11:39 -04:00 committed by GitHub
parent bba1f8dbca
commit 7a227717ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 75 additions and 46 deletions

View file

@ -7,7 +7,7 @@ glyph-module
glyph-block Letter-Armenian-Aliases : begin
glyph-block-import Common-Derivatives
alias 'armn/Tiun' 0x54F 'S/sansSerif'
alias 'armn/Tiun' 0x54F 'S.serifless'
alias 'armn/Piur' 0x553 'grek/Phi'
alias 'armn/Oh' 0x555 'O'
alias 'armn/aybTurned' 0x560 'm'
@ -15,7 +15,6 @@ glyph-block Letter-Armenian-Aliases : begin
alias 'armn/ho' 0x570 'h'
alias 'armn/yi' 0x575 'dotlessj.flatHook'
alias 'armn/vo' 0x578 'n'
alias 'armn/peh' 0x57A 'turnmLeg'
alias 'armn/seh' 0x57D 'u'
alias 'armn/co' 0x581 'cyrl/de.BGR'
alias 'armn/oh' 0x585 'o'

View file

@ -63,4 +63,3 @@ glyph-block Letter-Armenian-Ca : begin
arcvh
flat df.middle XH
curl df.rightSB XH

View file

@ -38,6 +38,6 @@ glyph-block Letter-Armenian-Feh : begin
include : df.markSet.bp
include : FehBody df Ascender 0 ArchDepthA ArchDepthB
include : VBar.m df.middle Descender Ascender df.mvs
if (SLAB && [not para.Italic]) : begin
if SLAB : begin
local sf : SerifFrame.fromDf df Ascender Descender
include sf.mb.full

View file

@ -91,7 +91,9 @@ glyph-block Letter-Armenian-Hook-Group : begin
create-glyph 'armn/Peh' 0x54A : glyph-proc
local df : include : DivFrame para.diversityM 3
include : df.markSet.capital
include : LeftHook df CAP df.mvs SLAB
local ada : df.archDepthA ArchDepth df.mvs
local adb : df.archDepthB ArchDepth df.mvs
include : LeftHook df CAP df.mvs SLAB 0 nothing nothing ada adb
include : VBar.m df.middle (XH / 2) (CAP - 0.5 * df.mvs) df.mvs
do "Vew"

View file

@ -48,4 +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 : composite-proc sf.lt.outer sf.lb.full
include : composite-proc sf.lt.outer sf.lb.fullSide

View file

@ -77,4 +77,4 @@ glyph-block Letter-Armenian-Lower-Sha-Group : begin
straight.down.start (x1 - [HSwToV df.mvs]) y1 [heading Downward]
flat joinX joinY [widths.lhs fine]
curl df.leftSB (Descender + df.mvs)
include : [ArmHBar.normal df 0].desc
include : [ArmHBar.normal df 0].desc

View file

@ -32,7 +32,7 @@ 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 : composite-proc sf.lt.outer sf.lb.full
include : composite-proc sf.lt.outer sf.lb.fullSide
if [not para.isItalic] : begin
local sf2 : SerifFrame.fromDf df XH (XH / 2)
include sf2.rb.full
@ -55,7 +55,7 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
if para.isItalic
include sf.lt.outer
include : composite-proc sf.lt.outer sf.lb.full
include sf2.rb.full
include sf2.rb.fullSide
do "Ech"
create-glyph 'armn/ech' 0x565 : glyph-proc
@ -105,7 +105,7 @@ 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 : composite-proc sf.lt.outer sf.lb.full
include : composite-proc sf.lt.outer sf.lb.fullSide
include : if para.isItalic sf2.rb.outer sf2.rb.full
do "Xeh"
@ -130,7 +130,7 @@ 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 : composite-proc sf.lt.outer sf.lb.full
include : composite-proc sf.lt.outer sf.lb.fullSide
if ([not para.isItalic] && sf2.enoughSpaceForFullSerifs)
include : composite-proc sf2.rt.inner sf2.rb.outer
include sf2.rb.outer
@ -152,8 +152,8 @@ 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.full
include : composite-proc sf2.rt.inner sf2.rb.full
include sf2.rb.fullSide
include : composite-proc sf2.rt.inner sf2.rb.fullSide
do "Ghat"
create-glyph 'armn/ghat' 0x572 : glyph-proc
@ -208,6 +208,21 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
include sf.rb.outer
if [not para.isItalic] : include sf.rt.inner
do "Peh"
glyph-block-import Letter-Latin-Lower-M : SmallMArches
create-glyph 'armn/peh' 0x57A : glyph-proc
local df : include : DivFrame para.diversityM 3
include : df.markSet.p
include : SmallMArches df XH 0 0 0
include : FlipAround df.middle (XH / 2)
include : VBar.r df.rightSB Descender XH df.mvs
if SLAB : begin
local sf : SerifFrame.fromDf df XH Descender
include : if ([not para.isItalic] && sf.enoughSpaceForFullSerifs)
composite-proc sf.lt.outer sf.mt.left sf.rt.inner sf.rb.fullSide
composite-proc sf.lt.outer sf.rb.fullSide
do "Rra"
create-glyph 'armn/rra' 0x57C : glyph-proc
local df : include : DivFrame 1
@ -283,10 +298,9 @@ 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 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
include : if ([not para.isItalic] && sf.enoughSpaceForFullSerifs)
composite-proc sf.lt.outer sf.mt.left sf.mb.right sf.rb.full
composite-proc sf.lt.outer sf.rb.outer
do "Reh"
create-glyph 'armn/reh' 0x580 : glyph-proc
@ -302,7 +316,7 @@ 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 : composite-proc sf.lt.outer sf.lb.full
include : composite-proc sf.lt.outer sf.lb.fullSide
include : if para.isItalic sf2.rb.outer sf2.rb.full
do "P'iur"

View file

@ -50,14 +50,17 @@ glyph-block Letter-Armenian-Shared-Shapes : begin
set [ArmHBar.left df fCapital fOverslab] : ArmHBar JUT-LEFT df fCapital fOverslab
glyph-block-export RightHook
define [RightHook df top sw baseSerif hookSerif _base _hookY] : glyph-proc
define [RightHook df top sw baseSerif hookSerif _base _hookY _ada _adb] : glyph-proc
local base : fallback _base 0
local hookY : fallback _hookY (top - Hook)
local ada : fallback _ada ArchDepthA
local adb : fallback _adb ArchDepthB
local yMidDepth : if (top > ada + adb) ada (top * (ada / (ada + adb)))
include : dispiro
widths.lhs df.mvs
g4 df.rightSB hookY
hookstart top (sw -- sw)
flat df.leftSB (top - ArchDepthA)
flat df.leftSB (top - yMidDepth)
curl df.leftSB base [heading Downward]
if baseSerif : begin
local sf : SerifFrame.fromDf df top base
@ -67,14 +70,17 @@ glyph-block Letter-Armenian-Shared-Shapes : begin
include sf.rb.full
glyph-block-export LeftHook
define [LeftHook df top sw baseSerif hookSerif _base _hookY] : glyph-proc
define [LeftHook df top sw baseSerif hookSerif _base _hookY _ada _adb] : glyph-proc
local base : fallback _base 0
local hookY : fallback _hookY (top - Hook)
local ada : fallback _ada ArchDepthA
local adb : fallback _adb ArchDepthB
local yMidDepth : if (top > ada + adb) adb (top * (adb / (ada + adb)))
include : dispiro
widths.rhs df.mvs
g4 df.leftSB hookY
hookstart top (sw -- sw)
flat df.rightSB (top - ArchDepthB)
flat df.rightSB (top - yMidDepth)
curl df.rightSB base [heading Downward]
if baseSerif : begin
local sf : SerifFrame.fromDf df top base
@ -94,4 +100,3 @@ glyph-block Letter-Armenian-Shared-Shapes : begin
g4.down.mid right (top - adb)
flat [mix left right flatp] [mix (bot + df.mvs) refY flatp]
curl left (bot + df.mvs) [widths.lhs df.mvs]

View file

@ -58,4 +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 : composite-proc sf.lt.outer sf.lb.full
include : composite-proc sf.lt.outer sf.lb.fullSide

View file

@ -13,12 +13,12 @@ glyph-block Letter-Armenian-Upper-U-Group : begin
glyph-block-import Letter-Armenian-Shared-Shapes : ArmHBar
do "Ayb"
glyph-block-import Letter-Latin-Upper-Q : QCrossing
glyph-block-import Letter-Latin-Upper-Q : QCrossing QInnerDiagSw
create-glyph 'armn/Ayb' 0x531 : glyph-proc
local df : include : DivFrame 1
include : df.markSet.capital
include : UShape df CAP 1 df.mvs
include : QCrossing df CAP [AdviceStroke 4]
include : QCrossing df CAP QInnerDiagSw
if SLAB : include : USerifs.Toothless df CAP df.mvs
do "Men"

View file

@ -15,10 +15,13 @@ glyph-block Letter-Armenian-Upper-Yi : begin
create-glyph 'armn/Yi' 0x545 : glyph-proc
local df : include : DivFrame 1
include : df.markSet.capital
local blend : 1 + 2 * O / (df.rightSB - df.leftSB)
local midy : mix 0 CAP OverlayPos
local ze : CyrZe 0 0 CAP 0 df.leftSB df.rightSB blend Hook
local ze : CyrZe 0 0 CAP 0
left -- df.leftSB
right -- df.rightSB
blend -- (1 + 2 * O / (df.rightSB - df.leftSB))
hook -- Hook
include : ze.Shape
if SLAB : begin
local yiJut : Math.min VJut : CAP - 2 * Hook - df.mvs
include : VBar.l (df.leftSB - 2 * O) (midy - 0.5 * yiJut) (midy + 0.5 * yiJut) df.mvs
local midy : mix 0 CAP OverlayPos
local vJut : Math.min VJut : CAP - 2 * Hook - df.mvs
include : VBar.l (df.leftSB - 2 * O) (midy - 0.5 * vJut) (midy + 0.5 * vJut) df.mvs

View file

@ -36,10 +36,10 @@ glyph-block Letter-Latin-Lower-J : begin
define XMiddle : namespace
export : define [StraightSerifless df] : begin df.middle
export : define [StraightSerifed df] : df.middle + [IBalance2 df]
export : define [BentHook df] : df.middle + JBalance
export : define [StraightSerifed df] : df.middle + [IBalance2 df]
export : define [BentHook df] : df.middle + JBalance
export : define [FlatHookSerifless df] : df.middle + 0.25 * JBalance * df.div * [mix 1 df.div 2]
export : define [FlatHookSerifed df] : df.middle + JBalance * df.div
export : define [FlatHookSerifed df] : df.middle + JBalance * df.div
export : define [StraightAutoSerifed df] : if SLAB [StraightSerifed df] [StraightSerifless df]
export : define [FlatHookAutoSerifed df] : if SLAB [FlatHookSerifed df] [FlatHookSerifless df]

View file

@ -89,8 +89,12 @@ glyph-block Letter-Latin-Lower-M : begin
local sf : SerifFrame.fromDf df top rbot
return sf.rb.outer
glyph-block-export dfM
define [dfM] : DivFrame para.diversityM 3
glyph-block-export MEnoughSpaceForFullSerifs
define [MEnoughSpaceForFullSerifs df _mid] : begin
define [MEnoughSpaceForFullSerifs _df _mid] : begin
local df : fallback _df : dfM
local mid : fallback _mid df.middle
local ink : HSwToV df.mvs
local gap : [Math.min (mid - df.leftSB) (df.rightSB - mid)] - 1.5 * ink
@ -127,8 +131,7 @@ glyph-block Letter-Latin-Lower-M : begin
local fFull : MEnoughSpaceForFullSerifs df : fallback _mid df.middle
include : SmallMBottomMotionRightSerif df top rbot fFull
glyph-block-export dfM
define [dfM] : DivFrame para.diversityM 3
glyph-block-export SmallMArches
define [SmallMArches df top lbot mbot rbot _mid] : glyph-proc
local mid : fallback _mid df.middle
include : SmallMShoulderSpiro

View file

@ -69,7 +69,7 @@ glyph-block Letter-Latin-Upper-J : begin
hookend Descender
g4 hookx (Descender + JHook)
set JBentHookBase.WithCurlyTail : function [df top] : JCurlyTailBaseT df (df.rightSB - [HSwToV HalfStroke] - JBalance2) (df.leftSB) top 0 'capital'
set JBentHookBase.WithCurlyTail : function [df top] : JCurlyTailBaseT df (df.rightSB - [HSwToV HalfStroke] - JBalance2) (df.leftSB) top 0 'capital'
set JDescendingBentHookBase.WithCurlyTail : function [df top] : JCurlyTailBaseT df (df.middle + JBalance) (df.middle + JBalance - LongJut - [HSwToV HalfStroke]) top Descender 'capDesc'
define [JCurlyTailBaseT df xc xCo top bottom markClass] : glyph-proc
set-width df.width
@ -90,7 +90,7 @@ glyph-block Letter-Latin-Upper-J : begin
y2 -- bottom + 0.5 * fine
yLoopTop -- bottom + 2 * fine + 2 * rinner
define [JDescendingFlatHookBase df dfHook top] : glyph-proc
define [JDescendingFlatHookSeriflessBase df dfHook top] : glyph-proc
set-width df.width
include : df.markSet.[if (top > XH) 'capDesc' 'p']
include : FlatHookDotlessJShape df dfHook top
@ -112,11 +112,11 @@ glyph-block Letter-Latin-Upper-J : begin
define JConfig : SuffixCfg.weave
object # height and hook
bentHook { JBentHookBase [DivFrame 1] [DivFrame 1] }
flatHook { JFlatHookBase [DivFrame 1] [DivFrame 1] }
descendingBentHook { JDescendingBentHookBase [DivFrame 1] [DivFrame 1] }
descendingFlatHookSerifless { JDescendingFlatHookBase [DivFrame para.diversityI] [DivFrame para.diversityI] }
descendingFlatHookSerifed { JDescendingFlatHookSerifedBase [DivFrame para.diversityI] [DivFrame para.diversityI] }
bentHook { JBentHookBase [DivFrame 1] [DivFrame 1] }
flatHook { JFlatHookBase [DivFrame 1] [DivFrame 1] }
descendingBentHook { JDescendingBentHookBase [DivFrame 1] [DivFrame 1] }
descendingFlatHookSerifless { JDescendingFlatHookSeriflessBase [DivFrame para.diversityI] [DivFrame para.diversityI] }
descendingFlatHookSerifed { JDescendingFlatHookSerifedBase [DivFrame para.diversityI] [DivFrame para.diversityI] }
function [body] : if (body == 'descendingFlatHookSerifless' || body == 'descendingFlatHookSerifed') {."" null} : object
serifless null
serifed JLeftwardSerif

View file

@ -148,13 +148,17 @@ glyph-block Letter-Latin-Upper-Q : begin
###################################
glyph-block-export QInnerDiagSw
define QInnerDiagSw : AdviceStroke 4
define QInnerVertSw : Math.min [AdviceStroke 3.5] ((RightSB - SB - [HSwToV : 2 * Stroke]) / (2 * HVContrast))
define QConfig : object
straight { QStdBody Stroke QStraightTail 'capDesc' 'p' }
curlyTailed { QStdBody Stroke QCurlyTail 'capDesc' 'p' }
crossingCurlyTailed { QStdBody QInnerVertSw QCrossingCurlyTail 'capDesc' 'p' }
crossing { QStdBody [AdviceStroke 4] QCrossing 'capital' 'e' }
crossingBaseline { QStdBody [AdviceStroke 4] QCrossingBaseline 'capital' 'e' }
crossing { QStdBody QInnerDiagSw QCrossing 'capital' 'e' }
crossingBaseline { QStdBody QInnerDiagSw QCrossingBaseline 'capital' 'e' }
verticalCrossing { QStdBody QInnerVertSw QVerticalCrossing 'capDesc' 'p' }
horizontalTailed { QHorizontalTailedBody [AdviceStroke 3] no-shape 'capital' 'e' }
detachedTailed { QStdBody Stroke QDetachedTail 'capDesc' 'p' }