Skip to content

Commit

Permalink
Optimize arch depths of Armenian letters. (#2668)
Browse files Browse the repository at this point in the history
* Optimize arch depths of Armenian letters.

* Cleanup of `Հ`/`Ց`/`Ֆ`/`ֆ`.
  • Loading branch information
jmcwilliams403 authored Feb 2, 2025
1 parent 077fb54 commit 4021817
Show file tree
Hide file tree
Showing 9 changed files with 120 additions and 81 deletions.
13 changes: 13 additions & 0 deletions changes/32.5.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
* Refine shape of the following characters:
- ARMENIAN CAPITAL LETTER XEH (`U+053D`).
- ARMENIAN CAPITAL LETTER CA (`U+053E`).
- ARMENIAN CAPITAL LETTER HO (`U+0540`).
- ARMENIAN CAPITAL LETTER CO (`U+0551`).
- ARMENIAN CAPITAL LETTER FEH (`U+0556`).
- ARMENIAN SMALL LETTER ZHE (`U+056A`).
- ARMENIAN SMALL LETTER XEH (`U+056D`).
- ARMENIAN SMALL LETTER CHA (`U+0579`).
- ARMENIAN SMALL LETTER TIWN (`U+057F`).
- ARMENIAN SMALL LETTER PIWR (`U+0583`).
- ARMENIAN SMALL LETTER FEH (`U+0586`).
- ARMENIAN SMALL LIGATURE ECH YIWN (`U+0587`).
10 changes: 8 additions & 2 deletions packages/font-glyphs/src/letter/armenian/ca.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,17 @@ glyph-block Letter-Armenian-Ca : begin
create-glyph 'armn/Ca' 0x53E : glyph-proc
local df : include : DivFrame 1
include : df.markSet.capital
include : VBar.l df.leftSB (CAP - VJut) CAP df.mvs

local yStart : CAP - VJut + df.mvs

local xStart : Math.min df.leftSB : Math.max
[mix df.leftSB df.rightSB 0.4] - [HSwToV : 1.5 * df.mvs] - jut
df.leftSB - jut + [HSwToV : 0.5 * df.mvs]

include : VBar.l xStart (yStart - df.mvs) CAP df.mvs
include : dispiro
widths.rhs.heading df.mvs Rightward
flat df.leftSB yStart
flat xStart yStart
curl df.middle yStart
archv
flat df.rightSB (yStart - ArchDepthB)
Expand Down
4 changes: 2 additions & 2 deletions packages/font-glyphs/src/letter/armenian/feh.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ glyph-block Letter-Armenian-Feh : begin
widths.lhs sw
straight.left.start df.middle top
archv
flatside.ld df.leftSB midyBot top ada adb
g4 df.leftSB [mix top midyBot (ada / (ada + adb))]
arcvh
straight.right.end df.middle midyBot [heading Rightward]
include : dispiro
widths.rhs sw
straight.right.start df.middle midyTop [heading Rightward]
archv
flatside.rd df.rightSB 0 midyTop ada adb
g4 (df.rightSB - OX) [mix midyTop 0 (adb / (ada + adb))]
hookend 0 (sw -- sw)
g4 (df.leftSB + OX) (0 + hook)

Expand Down
3 changes: 2 additions & 1 deletion packages/font-glyphs/src/letter/armenian/lower-sha-group.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ glyph-block Letter-Armenian-Lower-Sha-Group : begin
local y2 : XH / 2
include : dispiro
widths.center df.mvs
straight.down.start (x1 + [HSwToV : 0.5 * df.mvs]) XH [heading Downward]
flat (x1 + [HSwToV : 0.5 * df.mvs]) XH [heading Downward]
curl (x1 + [HSwToV : 0.5 * df.mvs]) [Math.min (y2 + 0.8 * SmallArchDepthB) (XH - TINY)] [heading Downward]
arcvh
flat (df.middle + [HSwToV : 0.5 * df.mvs]) y2
curl x2 y2 [heading Rightward]
Expand Down
154 changes: 86 additions & 68 deletions packages/font-glyphs/src/letter/armenian/lower-u-group.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
include : df.markSet.p
include : VBar.l df.leftSB Descender XH df.mvs
include : nShoulder.shape
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
top -- XH
top -- XH
bottom -- (XH / 2)
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
stroke -- df.mvs
include : [ArmHBar.normal df].base
if SLAB : begin
Expand All @@ -65,10 +65,10 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
include : df.markSet.p
include : VBar.l df.leftSB 0 XH df.mvs
include : nShoulder.shape
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
top -- XH
top -- XH
bottom -- Descender
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
stroke -- df.mvs
include : [ArmHBar.right df].base
if SLAB : begin
Expand All @@ -84,10 +84,10 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
local df : include : DivFrame 1
include : df.markSet.b
include : uBowl.shape
top -- Ascender
top -- Ascender
bottom -- 0
left -- df.leftSB
right -- (df.rightSB - [HSwToV df.mvs])
left -- df.leftSB
right -- (df.rightSB - [HSwToV df.mvs])
stroke -- df.mvs
include : VBar.r df.rightSB 0 [mix 0 XH 0.6] df.mvs
include : [ArmHBar.normal df].high
Expand All @@ -100,10 +100,10 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
include : df.markSet.b
include : VBar.l df.leftSB Descender XH df.mvs
include : nShoulder.shape
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
top -- XH
top -- XH
bottom -- 0
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
stroke -- df.mvs
include : [ArmHBar.normal df].desc
if SLAB : begin
Expand All @@ -118,10 +118,10 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
include : df.markSet.bp
include : VBar.l df.leftSB Descender Ascender df.mvs
include : nShoulder.shape
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
top -- XH
top -- XH
bottom -- 0
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
stroke -- df.mvs
if SLAB : begin
local sf : SerifFrame.fromDf df Ascender Descender
Expand All @@ -133,18 +133,23 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
create-glyph 'armn/xeh' 0x56D : glyph-proc
local df : include : DivFrame para.advanceScaleMM 3
include : df.markSet.bp
local subDf : df.slice 3 2 OX
include : uBowl.shape
top -- (XH / 2)
top -- (XH / 2)
bottom -- 0
left -- (df.middle - [HSwToV : df.mvs / 2])
right -- (df.rightSB - [HSwToV df.mvs])
left -- (df.middle - [HSwToV : 0.5 * df.mvs])
right -- (df.rightSB - [HSwToV df.mvs])
stroke -- df.mvs
ada -- subDf.smallArchDepthA
adb -- subDf.smallArchDepthB
include : nShoulder.shape
top -- XH
top -- XH
bottom -- (XH / 2)
left -- (df.leftSB + [HSwToV df.mvs])
right -- (df.middle + [HSwToV : df.mvs / 2])
left -- (df.leftSB + [HSwToV df.mvs])
right -- (df.middle + [HSwToV : 0.5 * df.mvs])
stroke -- df.mvs
ada -- subDf.smallArchDepthA
adb -- subDf.smallArchDepthB
include : VBar.l df.leftSB Descender Ascender df.mvs
include : VBar.r df.rightSB 0 XH df.mvs
if SLAB : begin
Expand All @@ -160,10 +165,10 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
local df : include : DivFrame 1
include : df.markSet.bp
include : uBowl.shape
top -- Ascender
top -- Ascender
bottom -- 0
left -- df.leftSB
right -- (df.rightSB - [HSwToV df.mvs])
left -- df.leftSB
right -- (df.rightSB - [HSwToV df.mvs])
stroke -- df.mvs
include : VBar.r df.rightSB Descender XH df.mvs
if SLAB : begin
Expand All @@ -180,10 +185,10 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
include : df.markSet.b
include : VBar.l df.leftSB 0 Ascender df.mvs
include : nShoulder.shape
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
top -- XH
top -- XH
bottom -- 0
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
stroke -- df.mvs
if SLAB : begin
local sf : SerifFrame.fromDf df Ascender 0
Expand All @@ -197,10 +202,10 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
include : df.markSet.p
include : VBar.l df.leftSB 0 XH df.mvs
include : nShoulder.shape
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
top -- XH
top -- XH
bottom -- Descender
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
stroke -- df.mvs
include : [ArmHBar.right df].desc
if SLAB : begin
Expand All @@ -213,10 +218,10 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
local df : include : DivFrame 1
include : df.markSet.b
include : uBowl.shape
top -- XH
top -- XH
bottom -- 0
left -- df.leftSB
right -- (df.rightSB - [HSwToV df.mvs])
left -- df.leftSB
right -- (df.rightSB - [HSwToV df.mvs])
stroke -- df.mvs
include : VBar.r df.rightSB 0 Ascender df.mvs
include : [ArmHBar.right df].asc
Expand All @@ -230,10 +235,10 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
local df : include : DivFrame 1
include : df.markSet.b
include : uBowl.shape
top -- Ascender
top -- Ascender
bottom -- 0
left -- df.leftSB
right -- (df.rightSB - [HSwToV df.mvs])
left -- df.leftSB
right -- (df.rightSB - [HSwToV df.mvs])
stroke -- df.mvs
include : VBar.r df.rightSB 0 XH df.mvs
include : [ArmHBar.left df].asc
Expand All @@ -248,10 +253,10 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
include : df.markSet.e
include : VBar.l df.leftSB 0 XH df.mvs
include : nShoulder.shape
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
top -- XH
top -- XH
bottom -- 0
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
stroke -- df.mvs
if SLAB : begin
local sf : SerifFrame.fromDf df XH 0
Expand Down Expand Up @@ -279,25 +284,25 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
include : VBar.l df.leftSB 0 XH df.mvs

# Combination of nShoulder.knots and the straight 2 shape
local left : Math.max df.middle : df.rightSB - [HSwToV df.mvs] - jut
local left : Math.max df.middle : (df.rightSB - [HSwToV df.mvs]) - jut
include : dispiro
widths.rhs df.shoulderFine
flat (df.leftSB + [HSwToV : df.mvs - df.shoulderFine]) (XH - SmallArchDepthA - TINY)
curl (df.leftSB + [HSwToV : df.mvs - df.shoulderFine]) (XH - SmallArchDepthA)
arch.rhs XH (sw -- df.mvs) (swBefore -- df.shoulderFine)
TwoNeck df XH 0 left
include : HBar.b left (left + [HSwToV df.mvs] + jut) 0 df.mvs
include : HBar.b left ((left + [HSwToV df.mvs]) + jut) 0 df.mvs
if SLAB : begin
local sf : SerifFrame.fromDf df XH 0
include sf.lt.outer
if [not para.isItalic] : include sf.lb.outer

# Alternate straight 'n' form
# include : nShoulder.shape
# left -- (df.leftSB + [HSwToV df.mvs])
# right -- df.rightSB
# top -- XH
# top -- XH
# bottom -- 0
# left -- (df.leftSB + [HSwToV df.mvs])
# right -- df.rightSB
# stroke -- df.mvs
# include : [ArmHBar.right df].base
# if SLAB : begin
Expand All @@ -310,10 +315,10 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
local df : include : DivFrame 1
include : df.markSet.e
include : uBowl.shape
top -- XH
top -- XH
bottom -- 0
left -- df.leftSB
right -- (df.rightSB - [HSwToV df.mvs])
left -- df.leftSB
right -- (df.rightSB - [HSwToV df.mvs])
stroke -- df.mvs
include : VBar.r df.rightSB 0 XH df.mvs
if SLAB : begin
Expand All @@ -327,10 +332,10 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
local df : include : DivFrame 1
include : df.markSet.bp
include : uBowl.shape
top -- XH
top -- XH
bottom -- 0
left -- df.leftSB
right -- (df.rightSB - [HSwToV df.mvs])
left -- df.leftSB
right -- (df.rightSB - [HSwToV df.mvs])
stroke -- df.mvs
include : VBar.r df.rightSB Descender Ascender df.mvs
include : [ArmHBar.right df].desc
Expand All @@ -343,18 +348,23 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
create-glyph 'armn/tiun' 0x57F : glyph-proc
local df : include : DivFrame para.advanceScaleMM 3
include : df.markSet.e
local subDf : df.slice 3 2 OX
include : uBowl.shape
top -- XH
top -- XH
bottom -- 0
left -- df.leftSB
right -- (df.middle - [HSwToV : 0.5 * df.mvs])
left -- df.leftSB
right -- (df.middle - [HSwToV : 0.5 * df.mvs])
stroke -- df.mvs
ada -- subDf.smallArchDepthA
adb -- subDf.smallArchDepthB
include : nShoulder.shape
top -- XH
top -- XH
bottom -- 0
left -- (df.middle + [HSwToV : df.mvs / 2])
right -- df.rightSB
left -- (df.middle + [HSwToV : 0.5 * df.mvs])
right -- df.rightSB
stroke -- df.mvs
ada -- subDf.smallArchDepthA
adb -- subDf.smallArchDepthB
include : VBar.m df.middle 0 XH df.mvs
if SLAB : begin
local sf : SerifFrame.fromDf df XH 0
Expand All @@ -367,10 +377,10 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
local df : include : DivFrame 1
include : df.markSet.b
include : nShoulder.shape
top -- XH
top -- XH
bottom -- 0
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
left -- (df.leftSB + [HSwToV df.mvs])
right -- df.rightSB
stroke -- df.mvs
include : VBar.l df.leftSB Descender XH df.mvs
if SLAB : begin
Expand All @@ -383,18 +393,23 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
create-glyph 'armn/piur' 0x583 : glyph-proc
local df : include : DivFrame para.advanceScaleMM 3
include : df.markSet.bp
local subDf : df.slice 3 2 OX
include : uBowl.shape
top -- XH
top -- XH
bottom -- 0
left -- df.leftSB
right -- (df.middle - [HSwToV : 0.5 * df.mvs])
left -- df.leftSB
right -- (df.middle - [HSwToV : 0.5 * df.mvs])
stroke -- df.mvs
ada -- subDf.smallArchDepthA
adb -- subDf.smallArchDepthB
include : nShoulder.shape
top -- XH
top -- XH
bottom -- 0
left -- (df.middle + [HSwToV : df.mvs / 2])
right -- df.rightSB
left -- (df.middle + [HSwToV : 0.5 * df.mvs])
right -- df.rightSB
stroke -- df.mvs
ada -- subDf.smallArchDepthA
adb -- subDf.smallArchDepthB
include : VBar.m df.middle Descender Ascender df.mvs
if SLAB : begin
local sf : SerifFrame.fromDf df XH 0
Expand All @@ -408,12 +423,15 @@ glyph-block Letter-Armenian-Lower-U-Group : begin
create-glyph 'armn/ew' 0x587 : glyph-proc
local df : include : DivFrame para.advanceScaleMM 3
include : df.markSet.b
local subDf : df.slice 3 2 OX
include : uBowl.shape
top -- Ascender
top -- Ascender
bottom -- 0
left -- df.leftSB
right -- (df.middle - [HSwToV : 0.5 * df.mvs])
left -- df.leftSB
right -- (df.middle - [HSwToV : 0.5 * df.mvs])
stroke -- df.mvs
ada -- subDf.smallArchDepthA
adb -- subDf.smallArchDepthB
include : VBar.m df.middle 0 XH df.mvs
include : HBar.b df.middle df.rightSB 0 df.mvs
if SLAB : begin
Expand Down
Loading

0 comments on commit 4021817

Please sign in to comment.