Optimize jut length of serifs of Latin Upper I (I) under QP. (#2796)

This commit is contained in:
John McWilliams 2025-06-04 21:15:32 -04:00 committed by GitHub
parent a4b98437ce
commit df20c354fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,28 +11,31 @@ glyph-block Letter-Latin-Upper-I : begin
glyph-block-import Letter-Shared : SetGrekUpperTonos CreateAccentedComposition glyph-block-import Letter-Shared : SetGrekUpperTonos CreateAccentedComposition
glyph-block-import Mark-Adjustment : ExtendAboveBaseAnchors glyph-block-import Mark-Adjustment : ExtendAboveBaseAnchors
define [ISeriflessShape df top bot jut] : glyph-proc define [ISeriflessShape df top] : glyph-proc
include : VBar.m df.middle bot top include : VBar.m df.middle 0 top
define [ISerifShapeImpl df top bot jut] : glyph-proc define ISerifs : namespace
include : VBar.m df.middle bot top export : define [Impl df top jut] : glyph-proc
include : HSerif.mb df.middle bot jut include : HSerif.mb df.middle 0 jut
include : HSerif.mt df.middle top jut include : HSerif.mt df.middle top jut
set-base-anchor 'trailing' (df.middle + jut) bot set-base-anchor 'trailing' (df.middle + jut) 0
define [ISerifShape df top bot jut] : ISerifShapeImpl df top bot (jut * df.adws) export : define [None df top] : no-shape
export : define [Long df top] : Impl df top : Math.max MidJutCenter (LongJut * df.adws)
export : define [Short df top] : Impl df top : Math.max Jut (MidJutCenter * df.adws)
define UpperIConfig : object define UpperIConfig : object
'straight' { para.advanceScaleI ISeriflessShape LongJut } 'straight' { para.advanceScaleI ISerifs.None }
'serifless' { para.advanceScaleII ISeriflessShape LongJut } 'serifless' { para.advanceScaleII ISerifs.None }
'serifed' { para.advanceScaleI ISerifShape LongJut } 'serifed' { para.advanceScaleI ISerifs.Long }
'shortSerifed' { para.advanceScaleI ISerifShape MidJutCenter } 'shortSerifed' { para.advanceScaleI ISerifs.Short }
foreach { suffix { adws Body jut } } [Object.entries UpperIConfig] : do foreach { suffix { adws Serifs } } [Object.entries UpperIConfig] : do
create-glyph "I.\(suffix)" : glyph-proc create-glyph "I.\(suffix)" : glyph-proc
local df : include : DivFrame adws local df : include : DivFrame adws
include : df.markSet.capital include : df.markSet.capital
include : Body df CAP 0 jut include : ISeriflessShape df CAP
include : Serifs df CAP
create-glyph "grek/Iota.\(suffix)" : glyph-proc create-glyph "grek/Iota.\(suffix)" : glyph-proc
include [refer-glyph "I.\(suffix)"] AS_BASE ALSO_METRICS include [refer-glyph "I.\(suffix)"] AS_BASE ALSO_METRICS
@ -41,15 +44,17 @@ glyph-block Letter-Latin-Upper-I : begin
create-glyph "ISideways.\(suffix)" : glyph-proc create-glyph "ISideways.\(suffix)" : glyph-proc
local df : DivFrame (XH / Width) 2 (XH * 0.1 / SB) local df : DivFrame (XH / Width) 2 (XH * 0.1 / SB)
include : PointingTo Width XH Width 0 : function [] : glyph-proc include : PointingTo Width XH Width 0 : function [] : glyph-proc
include : Body df (Width - SB) 0 jut include : ISeriflessShape df RightSB
include : Serifs df RightSB
include : ApparentTranslate 0 (0.5 * SB) include : ApparentTranslate 0 (0.5 * SB)
create-glyph "ILonga.\(suffix)" : glyph-proc create-glyph "ILonga.\(suffix)" : glyph-proc
local df : include : DivFrame adws local df : include : DivFrame adws
include : df.markSet.capital include : df.markSet.capital
local top : CAP + Ascender - XH local top : CAP + (Ascender - XH)
include : ExtendAboveBaseAnchors top include : ExtendAboveBaseAnchors top
include : Body df top 0 jut include : ISeriflessShape df top
include : Serifs df top
select-variant 'I' 'I' select-variant 'I' 'I'
link-reduced-variant 'I/sansSerif' 'I' MathSansSerif link-reduced-variant 'I/sansSerif' 'I' MathSansSerif
@ -67,7 +72,8 @@ glyph-block Letter-Latin-Upper-I : begin
create-glyph 'smcpI' 0x26A : glyph-proc create-glyph 'smcpI' 0x26A : glyph-proc
local df : include : DivFrame para.advanceScaleI local df : include : DivFrame para.advanceScaleI
include : df.markSet.e include : df.markSet.e
include : ISerifShapeImpl df XH 0 MidJutCenter include : ISeriflessShape df XH
include : ISerifs.Impl df XH MidJutCenter
CreateAccentedComposition 'smcpIBarOver' 0x1D7B 'smcpI' 'barOver' CreateAccentedComposition 'smcpIBarOver' 0x1D7B 'smcpI' 'barOver'
@ -75,5 +81,5 @@ glyph-block Letter-Latin-Upper-I : begin
create-glyph 'mathbb/I' 0x1D540 : glyph-proc create-glyph 'mathbb/I' 0x1D540 : glyph-proc
include : MarkSet.capital include : MarkSet.capital
include : BBBarCenter Middle 0 CAP include : BBBarCenter Middle 0 CAP
include : HBar.t (Middle - BBD / 2 - Jut) (Middle + BBD / 2 + Jut) CAP BBS include : HBar.t (Middle - BBD / 2 - Jut) (Middle + BBD / 2 + Jut) CAP BBS
include : HBar.b (Middle - BBD / 2 - Jut) (Middle + BBD / 2 + Jut) 0 BBS include : HBar.b (Middle - BBD / 2 - Jut) (Middle + BBD / 2 + Jut) 0 BBS