Skip to content

Commit

Permalink
Fix mark placements of E (#1063)
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis committed May 25, 2021
1 parent 92b16d0 commit daa6191
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 26 deletions.
38 changes: 19 additions & 19 deletions font-src/glyphs/letter/latin/upper-e.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ glyph-block Letter-Latin-Upper-E : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Marks : markHalfStroke
glyph-block-import Letter-Latin-Upper-F : FShape RevFShape EFVJutLength
glyph-block-import Letter-Latin-Upper-F : xMidBarShrink yMidBar EFVJutLength

define xEBarLeft : SB * 1.5
define [EShape] : params [top pyBar serifLT serifLB serifV] : glyph-proc
define stroke : AdviceStroke2 2 3 CAP
include : FShape top pyBar
define kSB 1
define xEBarLeft : SB * kSB - O
define xRevEBarRight : Width - SB * kSB + O
define [EShape] : params [top pyBar serifLT serifLB serifV [stroke : AdviceStroke2 2 3 top]] : glyph-proc
include : VBarLeft (xEBarLeft) 0 top stroke
include : HBarTop (xEBarLeft - O) RightSB top stroke
include : HBar (xEBarLeft - O) (RightSB - [xMidBarShrink]) [yMidBar top pyBar] stroke
include : HBarBottom (xEBarLeft - O) RightSB 0 stroke
if serifLT : include : LeftwardTopSerif xEBarLeft top SideJut
if serifLB : include : LeftwardBottomSerif xEBarLeft 0 SideJut
Expand All @@ -25,13 +28,13 @@ glyph-block Letter-Latin-Upper-E : begin
include : UpwardRightSerif RightSB 0 jutBot

glyph-block-export RevEShape
define [RevEShape] : params [top pyBar serifRT serifRB serifV] : glyph-proc
define stroke : AdviceStroke2 2 3 CAP
define xEBarRight : Width - SB * 1.5
include : RevFShape top pyBar
include : HBarBottom SB (xEBarRight + O) 0 stroke
if serifRT : include : RightwardTopSerif xEBarRight top SideJut
if serifRB : include : RightwardBottomSerif xEBarRight 0 SideJut
define [RevEShape] : params [top pyBar serifRT serifRB serifV [stroke : AdviceStroke2 2 3 top]] : glyph-proc
include : VBarRight (xRevEBarRight) 0 top stroke
include : HBarTop SB (xRevEBarRight + O) top stroke
include : HBar (SB + [xMidBarShrink]) (xRevEBarRight + O) [yMidBar top pyBar] stroke
include : HBarBottom SB (xRevEBarRight + O) 0 stroke
if serifRT : include : RightwardTopSerif xRevEBarRight top SideJut
if serifRB : include : RightwardBottomSerif xRevEBarRight 0 SideJut
if serifV : begin
local { jutTop jutBot } : EFVJutLength top pyBar stroke
include : DownwardLeftSerif SB top jutTop
Expand Down Expand Up @@ -72,10 +75,7 @@ glyph-block Letter-Latin-Upper-E : begin
glyph-block-import Letter-Blackboard : BBS BBD
create-glyph 'mathbb/E' 0x1D53C : glyph-proc
include : MarkSet.capital
include : union
VBarLeft (xEBarLeft + BBD) 0 CAP BBS
HBarBottom xEBarLeft (xEBarLeft + BBD) 0 BBS
difference
FShape CAP (serif -- false) (_stroke -- BBS)
Rect (CAP - BBS) BBS (xEBarLeft + BBS * HVContrast) (xEBarLeft + BBD)
HBarBottom (xEBarLeft - O) RightSB 0 BBS
include : difference
EShape CAP (serif -- false) (stroke -- BBS)
Rect (CAP - BBS) BBS (xEBarLeft + BBS * HVContrast) (xEBarLeft + BBD)

14 changes: 8 additions & 6 deletions font-src/glyphs/letter/latin/upper-f.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ glyph-module
glyph-block Letter-Latin-Upper-F : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-export FShape RevFShape EFVJutLength

glyph-block-export xMidBarShrink
define [xMidBarShrink] : [Math.max HalfStroke ((RightSB - SB) * 0.15)] + [if SLAB (Stroke * 0.25) 0]
glyph-block-export yMidBar
define [yMidBar top y] : top * [fallback y : DesignParameters.upperEBarPos SLAB]

glyph-block-export EFVJutLength
define [EFVJutLength top pyBar stroke] : begin
local jutTop : Math.min VJut
top - [mix (top - stroke) ([yMidBar top pyBar] + stroke / 2) 0.5]
Expand All @@ -21,8 +24,9 @@ glyph-block Letter-Latin-Upper-F : begin
return { jutTop jutBot }

define xFBarLeft : SB * 1.5
define [FShape] : params [top pyBar serifLT serifLB serifV _stroke] : glyph-proc
define stroke : fallback _stroke : AdviceStroke2 2 3 top
define xFBarRight : Width - SB * 1.5

define [FShape] : params [top pyBar serifLT serifLB serifV [stroke : AdviceStroke2 2 3 top]] : glyph-proc
include : VBarLeft (xFBarLeft) 0 top stroke
include : HBarTop (xFBarLeft - O) RightSB top stroke
include : HBar (xFBarLeft - O) (RightSB - [xMidBarShrink]) [yMidBar top pyBar] stroke
Expand All @@ -34,9 +38,7 @@ glyph-block Letter-Latin-Upper-F : begin
local { jutTop jutBot } : EFVJutLength top pyBar stroke
include : DownwardRightSerif RightSB top jutTop

define [RevFShape] : params [top pyBar serifRT serifRB serifV] : glyph-proc
define stroke : AdviceStroke2 2 3 CAP
define xFBarRight : Width - SB * 1.5
define [RevFShape] : params [top pyBar serifRT serifRB serifV [stroke : AdviceStroke2 2 3 top]] : glyph-proc
include : VBarRight (xFBarRight) 0 top stroke
include : HBarTop SB (xFBarRight + O) top stroke
include : HBar (SB + [xMidBarShrink]) (xFBarRight + O) [yMidBar top pyBar] stroke
Expand Down
2 changes: 1 addition & 1 deletion font-src/glyphs/symbol/math/letter-like.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ glyph-block Symbol-Math-Letter-Like : begin
include : FlipAround Middle (CAP / 2)

create-glyph 'exists' 0x2203 : glyph-proc
include : RevEShape (top -- CAP) (pyBar -- 0.51)
include : RevEShape CAP (pyBar -- 0.51)

create-glyph 'emptyset' 0x2205 : glyph-proc
include : OShape CAP 0 SB RightSB OperatorStroke
Expand Down

0 comments on commit daa6191

Please sign in to comment.