Skip to content

Commit

Permalink
* Variant tags are reordered.
Browse files Browse the repository at this point in the history
 * Variant names of certain letters are renamed, including:
   - Upper Gamma (`grek-upper-gamma`).
   - Variants for `K`, `k`, Cyrillic Ka (`К` and `к`).
 * Add more serifed variants for `K`, `k`, `n`, Cyrillic Ka (`К` and `к`) and Cyrillic Ef (`ф`) to better reproduce PT Mono (#986).
  • Loading branch information
be5invis committed May 11, 2021
1 parent 83405b2 commit 4b6dd73
Show file tree
Hide file tree
Showing 10 changed files with 850 additions and 342 deletions.
7 changes: 6 additions & 1 deletion changes/6.2.0.md → changes/7.0.0.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
* \[**Breaking**\] Variant tags are reordered.
* \[**Breaking**\] Variant names of certain letters are renamed, including:
- Upper Gamma (`grek-upper-gamma`).
- Variants for `K`, `k`, Cyrillic Ka (`К` and `к`).
* Add characters:
- Cyrillic Iotified E (`U+0464`, `U+0465`).
- Cyrillic Omega (`U+0460`, `U+0461`), Ot (`U+047E`, `U+047F`), Broad Omega (`U+A64C`, `U+A64D`).
Expand All @@ -14,4 +18,5 @@
- Cyrillic Ghe with Stroke and Hook (`U+04FA`, `U+04FB`).
- Cyrillic Ha with Hook (`U+04FC`, `U+04FD`).
- Cyrillic Ha with Stroke (`U+04FE`, `U+04FF`).
* Add tailed variants for Cyrillic El, En, Che, Yery and Ya (#972).
* Add tailed variants for Cyrillic El, En, Che, Yery and Ya (#972).
* Add more serifed variants for `K`, `k`, `n`, Cyrillic Ka (`К` and `к`) and Cyrillic Ef (`ф`) to better reproduce PT Mono (#986).
2 changes: 1 addition & 1 deletion font-src/glyphs/auto-build/transformed.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ glyph-block Autobuild-Transformed : begin
list 0x1DAF 'nHookBottom'
list 0x1DB0 'smcpN'
list 0x1DB1 'obar'
list 0x1DB2 'latinphi'
list 0x1DB2 'latn/phi'
list 0x1DB3 'sRTail'
list 0x1DB4 'esh'
list 0x1DB5 'tltail'
Expand Down
14 changes: 8 additions & 6 deletions font-src/glyphs/letter/greek/upper-gamma.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,27 @@ glyph-block Letter-Greek-Upper-Gamma: begin
glyph-block-import Letter-Shared-Shapes : nShoulder CyrDescender CyrHookDescender
glyph-block-import Letter-Blackboard : BBS BBD BBBarLeft

define SLAB-AUTO 0
define SLAB-MOTION 1
define SLAB-NONE 0
define SLAB-TR 1
define SLAB-ALL 2

define GammaBarLeft (SB * 1.5)
define [GammaShape top slabType] : glyph-proc
include : VBarLeft GammaBarLeft 0 top
include : HBarTop (GammaBarLeft - O) (RightSB - OX) top
match slabType
[Just SLAB-AUTO] : if SLAB : begin
[Just SLAB-ALL] : begin
include : LeftwardTopSerif GammaBarLeft top SideJut
include : LeftwardBottomSerif (GammaBarLeft + HVContrast * HalfStroke) 0 Jut
include : RightwardBottomSerif (GammaBarLeft + HVContrast * HalfStroke) 0 MidJutSide
include : tagged 'serifRT' : DownwardRightSerif (RightSB - OX) top VJut
[Just SLAB-MOTION] : begin
[Just SLAB-TR] : begin
include : tagged 'serifRT' : DownwardRightSerif (RightSB - OX) top VJut

define GammaConfig : object
standard { SLAB-AUTO SLAB }
motionSerifed { SLAB-MOTION false }
serifless { SLAB-NONE false }
topRightSerifed { SLAB-TR false }
serifed { SLAB-ALL true }

foreach { suffix { slabType doSB } } [Object.entries GammaConfig] : do
create-glyph "grek/Gamma.\(suffix)" : glyph-proc
Expand Down
18 changes: 13 additions & 5 deletions font-src/glyphs/letter/greek/upper-phi.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,21 @@ glyph-block Letter-Greek-Upper-Phi : begin
include : VBar df.middle Descender HalfStroke
include : VBar df.middle (XH - HalfStroke) CAP

create-glyph 'latinphi' 0x278 : glyph-proc
create-glyph 'cyrl/ef.serifless' : glyph-proc
local df : DivFrame para.diversityM 3
include [refer-glyph 'grek/varphi'] AS_BASE ALSO_METRICS
if SLAB : begin
include : tagged 'serifMT' : LeftwardTopSerif df.middle CAP Jut
include : tagged 'serifMB' : CenterBottomSerif df.middle Descender Jut

alias 'cyrl/ef.straight' null 'latinphi'
create-glyph 'cyrl/ef.topSerifed' : glyph-proc
local df : DivFrame para.diversityM 3
include [refer-glyph 'grek/varphi'] AS_BASE ALSO_METRICS
include : tagged 'serifMT' : LeftwardTopSerif df.middle CAP Jut

create-glyph 'cyrl/ef.serifed' : glyph-proc
local df : DivFrame para.diversityM 3
include [refer-glyph 'grek/varphi'] AS_BASE ALSO_METRICS
include : tagged 'serifMT' : LeftwardTopSerif df.middle CAP Jut
include : tagged 'serifMB' : CenterBottomSerif df.middle Descender Jut

create-glyph 'cyrl/ef.cursive' : glyph-proc
local df : DivFrame para.diversityM 3
set-width df.width
Expand Down Expand Up @@ -77,3 +84,4 @@ glyph-block Letter-Greek-Upper-Phi : begin
curl xBarRight (0 - O)

select-variant 'cyrl/ef' 0x444
select-variant 'latn/phi' 0x278 (shapeFrom -- 'cyrl/ef')
117 changes: 70 additions & 47 deletions font-src/glyphs/letter/latin/k.ptl

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion font-src/glyphs/letter/latin/lower-f.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ glyph-block Letter-Latin-Lower-F : begin
'flatHookTailedCrossbarAtXHeight' { { NarrowFShape dfNarrowF } { pNarrowSide XH CH-HOOK } { 'if' 'if' } }
'flatHookDiagonalTailedCrossbarAtXHeight' { { NarrowFShape dfNarrowF } { pNarrowSide XH CH-DIAGONAL-HOOK } { 'if' 'if' } }

'phoneticLeft' { { StandardSmallFShape [DivFrame 1] } { 1 fbar [if SLAB 4 0] } { 'b' 'p' } }
'phoneticLeft' { { StandardSmallFShape [DivFrame 1] } { 1 fbar [if SLAB CH-SERIF CH-NONE] } { 'b' 'p' } }

foreach { suffix {{Body df} {pBar yBar ch} {mk mkTurn}}} [Object.entries SmallFConfig] : do
create-glyph "f.\(suffix)" : glyph-proc
Expand Down
14 changes: 11 additions & 3 deletions font-src/glyphs/letter/latin/lower-h.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ glyph-block Letter-Latin-Lower-H : begin
include : LeftwardTopSerif SB CAP SideJut
include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut

create-glyph 'h.straightTopLeftSerifed' : glyph-proc
include : MarkSet.b

include : VBarLeft SB 0 CAP
include : nShoulder
left -- (SB + Stroke * HVContrast)
right -- RightSB
include : LeftwardTopSerif SB CAP SideJut

create-glyph 'h.motionSerifedTailed' : glyph-proc
include : MarkSet.b

Expand Down Expand Up @@ -102,10 +111,9 @@ glyph-block Letter-Latin-Lower-H : begin
eject-contour 'serifRB'
include : VerticalHook (RightSB - HalfStroke * HVContrast) 0 (-HookX) Hook

create-glyph 'heng.straightMotionSerifed' : glyph-proc
create-glyph 'heng.straightTopLeftSerifed' : glyph-proc
include : MarkSet.if
include : refer-glyph "h.straightMotionSerifed"
eject-contour 'serifRB'
include : refer-glyph "h.straightTopLeftSerifed"
include : VerticalHook (RightSB - HalfStroke * HVContrast) 0 (-HookX) Hook

select-variant 'heng' 0xA727
Expand Down
22 changes: 16 additions & 6 deletions font-src/glyphs/letter/latin/lower-n.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ glyph-block Letter-Latin-Lower-N : begin
include : NBottomRightSerifItalic
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0

create-glyph 'n.straightTopLeftSerifed' : glyph-proc
include : MarkSet.e

include : VBarLeft SB 0 XH
include : nShoulder
left -- (SB + Stroke * HVContrast)
right -- RightSB
fine -- ShoulderFine

include : NTopLeftSerif
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0

create-glyph 'n.motionSerifedTailed' : glyph-proc
include : MarkSet.e

Expand Down Expand Up @@ -165,10 +177,9 @@ glyph-block Letter-Latin-Lower-N : begin
eject-contour 'serifRB'
include : VerticalHook (RightSB - HalfStroke * HVContrast) 0 (-HookX) Hook

create-glyph 'eng.straightMotionSerifed' : glyph-proc
create-glyph 'eng.straightTopLeftSerifed' : glyph-proc
include : MarkSet.p
include [refer-glyph 'n.straightMotionSerifed'] false
eject-contour 'serifRB'
include [refer-glyph 'n.straightTopLeftSerifed'] false
include : VerticalHook (RightSB - HalfStroke * HVContrast) 0 (-HookX) Hook

create-glyph 'eng.earlessCornerStraight' : glyph-proc
Expand Down Expand Up @@ -208,9 +219,8 @@ glyph-block Letter-Latin-Lower-N : begin
eject-contour 'serifRB'
include : refer-glyph 'rtailBR'

create-glyph 'nHookBottom.straightMotionSerifed' : glyph-proc
include [refer-glyph 'n.straightMotionSerifed'] AS_BASE ALSO_METRICS
eject-contour 'serifRB'
create-glyph 'nHookBottom.straightTopLeftSerifed' : glyph-proc
include [refer-glyph 'n.straightTopLeftSerifed'] AS_BASE ALSO_METRICS
include : refer-glyph 'rtailBR'

create-glyph 'nHookBottom.earlessCornerStraight' : glyph-proc
Expand Down
2 changes: 2 additions & 0 deletions font-src/support/variant-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ class Prime {
gr.variants.push({
key: variant.key,
rank: variant.rank,
rankGroup: variant.rankGroup,
description: variant.description
});
}
Expand All @@ -120,6 +121,7 @@ class PrimeVariant {
this.tag = tag;
this.description = cfg.description;
this.rank = cfg.rank;
this.rankGroup = cfg.rankGroup || 0;
this.selector = cfg.selector;
this.nonDeriving = cfg.nonDeriving;
}
Expand Down

0 comments on commit 4b6dd73

Please sign in to comment.