Optimize jut length of serifs of J.serifedSymmetric. (#2800)

This commit is contained in:
John McWilliams 2025-06-10 20:15:57 -04:00 committed by GitHub
parent bd60530a4a
commit 06236bcc3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,11 +19,11 @@ glyph-block Letter-Latin-Upper-J : begin
local xBarRight : df.rightSB - JBalance2
set-base-anchor 'above' (xBarRight - [HSwToV : 0.75 * Stroke]) top
set-base-anchor 'above' (xBarRight - [HSwToV : 0.75 * Stroke]) top
set-base-anchor 'overlay' (xBarRight - [HSwToV : 0.75 * Stroke]) (top * OverlayPos)
set-base-anchor 'jTopSerifAttach' (xBarRight - [HSwToV HalfStroke]) top
local sw : Math.min (0.4 * (xBarRight - df.leftSB)) Stroke
local sw : Math.min Stroke : 0.4 * (xBarRight - df.leftSB)
local hookx : 0.75 * df.leftSB
include : dispiro
@ -36,19 +36,22 @@ glyph-block Letter-Latin-Upper-J : begin
define [JFlatHookBase df dfHook top] : glyph-proc
set-width df.width
include : df.markSet.[if (top > XH) 'capital' 'e']
set-base-anchor 'above' (df.rightSB - [HSwToV : 0.75 * Stroke] - JBalance2) top
set-base-anchor 'overlay' (df.rightSB - [HSwToV : 0.75 * Stroke] - JBalance2) (top * OverlayPos)
set-base-anchor 'jTopSerifAttach' (df.rightSB - JBalance2 - [HSwToV HalfStroke]) top
local sw : Math.min (0.4 * (df.rightSB - JBalance2 - df.leftSB)) Stroke
local xBarRight : df.rightSB - JBalance2
set-base-anchor 'above' (xBarRight - [HSwToV : 0.75 * Stroke]) top
set-base-anchor 'overlay' (xBarRight - [HSwToV : 0.75 * Stroke]) (top * OverlayPos)
set-base-anchor 'jTopSerifAttach' (xBarRight - [HSwToV HalfStroke]) top
local sw : Math.min Stroke : 0.4 * (xBarRight - df.leftSB)
local hookx : 0.75 * df.leftSB
local hd : FlatHookDepth dfHook
include : dispiro
flat (df.rightSB - JBalance2) top [widths.rhs.heading sw Downward]
curl (df.rightSB - JBalance2) (HalfStroke + 1.375 * hd.y)
flat xBarRight top [widths.rhs.heading sw Downward]
curl xBarRight (HalfStroke + 1.375 * hd.y)
arcvh.superness DesignParameters.tightHookSuperness
flat (df.rightSB - JBalance2 - [Math.min (0.625 * (df.rightSB - df.leftSB)) (1.375 * hd.x)]) 0 [widths.rhs Stroke]
flat (xBarRight - [Math.min (0.625 * (df.rightSB - df.leftSB)) (1.375 * hd.x)]) 0 [widths.rhs Stroke]
curl df.leftSB 0
define [JDescendingBentHookBase df dfHook top] : glyph-proc
@ -56,7 +59,7 @@ glyph-block Letter-Latin-Upper-J : begin
include : df.markSet.[if (top > XH) 'capDesc' 'p']
local center : df.middle + JBalance + [HSwToV HalfStroke]
set-base-anchor 'above' (center - [HSwToV HalfStroke]) top
set-base-anchor 'above' (center - [HSwToV HalfStroke]) top
set-base-anchor 'overlay' (center - [HSwToV HalfStroke]) (top / 2)
set-base-anchor 'jTopSerifAttach' (center - [HSwToV HalfStroke]) top
@ -75,7 +78,7 @@ glyph-block Letter-Latin-Upper-J : begin
set-width df.width
include : df.markSet.(markClass)
set-base-anchor 'above' xc top
set-base-anchor 'above' xc top
set-base-anchor 'overlay' xc (top / 2)
set-base-anchor 'jTopSerifAttach' xc top
@ -87,8 +90,8 @@ glyph-block Letter-Latin-Upper-J : begin
curl (xc + [HSwToV HalfStroke]) (bottom + fine + rinner * 2)
CurlyTail.n fine bottom xCo
x2 -- df.width
y2 -- bottom + 0.5 * fine
yLoopTop -- bottom + 2 * fine + 2 * rinner
y2 -- (bottom + 0.5 * fine)
yLoopTop -- (bottom + 2 * fine + 2 * rinner)
define [JDescendingFlatHookSeriflessBase df dfHook top] : glyph-proc
set-width df.width
@ -106,9 +109,9 @@ glyph-block Letter-Latin-Upper-J : begin
barCenter -- (df.middle + JBalance * df.adws)
serif -- true
define [JLeftwardSerif df x top] : HSerif.lt x top LongJut
define [JLeftwardSerif df x top] : HSerif.lt x top LongJut
define [JBothSidesSerif df x top] : union [HSerif.lt x top LongJut] [HSerif.rt x top Jut]
define [JSymmetricSerif df x top] : HSerif.mt (x + O) top (Jut + JBalance2)
define [JSymmetricSerif df x top] : HSerif.mt (x + OX) top MidJutCenter
define JConfig : SuffixCfg.weave
object # height and hook
@ -153,10 +156,10 @@ glyph-block Letter-Latin-Upper-J : begin
CreateAccentedComposition 'JAcute' null 'J' 'acuteAbove'
create-glyph 'mathbb/J' 0x1D541 : glyph-proc
local hookx (0.75 * SB)
local hookx : 0.75 * SB
include : MarkSet.capital
set-base-anchor 'above' (RightSB - [HSwToV : 0.75 * BBD] - JBalance2) CAP
set-base-anchor 'above' (RightSB - [HSwToV : 0.75 * BBD] - JBalance2) CAP
set-base-anchor 'overlay' (RightSB - [HSwToV : 0.75 * BBD] - JBalance2) (CAP * OverlayPos)
include : dispiro