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

Optimize glyphs for four characters. #2458

Merged
merged 1 commit into from
Aug 6, 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
3 changes: 3 additions & 0 deletions changes/31.2.0.md
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
* Add variant selectors for Greek lower Phi/Psi (`VXAG`, `VXAH`).
* Optimize cross position for Cyrillic Lower Straight U (`U+04AF`, `U+04B1`).
* Optimize glyph shape for `lower-gamma`.`straight` and `lower-gamma`.`curly`.
* Optimize glyph shape for `U+1DF15`.
11 changes: 2 additions & 9 deletions packages/font-glyphs/src/letter/greek/lower-gamma.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,8 @@ glyph-block Letter-Greek-Lower-Gamma : begin
glyph-block-import Common-Derivatives
glyph-block-import Letter-Blackboard : BBS BBD BBBarLeft

create-glyph 'grek/gamma.straight' : glyph-proc
include : MarkSet.p
include : refer-glyph "v.straightSerifless"
include : VBar.m Middle Descender HalfStroke

create-glyph 'grek/gamma.curly' : glyph-proc
include : MarkSet.p
include : refer-glyph "v.curlySerifless"
include : VBar.m Middle Descender HalfStroke
alias 'grek/gamma.straight' null 'cyrl/ue.straightSerifless'
alias 'grek/gamma.curly' null 'cyrl/ue.curlySerifless'

create-glyph 'grek/gamma.casual' : glyph-proc
include : MarkSet.p
Expand Down
2 changes: 1 addition & 1 deletion packages/font-glyphs/src/letter/latin/lower-r.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ glyph-block Letter-Latin-Lower-R : begin
include : setTurnedMarks doTS XH 0
include : PalatalHook.r
xLink -- (df.rightSB - xBar + df.leftSB)
x -- (df.rightSB + SideJut)
x -- (df.rightSB - xBar + df.leftSB + [HSwToV Stroke] + SideJut)
y -- 0

create-glyph "turnrLongLeg.\(suffix)" : glyph-proc
Expand Down
51 changes: 22 additions & 29 deletions packages/font-glyphs/src/letter/latin/upper-y.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ glyph-block Letter-Latin-Upper-Y : begin
[Just SLAB-MOTION] : include sf.lt.outer
[Just SLAB-BASE] : include : HSerif.mb Middle bot MidJutSide

define [YShape bodyType slabType top bot] : glyph-proc
local cross : YCrossPos top bot
define [YShape] : with-params [bodyType slabType top bot [cross : YCrossPos top bot]] : glyph-proc
local maskLT : slabType == SLAB-ALL || slabType == SLAB-MOTION
local maskRT : slabType == SLAB-ALL

Expand All @@ -51,35 +50,29 @@ glyph-block Letter-Latin-Upper-Y : begin
include : HOverlayBar SB RightSB ([mix bot [YCrossPos CAP 0] 0.5] - OverlayStroke * ks)
include : HOverlayBar SB RightSB [mix bot [YCrossPos CAP 0] 1.0]

define [YHookLeftHookedStroke top bot] : begin
local cross : YCrossPos top bot
return : dispiro
widths.lhs
straight.right.start (SB - TailX / 3) (top - Stroke - O)
g4 (SB + TailX / 3) (top - TailY) [widths.lhs : AdviceStroke 2.75]
quadControls 0.55 0.7 32 unimportant
g4 (Middle - [HSwToV : 0.5 * Stroke]) cross [widths.lhs : AdviceStroke 3.5]

define [YHookRightHookedStroke top bot] : begin
local cross : YCrossPos top bot
return : dispiro
widths.rhs
straight.left.start (RightSB + TailX / 3) (top - Stroke - O)
g4 (RightSB - TailX / 3) (top - TailY) [widths.rhs : AdviceStroke 2.75]
quadControls 0.55 0.7 32 unimportant
g4 (Middle + [HSwToV : 0.5 * Stroke]) cross [widths.rhs : AdviceStroke 3.5]

define [YHookTopShape bodyType slabType top bot] : glyph-proc
include : YShape bodyType slabType top bot
define [YHookLeftHookedStroke top bot cross] : dispiro
widths.lhs
straight.right.start (SB - TailX / 3) (top - Stroke - O)
g4 (SB + TailX / 3) (top - TailY) [widths.lhs : AdviceStroke 2.75]
quadControls 0.55 0.7 32 unimportant
g4 (Middle - [HSwToV : 0.5 * Stroke]) cross [widths.lhs : AdviceStroke 3.5]

define [YHookRightHookedStroke top bot cross] : dispiro
widths.rhs
straight.left.start (RightSB + TailX / 3) (top - Stroke - O)
g4 (RightSB - TailX / 3) (top - TailY) [widths.rhs : AdviceStroke 2.75]
quadControls 0.55 0.7 32 unimportant
g4 (Middle + [HSwToV : 0.5 * Stroke]) cross [widths.rhs : AdviceStroke 3.5]

define [YHookTopShape] : with-params [bodyType slabType top bot [cross : YCrossPos top bot]] : glyph-proc
include : YShape bodyType slabType top bot cross
eject-contour 'strokeRT'
include : YHookRightHookedStroke top bot

define [UpsilonHookedSymbolShape top bot] : glyph-proc
local cross : YCrossPos top bot
include : YHookRightHookedStroke top bot cross

define [UpsilonHookedSymbolShape] : with-params [top bot [cross : YCrossPos top bot]] : glyph-proc
include : VBar.m Middle bot (cross + HalfStroke)
include : YHookLeftHookedStroke top bot
include : YHookRightHookedStroke top bot
include : YHookLeftHookedStroke top bot cross
include : YHookRightHookedStroke top bot cross

define YConfig : object
straightSerifless { BODY-STRAIGHT SLAB-NONE }
Expand Down Expand Up @@ -116,7 +109,7 @@ glyph-block Letter-Latin-Upper-Y : begin
if (slabType !== SLAB-BASE) : begin
create-glyph "cyrl/ue.\(suffix)" : glyph-proc
include : MarkSet.p
include : YShape bodyType slabType XH Descender
include : YShape bodyType slabType XH Descender (cross -- 0)
include : YSlabs slabType XH Descender

if ((slabType === SLAB-NONE || slabType === SLAB-BASE) && bodyType === BODY-STRAIGHT) : begin
Expand Down
Loading