* Improve T's metrics for Etoile (#1449).

* Fix custom build of ligations when `ineq` is disabled but `ltgt-diamond-tag` or `ltgt-slash-tag` are enabled (#1450).
This commit is contained in:
be5invis 2022-11-24 16:42:50 -08:00
parent 7fd0cb1a44
commit 153cf38e85
3 changed files with 102 additions and 91 deletions

2
changes/16.5.0.md Normal file
View file

@ -0,0 +1,2 @@
* Improve T's metrics for Etoile (#1449).
* Fix custom build of ligations when `ineq` is disabled but `ltgt-diamond-tag` or `ltgt-slash-tag` are enabled (#1450).

View file

@ -12,58 +12,69 @@ glyph-block Letter-Latin-Upper-T : begin
glyph-block-import Letter-Latin-Lower-M glyph-block-import Letter-Latin-Lower-M
glyph-block-import Letter-Shared-Shapes : CyrDescender glyph-block-import Letter-Shared-Shapes : CyrDescender
define TLeftX : SB + OX * 1.5 define [TLeftX df] : df.leftSB + OX * 1.5
define TRightX : RightSB - OX * 1.5 define [TRightX df] : df.rightSB - OX * 1.5
define [TShape top doTopSerifs doBottomSerifs] : glyph-proc define [TShape df top doTopSerifs doBottomSerifs] : glyph-proc
include : VBar Middle 0 top include : VBar df.middle 0 top
local l TLeftX local l : TLeftX df
local r TRightX local r : TRightX df
include : tagged 'strokeLT' : HBarTop l Middle top include : tagged 'strokeLT' : HBarTop l df.middle top
include : tagged 'strokeRT' : HBarTop Middle r top include : tagged 'strokeRT' : HBarTop df.middle r top
if doTopSerifs : begin if doTopSerifs : begin
include : tagged 'serifRT' : DownwardRightSerif r top VJut include : tagged 'serifRT' : DownwardRightSerif r top VJut
include : tagged 'serifLT' : DownwardLeftSerif l top VJut include : tagged 'serifLT' : DownwardLeftSerif l top VJut
if doBottomSerifs : begin if doBottomSerifs : begin
include : tagged 'serifMB' : RightwardBottomSerif Middle 0 MidJutCenter include : tagged 'serifMB' : RightwardBottomSerif df.middle 0 MidJutCenter
include : tagged 'serifMB' : LeftwardBottomSerif Middle 0 MidJutCenter include : tagged 'serifMB' : LeftwardBottomSerif df.middle 0 MidJutCenter
define TConfig : object define TConfig : object
serifless { false false } serifless { 1 false false }
motionSerifed { true false } motionSerifed { [mix 1 para.diversityM 0.5] true false }
serifed { true true } serifed { [mix 1 para.diversityM 0.5] true true }
foreach { suffix { div doST doSB } } [Object.entries TConfig] : do
local df : DivFrame div
foreach { suffix { doST doSB } } [Object.entries TConfig] : do
create-glyph "T.\(suffix)" : glyph-proc create-glyph "T.\(suffix)" : glyph-proc
include : MarkSet.capital set-width df.width
set-base-anchor 'bottomright' (Middle + HalfStroke * HVContrast) 0 include : df.markSet.capital
include : TShape CAP doST doSB set-base-anchor 'bottomright' (df.middle + HalfStroke * HVContrast) 0
include : TShape df CAP doST doSB
create-glyph "cyrl/TeDescender.\(suffix)" : glyph-proc create-glyph "cyrl/TeDescender.\(suffix)" : glyph-proc
include : MarkSet.if set-width df.width
set-base-anchor 'bottomright' (Middle + HalfStroke * HVContrast) 0 include : df.markSet.if
include : TShape CAP doST doSB set-base-anchor 'bottomright' (df.middle + HalfStroke * HVContrast) 0
include : CyrDescender (Middle + HalfStroke * HVContrast) (overflow -- [if doSB (MidJutCenter - HalfStroke * HVContrast)]) include : TShape df CAP doST doSB
include : CyrDescender (df.middle + HalfStroke * HVContrast) (overflow -- [if doSB (MidJutCenter - HalfStroke * HVContrast)])
create-glyph "TBar.\(suffix)" : glyph-proc create-glyph "TBar.\(suffix)" : glyph-proc
include [refer-glyph "T.\(suffix)"] AS_BASE ALSO_METRICS include [refer-glyph "T.\(suffix)"] AS_BASE ALSO_METRICS
include : HOverlayBar [mix Middle SB 0.8] [mix Middle RightSB 0.8] [mix 0 CAP 0.45] include : HOverlayBar
mix df.middle df.leftSB 0.8
mix df.middle df.rightSB 0.8
mix 0 CAP 0.45
create-glyph "Thookleft.\(suffix)" : glyph-proc create-glyph "Thookleft.\(suffix)" : glyph-proc
include [refer-glyph "T.\(suffix)"] AS_BASE ALSO_METRICS include [refer-glyph "T.\(suffix)"] AS_BASE ALSO_METRICS
eject-contour 'serifLT' eject-contour 'serifLT'
eject-contour 'strokeLT' eject-contour 'strokeLT'
include : LeftHook (SB + LeftHook.extension) CAP Middle include : LeftHook (df.leftSB + LeftHook.extension) CAP df.middle
create-glyph "smcpT.\(suffix)" : glyph-proc create-glyph "smcpT.\(suffix)" : glyph-proc
include : MarkSet.e set-width df.width
set-base-anchor 'bottomright' (Middle + HalfStroke * HVContrast) 0 include : df.markSet.e
include : TShape XH doST doSB set-base-anchor 'bottomright' (df.middle + HalfStroke * HVContrast) 0
include : TShape df XH doST doSB
create-glyph "cyrl/teDescender.upright.\(suffix)" : glyph-proc create-glyph "cyrl/teDescender.upright.\(suffix)" : glyph-proc
include : MarkSet.p set-width df.width
include : TShape XH doST doSB include : df.markSet.p
include : CyrDescender (Middle + HalfStroke * HVContrast) (overflow -- [if doSB (MidJutCenter - HalfStroke * HVContrast)]) include : TShape df XH doST doSB
include : CyrDescender (df.middle + HalfStroke * HVContrast) (overflow -- [if doSB (MidJutCenter - HalfStroke * HVContrast)])
turned "turnT.\(suffix)" nothing "T.\(suffix)" df.middle (CAP / 2)
select-variant 'T' 'T' select-variant 'T' 'T'
link-reduced-variant 'T/sansSerif' 'T' MathSansSerif link-reduced-variant 'T/sansSerif' 'T' MathSansSerif
@ -72,11 +83,11 @@ glyph-block Letter-Latin-Upper-T : begin
select-variant "TBar" 0x166 (follow -- 'T') select-variant "TBar" 0x166 (follow -- 'T')
select-variant "Thookleft" 0x1AC (follow -- 'T') select-variant "Thookleft" 0x1AC (follow -- 'T')
select-variant "cyrl/TeDescender" 0x4AC (follow -- 'T') select-variant "cyrl/TeDescender" 0x4AC (follow -- 'T')
select-variant 'turnT' 0xA7B1 (follow -- 'T')
alias 'grek/Tau' 0x3A4 'T' alias 'grek/Tau' 0x3A4 'T'
alias-reduced-variant 'grek/Tau/sansSerif' 'grek/Tau' 'T/sansSerif' MathSansSerif alias-reduced-variant 'grek/Tau/sansSerif' 'grek/Tau' 'T/sansSerif' MathSansSerif
alias 'cyrl/Te' 0x422 'T' alias 'cyrl/Te' 0x422 'T'
turned 'turnT' 0xA7B1 'T' Middle (CAP / 2)
alias 'cyrl/te.upright' null 'smcpT' alias 'cyrl/te.upright' null 'smcpT'
select-variant 'cyrl/teDescender.upright' (follow -- 'T') select-variant 'cyrl/teDescender.upright' (follow -- 'T')
@ -84,8 +95,9 @@ glyph-block Letter-Latin-Upper-T : begin
derive-composites 'TRtailBR' 0x1AE 'T/rtailBase' 'rtailBR' derive-composites 'TRtailBR' 0x1AE 'T/rtailBase' 'rtailBR'
create-glyph 'mathbb/T' 0x1D54B : glyph-proc create-glyph 'mathbb/T' 0x1D54B : glyph-proc
include : MarkSet.capital local df : DivFrame 1
include : HBarTop TLeftX TRightX CAP BBS include : df.markSet.capital
include : VBar (Middle - BBD / 2) 0 CAP BBS include : HBarTop [TLeftX df] [TRightX df] CAP BBS
include : VBar (Middle + BBD / 2) 0 CAP BBS include : VBar (df.middle - BBD / 2) 0 CAP BBS
include : HBarBottom (Middle - BBD / 2) (Middle + BBD / 2) 0 BBS include : VBar (df.middle + BBD / 2) 0 CAP BBS
include : HBarBottom (df.middle - BBD / 2) (df.middle + BBD / 2) 0 BBS

View file

@ -838,65 +838,62 @@ define [buildLigationsImpl sink para featureName mappedFeature rankedLookups] :
equal ~> {'equal.cf'} equal ~> {'equal.cf'}
# <= and >= # <= and >=
do "inequals" : if [hasLG 'ineq'] : begin do "inequals" : CreateLigationLookup : list
CreateLigationLookup : list # Disable regular expression lookaheads
# Disable regular expression lookaheads if [hasLG 'ineq'] : chain-rule
chain-rule {'parenLeft'} ~>look-around
{'parenLeft'} ~> look-around {'question'} ~> look-around
{'question'} ~> look-around regexLookAround ~> advance
regexLookAround ~> advance regexLookAround ~> advance
regexLookAround ~> advance regexLookAround ~> advance
regexLookAround ~> advance regexLookAround ~> advance
regexLookAround ~> advance if [hasLG 'ineq'] : chain-rule
chain-rule {'parenLeft'} ~> look-around
{'parenLeft'} ~> look-around {'question'} ~> look-around
{'question'} ~> look-around regexLookAround ~> advance
regexLookAround ~> advance regexLookAround ~> advance
regexLookAround ~> advance regexLookAround ~> advance
regexLookAround ~> advance if [hasLG 'ineq'] : chain-rule
chain-rule {'parenLeft'} ~> look-around
{'parenLeft'} ~> look-around {'question'} ~> look-around
{'question'} ~> look-around regexLookAround ~> advance
regexLookAround ~> advance regexLookAround ~> advance
regexLookAround ~> advance
# <> # <>
piecewise piecewise
[hasLG 'ltgt-diamond'] : chain-rule [hasLG 'ltgt-diamond'] : chain-rule
lessAndEquiv ~> [just 'less.lig.diamond'] lessAndEquiv ~> [just 'less.lig.diamond']
greaterAndEquiv ~> [just 'greater.lig.diamond'] greaterAndEquiv ~> [just 'greater.lig.diamond']
[hasLG 'ltgt-diamond-tag'] : chain-rule [hasLG 'ltgt-diamond-tag'] : chain-rule
lessAndEquiv ~> [just 'less.lig.diamond.tag'] lessAndEquiv ~> [just 'less.lig.diamond.tag']
greaterAndEquiv ~> [just 'greater.lig.diamond.tag'] greaterAndEquiv ~> [just 'greater.lig.diamond.tag']
[hasLG 'ltgt-ne'] : chain-rule [hasLG 'ltgt-ne'] : chain-rule
lessAndEquiv ~> [just 'neq.bar-only.2l'] lessAndEquiv ~> [just 'neq.bar-only.2l']
greaterAndEquiv ~> [just 'equal.fc+cf'] greaterAndEquiv ~> [just 'equal.fc+cf']
# <=, >= # <=, >=
chain-rule if [hasLG 'ineq'] : chain-rule
[acops] ~> look-around [acops] ~> look-around
lessOrGreaterAndEquiv ~> advance lessOrGreaterAndEquiv ~> advance
equal ~> advance equal ~> advance
chain-rule if [hasLG 'ineq'] : chain-rule
lessOrGreaterAndEquiv ~> advance lessOrGreaterAndEquiv ~> advance
equal ~> advance equal ~> advance
[acops] ~> look-around [acops] ~> look-around
chain-rule if [hasLG 'ineq'] : chain-rule
lessAndEquiv ~> [just 'less.lig2'] lessAndEquiv ~> [just 'less.lig2']
equal ~> {'eq.at-lteq.lig2'} equal ~> {'eq.at-lteq.lig2'}
chain-rule if [hasLG 'ineq'] : chain-rule
greaterAndEquiv ~> [just 'greater.lig2'] greaterAndEquiv ~> [just 'greater.lig2']
equal ~> {'eq.at-gteq.lig2'} equal ~> {'eq.at-gteq.lig2'}
# </, /> and </> # </, /> and </>
piecewise if [hasLG 'ltgt-slash-tag'] : chain-rule
[hasLG 'ltgt-slash-tag'] : chain-rule lessAndEquiv ~> [just 'less.lig.tag-slash']
lessAndEquiv ~> [just 'less.lig.tag-slash'] slash ~> look-around
slash ~> look-around if [hasLG 'ltgt-slash-tag'] : chain-rule
piecewise slash ~> look-around
[hasLG 'ltgt-slash-tag'] : chain-rule greaterAndEquiv ~> [just 'greater.lig.tag-slash']
slash ~> look-around
greaterAndEquiv ~> [just 'greater.lig.tag-slash']
# :> # :>
do "colon-less-greater" : if [hasLG 'colon-greater'] : begin do "colon-less-greater" : if [hasLG 'colon-greater'] : begin