Unify horizontal overshoots of top bars of Upper Gamma-like letters. (#2779)

* Optimize overshoot of Script R and Cyrillic Tall Te.

* Optimize overshoot of Greek Upper Gamma.
This commit is contained in:
John McWilliams 2025-05-21 20:29:21 -04:00 committed by GitHub
parent 9dea9c8dcf
commit 773d1d29e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 53 additions and 40 deletions

View file

@ -21,22 +21,23 @@ glyph-block Letter-Greek-Upper-Gamma: begin
define SLAB-BOTTOM 2
define SLAB-ALL 3
define GammaBarLeft : SB * 1.5
define GammaBarLeftX : SB * 1.5
define GammaRightX : RightSB - 0.75 * OX
define [GammaShape top bot slabType] : glyph-proc
include : LeaningAnchor.Below.VBar.l GammaBarLeft
include : tagged 'strokeV' : VBar.l GammaBarLeft bot top
include : tagged 'strokeH' : HBar.t (GammaBarLeft - O) (RightSB - OX) top
include : LeaningAnchor.Below.VBar.l GammaBarLeftX
include : tagged 'strokeV' : VBar.l GammaBarLeftX bot top
include : tagged 'strokeH' : HBar.t (GammaBarLeftX - O) GammaRightX top
match slabType
[Just SLAB-ALL] : begin
include : HSerif.lt GammaBarLeft top SideJut
include : tagged 'serifLB' : HSerif.lb (GammaBarLeft + [HSwToV HalfStroke]) bot Jut
include : tagged 'serifLB' : HSerif.rb (GammaBarLeft + [HSwToV HalfStroke]) bot MidJutSide
include : tagged 'serifRT' : VSerif.dr (RightSB - OX) top VJut
include : HSerif.lt GammaBarLeftX top SideJut
include : tagged 'serifLB' : HSerif.lb (GammaBarLeftX + [HSwToV HalfStroke]) bot Jut
include : tagged 'serifLB' : HSerif.rb (GammaBarLeftX + [HSwToV HalfStroke]) bot MidJutSide
include : tagged 'serifRT' : VSerif.dr GammaRightX top VJut
[Just SLAB-BOTTOM] : begin
include : tagged 'serifLB' : HSerif.lb (GammaBarLeft + [HSwToV HalfStroke]) bot Jut
include : tagged 'serifLB' : HSerif.rb (GammaBarLeft + [HSwToV HalfStroke]) bot MidJutSide
include : tagged 'serifLB' : HSerif.lb (GammaBarLeftX + [HSwToV HalfStroke]) bot Jut
include : tagged 'serifLB' : HSerif.rb (GammaBarLeftX + [HSwToV HalfStroke]) bot MidJutSide
[Just SLAB-TR] : begin
include : tagged 'serifRT' : VSerif.dr (RightSB - OX) top VJut
include : tagged 'serifRT' : VSerif.dr GammaRightX top VJut
define GammaConfig : object
serifless { SLAB-NONE false }
@ -53,21 +54,21 @@ glyph-block Letter-Greek-Upper-Gamma: begin
include : MarkSet.capital
include : GammaShape CAP 0 slabType
local yBar : CAP * DesignParameters.upperEBarPos
include : HBar.m GammaBarLeft (RightSB - [xMidBarShrink doST]) yBar
include : HBar.m GammaBarLeftX (RightSB - [xMidBarShrink doST]) yBar
if doST : include : tagged 'serifRM'
VSerif.dr (RightSB - [xMidBarShrink doST]) (yBar + HalfStroke) [mix Stroke VJut 0.5]
create-glyph "cyrl/GheDescender.\(suffix)" : glyph-proc
include [refer-glyph "grek/Gamma.\(suffix)"] AS_BASE ALSO_METRICS
include : CyrDescender.rSideJut
x -- (GammaBarLeft + [HSwToV Stroke])
x -- (GammaBarLeftX + [HSwToV Stroke])
y -- 0
jut -- MidJutSide
create-glyph "cyrl/GheDHook.\(suffix)" : glyph-proc
include [refer-glyph "grek/Gamma.\(suffix)"] AS_BASE ALSO_METRICS
include : PalatalHook.rSideJut
x -- (GammaBarLeft + [HSwToV Stroke])
x -- (GammaBarLeftX + [HSwToV Stroke])
y -- 0
jut -- MidJutSide
@ -78,14 +79,14 @@ glyph-block Letter-Greek-Upper-Gamma: begin
create-glyph "cyrl/gheDescender.upright.\(suffix)" : glyph-proc
include [refer-glyph "cyrl/ghe.upright.\(suffix)"] AS_BASE ALSO_METRICS
include : CyrDescender.rSideJut
x -- (GammaBarLeft + [HSwToV Stroke])
x -- (GammaBarLeftX + [HSwToV Stroke])
y -- 0
jut -- MidJutSide
create-glyph "cyrl/gheDHook.upright.\(suffix)" : glyph-proc
include [refer-glyph "cyrl/ghe.upright.\(suffix)"] AS_BASE ALSO_METRICS
include : PalatalHook.rSideJut
x -- (GammaBarLeft + [HSwToV Stroke])
x -- (GammaBarLeftX + [HSwToV Stroke])
y -- 0
jut -- MidJutSide
@ -94,29 +95,29 @@ glyph-block Letter-Greek-Upper-Gamma: begin
include : ExtendAboveBaseAnchors (CAP + LongVJut - QuarterStroke)
include : GammaShape CAP 0 slabType
eject-contour 'serifRT'
include : VBar.r (RightSB - OX) CAP (CAP + LongVJut - QuarterStroke) VJutStroke
include : VBar.r GammaRightX CAP (CAP + LongVJut - QuarterStroke) VJutStroke
create-glyph "cyrl/ge.upright.\(suffix)" : glyph-proc
include : MarkSet.e
include : ExtendAboveBaseAnchors (XH + LongVJut - QuarterStroke)
include : GammaShape XH 0 slabType
eject-contour 'serifRT'
include : VBar.r (RightSB - OX) XH (XH + LongVJut - QuarterStroke) VJutStroke
include : VBar.r GammaRightX XH (XH + LongVJut - QuarterStroke) VJutStroke
create-glyph "cyrl/ge.italic.\(suffix)" : glyph-proc
include [refer-glyph "cyrl/ge.upright.\(suffix)"] AS_BASE ALSO_METRICS
eject-contour 'serifLB'
eject-contour 'strokeV'
include : LegShape
ztop -- [Point.fromXY Point.Type.Corner GammaBarLeft XH]
ztop -- [Point.fromXY Point.Type.Corner GammaBarLeftX XH]
zbot -- [Point.fromXY Point.Type.Corner [mix SB 0 : if doST 1 0.75] 0]
xb -- GammaBarLeft
xb -- GammaBarLeftX
create-glyph "cyrl/GheMidHook.\(suffix)" : glyph-proc
include [refer-glyph "grek/Gamma.\(suffix)"] AS_BASE ALSO_METRICS
include : MarkSet.capDesc
include : MidHook.general
left -- (GammaBarLeft + [HSwToV Stroke])
left -- (GammaBarLeftX + [HSwToV Stroke])
right -- RightSB
top -- (CAP * HBarPos + QuarterStroke)
ada -- ArchDepthA
@ -126,7 +127,7 @@ glyph-block Letter-Greek-Upper-Gamma: begin
include [refer-glyph "cyrl/ghe.upright.\(suffix)"] AS_BASE ALSO_METRICS
include : MarkSet.p
include : MidHook.general
left -- (GammaBarLeft + [HSwToV Stroke])
left -- (GammaBarLeftX + [HSwToV Stroke])
right -- RightSB
top -- (XH * HBarPos + QuarterStroke)
ada -- (ArchDepthA * (HBarPos ** 0.3))
@ -155,11 +156,11 @@ glyph-block Letter-Greek-Upper-Gamma: begin
include : MarkSet.p
include : GammaShape XH Descender SLAB-NONE
local yBar : mix 0 XH DesignParameters.upperEBarPos
include : HBar.m GammaBarLeft (RightSB - [xMidBarShrink SLAB]) yBar
include : HBar.m GammaBarLeftX (RightSB - [xMidBarShrink SLAB]) yBar
if SLAB : include : tagged 'serifRM'
VSerif.dr (RightSB - [xMidBarShrink SLAB]) (yBar + HalfStroke) [mix Stroke VJut 0.5]
define [GhaynOverlayBar top] : LetterBarOverlay.l GammaBarLeft (top * (1 - OverlayPos))
define [GhaynOverlayBar top] : LetterBarOverlay.l GammaBarLeftX (top * (1 - OverlayPos))
derive-composites 'cyrl/Ghayn' 0x492 'cyrl/Ghe' [GhaynOverlayBar CAP]
derive-composites 'cyrl/ghayn.upright' null 'cyrl/ghe.upright' [GhaynOverlayBar XH]
@ -169,5 +170,5 @@ glyph-block Letter-Greek-Upper-Gamma: begin
create-glyph 'mathbb/grek/Gamma' 0x213E : glyph-proc
include : MarkSet.capital
include : BBBarLeft GammaBarLeft 0 CAP
include : HBar.t GammaBarLeft RightSB CAP BBS
include : BBBarLeft GammaBarLeftX 0 CAP
include : HBar.t GammaBarLeftX GammaRightX CAP BBS

View file

@ -10,8 +10,8 @@ glyph-block Letter-Latin-Script-R : begin
glyph-block-import Mark-Adjustment : LeaningAnchor
glyph-block-import Letter-Shared-Shapes : RightwardTailedBar
define [xLeft df] : df.leftSB + 0.75 * OX
define [xBarRight df] : df.width - df.leftSB * 1.5
define [ScriptRShape top left right fTailed sw] : glyph-proc
include : tagged 'strokeR' : if fTailed
RightwardTailedBar right 0 (top - 0.5 * sw) (sw -- sw)
@ -35,7 +35,7 @@ glyph-block Letter-Latin-Script-R : begin
create-glyph "rScript.\(suffix)" : glyph-proc
local df : include : DivFrame 1
include : df.markSet.e
include : ScriptRShape XH df.leftSB [xBarRight df] doTail df.mvs
include : ScriptRShape XH [xLeft df] [xBarRight df] doTail df.mvs
include : LeaningAnchor.Below.VBar.r [xBarRight df]
select-variant 'rScript' 0xAB4B (follow -- 'cyrl/che')
@ -45,7 +45,7 @@ glyph-block Letter-Latin-Script-R : begin
include : df.markSet.e
local subDf : DivFrame (0.75 * para.advanceScaleM) 2
include : ScriptRShape XH subDf.leftSB [xBarRight subDf] true subDf.mvs
include : ScriptRShape XH [xLeft subDf] [xBarRight subDf] true subDf.mvs
eject-contour 'strokeR'
local swBowl : [AdviceStroke 3] * (subDf.mvs / Stroke)

View file

@ -16,8 +16,8 @@ glyph-block Letter-Latin-Upper-T : begin
glyph-block-import Letter-Shared-Shapes : CyrDescender SerifFrame FlatHookDepth LeftHook RetroflexHook
define ox : 0.75 * OX
define [TLeftX df] : df.leftSB + ox
define [TRightX df] : df.rightSB - ox
define [TLeftX df] : df.leftSB + 0.75 * OX
define [TRightX df] : df.rightSB - 0.75 * OX
define [TShape df top doTopSerifs doBottomSerifs] : glyph-proc
include : tagged 'strokeV' : VBar.m df.middle 0 top
local l : TLeftX df
@ -64,22 +64,22 @@ glyph-block Letter-Latin-Upper-T : begin
define [CyrlTallTeShape df top doTopSerifs doBottomSerifs] : glyph-proc
define doFullSerifs : doTopSerifs && doBottomSerifs && !para.isItalic
local xRight : df.width - 1.5 * df.leftSB
local xLeft : df.leftSB - ox
local xLeft : df.leftSB + 0.75 * OX
local xBarRight : df.width - 1.5 * df.leftSB
include : tagged 'strokeLT' : HBar.t xLeft xRight top
include : tagged 'strokeV' : VBar.r xRight 0 top
include : tagged 'strokeLT' : HBar.t xLeft xBarRight top
include : tagged 'strokeV' : VBar.r xBarRight 0 top
if doTopSerifs : begin
include : tagged 'serifLT' : VSerif.dl xLeft top VJut
if doBottomSerifs : begin
include : tagged 'serifMB' : if para.isItalic [HSerif.rb xRight 0 SideJut] : composite-proc
HSerif.rb (xRight - [HSwToV HalfStroke]) 0 Jut
HSerif.lb (xRight - [HSwToV HalfStroke]) 0 MidJutSide
include : tagged 'serifMB' : if para.isItalic [HSerif.rb xBarRight 0 SideJut] : composite-proc
HSerif.rb (xBarRight - [HSwToV HalfStroke]) 0 Jut
HSerif.lb (xBarRight - [HSwToV HalfStroke]) 0 MidJutSide
if doFullSerifs : begin
include : tagged 'serifRT' : HSerif.rt xRight top SideJut
include : tagged 'serifRT' : HSerif.rt xBarRight top SideJut
include : LeaningAnchor.Below.VBar.r xRight
include : LeaningAnchor.Below.VBar.r xBarRight
glyph-block-export TConfig
define TConfig : object