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

Cleanup/Optimize glyph shape of Latin Small Letter Script R (U+AB4B). #2680

Merged
merged 3 commits into from
Feb 16, 2025
Merged
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
30 changes: 15 additions & 15 deletions packages/font-glyphs/src/letter/latin-ext/script-r.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ glyph-block Letter-Latin-Script-R : begin
define [ScriptRShape top left right fTailed sw] : glyph-proc
include : tagged 'strokeR' : if fTailed
RightwardTailedBar right 0 (top - 0.5 * sw) (sw -- sw)
VBar.r right 0 (top - 0.5 * sw) sw
include : dispiro
widths.rhs sw
g4 left (top - O) [heading Rightward]
g4 [mix left right 0.5] (top + O)
g4 right (top - O) [heading Rightward]
if SLAB : begin
include : VSerif.dl left (top - 0.5 * sw) (VJut - 0.5 * sw) (VJutStroke * (sw / Stroke))
if [not fTailed] : include : if para.isItalic [HSerif.rb right 0 SideJut] : composite-proc
HSerif.rb (right - [HSwToV : 0.5 * sw]) 0 Jut
HSerif.lb (right - [HSwToV : 0.5 * sw]) 0 MidJutSide
VBar.r right 0 (top - 0.5 * sw) sw
include : union
VBar.l left (top - VJut) (top - 0.5 * sw) (VJutStroke * (sw / Stroke))
dispiro
widths.rhs sw
g4 left (top - O) [heading Rightward]
g4 [mix left right 0.5] (top + O)
g4 right (top - O) [heading Rightward]
if (SLAB && !fTailed) : include : if para.isItalic [HSerif.rb right 0 SideJut] : composite-proc
HSerif.rb (right - [HSwToV : 0.5 * sw]) 0 Jut
HSerif.lb (right - [HSwToV : 0.5 * sw]) 0 MidJutSide

define ScriptRConfig : object
standard false
Expand All @@ -48,19 +48,19 @@ glyph-block Letter-Latin-Script-R : begin
include : ScriptRShape XH SB [xBarRight subDf] true subDf.mvs
eject-contour 'strokeR'

local swBowl : [AdviceStroke 2.75] * (subDf.mvs / Stroke)
local swBowl : [AdviceStroke 3] * (subDf.mvs / Stroke)
local fineBowl : ShoulderFine * (swBowl / Stroke)

local yBar : 0.5 * XH + 0.5 * swBowl

local ada : ArchDepthAOf ArchDepth : df.rightSB - ([xBarRight subDf] - [HSwToV subDf.mvs]) + SB * 2
local adb : ArchDepthBOf ArchDepth : df.rightSB - ([xBarRight subDf] - [HSwToV subDf.mvs]) + SB * 2
local ada : ArchDepthAOf SmallArchDepth : df.width - ([xBarRight subDf] - subDf.leftSB) + [HSwToV subDf.mvs]
local adb : ArchDepthBOf SmallArchDepth : df.width - ([xBarRight subDf] - subDf.leftSB) + [HSwToV subDf.mvs]

include : dispiro
flat ([xBarRight subDf] - [HSwToV subDf.mvs]) (XH - 0.5 * subDf.mvs) [widths.lhs.heading subDf.mvs Downward]
curl ([xBarRight subDf] - [HSwToV subDf.mvs]) [YSmoothMidL yBar 0 ada adb]
arch.lhs 0 (sw -- subDf.mvs) (swAfter -- swBowl)
g4 (df.rightSB - OX) [YSmoothMidR yBar 0 ada adb]
g4 (df.rightSB - OX) [YSmoothMidR yBar 0 ada adb] [widths.lhs swBowl]
arch.lhs yBar (sw -- swBowl) (swAfter -- fineBowl)
g4.down.end ([xBarRight subDf] - [HSwToV fineBowl]) [YSmoothMidL yBar 0 ada adb] [widths.lhs.heading fineBowl Downward]

Expand Down