Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subtly optimize jut length of middle serif of E/F. #2480

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/font-glyphs/src/letter/latin-ext/upper-ae-oe.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ glyph-block Letter-Latin-Upper-AE-OE : begin

local xMidRight : df.rightSB - sw / 4
local yBar : top * eBarPos
local { jutTop jutBot } : EFVJutLength top eBarPos sw
local { jutTop jutBot jutMid } : EFVJutLength top eBarPos sw

# E half
include : VBar.l eleft 0 top sw
Expand All @@ -125,7 +125,7 @@ glyph-block Letter-Latin-Upper-AE-OE : begin
match slabKind
[Just SLAB-E-CAPPED] : begin
local fine : swVJut * [AdviceStroke 3.5] / Stroke
include : VBar.r xMidRight (yBar - 0.5 * jutBot) (yBar + 0.5 * jutBot) fine
include : VBar.r xMidRight (yBar - jutMid) (yBar + jutMid) fine

do "P/Ya Half"
glyph-block-import Letter-Latin-Upper-P : PShape PBarPosY
Expand Down Expand Up @@ -208,7 +208,7 @@ glyph-block Letter-Latin-Upper-AE-OE : begin

local xMidRight : df.rightSB - sw / 4
local yBar : top * eBarPos
local { jutTop jutBot } : EFVJutLength top eBarPos sw
local { jutTop jutBot jutMid } : EFVJutLength top eBarPos sw

# O half
include : dispiro
Expand All @@ -233,7 +233,7 @@ glyph-block Letter-Latin-Upper-AE-OE : begin
match slabKind
[Just SLAB-E-CAPPED] : begin
local fine : swVJut * [AdviceStroke 3.5] / Stroke
include : VBar.r xMidRight (yBar - 0.5 * jutBot) (yBar + 0.5 * jutBot) fine
include : VBar.r xMidRight (yBar - jutMid) (yBar + jutMid) fine

foreach { suffix { slabKind } } [Object.entries EConfig] : do
create-glyph "OE.\(suffix)" : glyph-proc
Expand Down
4 changes: 2 additions & 2 deletions packages/font-glyphs/src/letter/latin/upper-e.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ glyph-block Letter-Latin-Upper-E : begin
define [EShape] : with-params [top pyBar serifLT serifLB serifV serifM [stroke : AdviceStroke2 2 3 top]] : glyph-proc
local xMidRight : RightSB - [xMidBarShrink serifV]
local yBar : yMidBar top pyBar
local { jutTop jutBot } : EFVJutLength top pyBar stroke
local { jutTop jutBot jutMid } : EFVJutLength top pyBar stroke

include : VBar.l (xEBarLeft) 0 top stroke
include : HBar.t (xEBarLeft - O) RightSB top stroke
Expand All @@ -33,7 +33,7 @@ glyph-block Letter-Latin-Upper-E : begin
include : VSerif.ur RightSB 0 jutBot
if serifM : begin
local fine : stroke * [AdviceStroke 3.5] / Stroke
include : VBar.r xMidRight (yBar - 0.5 * jutBot) (yBar + 0.5 * jutBot) fine
include : VBar.r xMidRight (yBar - jutMid) (yBar + jutMid) fine

glyph-block-export RevEShape
define [RevEShape] : with-params [top pyBar serifRT serifRB serifV serifM [stroke : AdviceStroke2 2 3 top]] : glyph-proc
Expand Down
7 changes: 4 additions & 3 deletions packages/font-glyphs/src/letter/latin/upper-f.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ glyph-block Letter-Latin-Upper-F : begin
top - [mix (top - stroke) ([yMidBar top pyBar] + stroke / 2) 0.5]
local jutBot : Math.min VJut
mix stroke ([yMidBar top pyBar] - stroke / 2) 0.5
return { jutTop jutBot }
local jutMid : 0.5 * [Math.min jutTop jutBot]
return { jutTop jutBot jutMid }

define xFBarLeft : SB * 1.5
define xFBarRight : Width - SB * 1.5

define [FShape] : with-params [top pyBar serifLT serifLB serifV serifM [stroke : AdviceStroke2 2 3 top]] : glyph-proc
local xMidRight : RightSB - [xMidBarShrink serifV]
local yBar : yMidBar top pyBar
local { jutTop jutBot } : EFVJutLength top pyBar stroke
local { jutTop jutBot jutMid } : EFVJutLength top pyBar stroke

include : VBar.l (xFBarLeft) 0 top stroke
include : HBar.t (xFBarLeft - O) RightSB top stroke
Expand All @@ -44,7 +45,7 @@ glyph-block Letter-Latin-Upper-F : begin
if serifV : include : VSerif.dr RightSB top jutTop
if serifM : begin
local fine : stroke * [AdviceStroke 3.5] / Stroke
include : VBar.r xMidRight (yBar - 0.5 * jutBot) (yBar + 0.5 * jutBot) fine
include : VBar.r xMidRight (yBar - jutMid) (yBar + jutMid) fine

define FConfig : object
serifless { false false false false }
Expand Down
Loading