Skip to content

Commit

Permalink
Add top-left serifed variant for m (#1052).
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis committed May 25, 2021
1 parent 8b9f366 commit 92b16d0
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 26 deletions.
1 change: 1 addition & 0 deletions changes/7.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@

* 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).
* Add top-left serifed variant for `m` (#1052).
* Add SS18 to represent Input Mono (#990).
* Fix misplaced descender on `U+04AD` (#1005).
* Fix inconsistent serif on italic variants of Cyrillic En (#1006).
Expand Down
8 changes: 4 additions & 4 deletions font-src/glyphs/letter/cyrillic/sha.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ glyph-block Letter-Cyrillic-Sha : begin
include : FlipAround df.middle (XH / 2)
include : RightwardTailedBar df.rightSB 0 XH (sw -- df.mvs)

turned 'cyrl/sha.italic.motionSerifed' null 'm.motionSerifed' [DivFrame para.diversityM 3].middle (XH / 2)
turned 'cyrl/sha.italic.motionSerifed' null 'm.topLeftAndBottomRightSerifed' [DivFrame para.diversityM 3].middle (XH / 2)

create-glyph 'cyrl/sha.italic.motionSerifedTailed' : glyph-proc
local df : DivFrame para.diversityM 3
set-width df.width
include [refer-glyph 'm.motionSerifed'] AS_BASE
include [refer-glyph 'm.topLeftAndBottomRightSerifed'] AS_BASE
eject-contour 'barL'
eject-contour 'serifLT'
include : FlipAround df.middle (XH / 2)
Expand All @@ -70,15 +70,15 @@ glyph-block Letter-Cyrillic-Sha : begin
create-glyph 'cyrl/sha.italic.bottomRightSerifed' : glyph-proc
local df : DivFrame para.diversityM 3
set-width df.width
include [refer-glyph 'm.motionSerifed'] AS_BASE
include [refer-glyph 'm.topLeftAndBottomRightSerifed'] AS_BASE
eject-contour 'barL'
eject-contour 'serifRB'
include : FlipAround df.middle (XH / 2)

create-glyph 'cyrl/sha.italic.motionSerifedShachaBase' : glyph-proc
local df : DivFrame para.diversityM 3
set-width df.width
include [refer-glyph 'm.motionSerifed'] AS_BASE
include [refer-glyph 'm.topLeftAndBottomRightSerifed'] AS_BASE
eject-contour 'serifLT'
include : FlipAround df.middle (XH / 2)

Expand Down
37 changes: 27 additions & 10 deletions font-src/glyphs/letter/latin/lower-m.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,14 @@ glyph-block Letter-Latin-Lower-M : begin
include : SmallMArches top lbot mbot rbot df tailed
if SLAB : include : SmallMSerifs df top lbot mbot rbot tailed false

define [SmallMMotionSerifedShape top lbot mbot rbot df tailed] : glyph-proc
define [SmallMTopLeftSerifedShape top lbot mbot rbot df tailed] : glyph-proc
include : SmallMArches top lbot mbot rbot df tailed
include : SmallMTopLeftSerif df top lbot
if [not tailed] : include : SmallMBottomMotionRightSerif df top rbot

define [SmallMTopLeftAndBottomRightSerifedShape top lbot mbot rbot df tailed] : glyph-proc
include : SmallMArches top lbot mbot rbot df tailed
include : SmallMTopLeftSerif df top lbot
include : SmallMBottomMotionRightSerif df top rbot

glyph-block-export SmallMSmoothHeight
define [SmallMShortLegHeight df] : (XH - df.mvs) * 0.45
Expand Down Expand Up @@ -161,33 +165,46 @@ glyph-block Letter-Latin-Lower-M : begin
include : SmallMShape XH 0 [SmallMShortLegHeight df] ([SmallMSmoothHeight df] + O) df true
include : RightwardTailedBar df.rightSB 0 [SmallMSmoothHeight df] (sw -- df.mvs)

create-glyph 'm.motionSerifed' : glyph-proc
create-glyph 'm.topLeftSerifed' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : SmallMMotionSerifedShape XH 0 0 0 df
include : SmallMTopLeftSerifedShape XH 0 0 0 df

create-glyph 'm.motionSerifedTailed' : glyph-proc
create-glyph 'm.topLeftSerifedTailed' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : SmallMMotionSerifedShape XH 0 0 ([SmallMSmoothHeight df] + O) df true
include : SmallMTopLeftSerifedShape XH 0 0 ([SmallMSmoothHeight df] + O) df true
include : RightwardTailedBar df.rightSB 0 [SmallMSmoothHeight df] (sw -- df.mvs)

create-glyph 'm.shortLegMotionSerifed' : glyph-proc
create-glyph 'm.shortLegTopLeftSerifed' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : SmallMMotionSerifedShape XH 0 [SmallMShortLegHeight df] 0 df
include : SmallMTopLeftSerifedShape XH 0 [SmallMShortLegHeight df] 0 df
eject-contour 'serifMB'

create-glyph 'm.shortLegMotionSerifedTailed' : glyph-proc
create-glyph 'm.shortLegTopLeftSerifedTailed' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : SmallMMotionSerifedShape XH 0 [SmallMShortLegHeight df] ([SmallMSmoothHeight df] + O) df true
include : SmallMTopLeftSerifedShape XH 0 [SmallMShortLegHeight df] ([SmallMSmoothHeight df] + O) df true
include : RightwardTailedBar df.rightSB 0 [SmallMSmoothHeight df] (sw -- df.mvs)

create-glyph 'm.topLeftAndBottomRightSerifed' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : SmallMTopLeftAndBottomRightSerifedShape XH 0 0 0 df

create-glyph 'm.shortLegTopLeftAndBottomRightSerifed' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : SmallMTopLeftAndBottomRightSerifedShape XH 0 [SmallMShortLegHeight df] 0 df
eject-contour 'serifMB'

define [EarlessCornerDoubleArchSmallMShape top lbot mbot rbot df tailed] : glyph-proc
include : dispiro
widths.rhs df.mvs
Expand Down
38 changes: 26 additions & 12 deletions params/variants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2969,31 +2969,45 @@ selector."cyrl/te.italic" = "tailed"

[prime.m.variants.motion-serifed]
rank = 17
description = "`m` with motion serifs, normal middle leg touching baseline"
selector.m = "motionSerifed"
description = "`m` with serif at top left, normal middle leg touching baseline"
selector.m = "topLeftSerifed"
selector."m/sansSerif" = "normal"
selector."cyrl/te.italic" = "motionSerifed"
selector."cyrl/te.italic" = "topLeftSerifed"

[prime.m.variants.short-leg-motion-serifed]
rank = 18
description = "`m` with motion serifs, a shorter middle leg like Ubuntu Mono"
selector.m = "shortLegMotionSerifed"
description = "`m` with serif at top left, a shorter middle leg like Ubuntu Mono"
selector.m = "shortLegTopLeftSerifed"
selector."m/sansSerif" = "shortLeg"
selector."cyrl/te.italic" = "motionSerifed"
selector."cyrl/te.italic" = "topLeftSerifed"

[prime.m.variants.motion-serifed-tailed]
rank = 19
description = "`m` with motion serifs, normal middle leg touching baseline, and a curly tail"
selector.m = "motionSerifedTailed"
description = "`m` with serif at top left, normal middle leg touching baseline, and a curly tail"
selector.m = "topLeftSerifedTailed"
selector."m/sansSerif" = "tailed"
selector."cyrl/te.italic" = "motionSerifedTailed"
selector."cyrl/te.italic" = "topLeftSerifedTailed"

[prime.m.variants.short-leg-motion-serifed-tailed]
rank = 20
description = "`m` with motion serifs, a shorter middle leg like Ubuntu Mono, and a curly tail"
selector.m = "shortLegMotionSerifedTailed"
description = "`m` with serif at top left, a shorter middle leg like Ubuntu Mono, and a curly tail"
selector.m = "shortLegTopLeftSerifedTailed"
selector."m/sansSerif" = "shortLegTailed"
selector."cyrl/te.italic" = "motionSerifedTailed"
selector."cyrl/te.italic" = "topLeftSerifedTailed"

[prime.m.variants.top-left-and-bottom-right-serifed]
rank = 21
description = "`m` with serifs at top left and bottom right, normal middle leg touching baseline"
selector.m = "topLeftAndBottomRightSerifed"
selector."m/sansSerif" = "normal"
selector."cyrl/te.italic" = "topLeftAndBottomRightSerifed"

[prime.m.variants.short-leg-top-left-and-bottom-right-serifed]
rank = 22
description = "`m` with serifs at top left and bottom right, a shorter middle leg like Ubuntu Mono"
selector.m = "shortLegTopLeftAndBottomRightSerifed"
selector."m/sansSerif" = "shortLeg"
selector."cyrl/te.italic" = "topLeftAndBottomRightSerifed"



Expand Down

0 comments on commit 92b16d0

Please sign in to comment.