Skip to content

Commit

Permalink
Further cleanup of be5invis#2556 .
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcwilliams403 committed Oct 28, 2024
1 parent bba1f8d commit eca8e2b
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 19 deletions.
3 changes: 1 addition & 2 deletions packages/font-glyphs/src/letter/armenian/aliases.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ 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'
alias 'armn/ayb' 0x561 'turnm'
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'
Expand Down
2 changes: 1 addition & 1 deletion packages/font-glyphs/src/letter/armenian/feh.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion packages/font-glyphs/src/letter/armenian/keh.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -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
36 changes: 25 additions & 11 deletions packages/font-glyphs/src/letter/armenian/lower-u-group.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/font-glyphs/src/letter/armenian/to.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 6 additions & 3 deletions packages/font-glyphs/src/letter/latin/lower-m.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit eca8e2b

Please sign in to comment.