From 5d53e1097549f59e3dc6a1bc691e40527872b0d4 Mon Sep 17 00:00:00 2001 From: John McWilliams <37010132+jmcwilliams403@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:26:30 -0400 Subject: [PATCH] Some adjustments to variants of `cyrl/el.BGR` and `cyrl/ghe.SRB`. (#2374) * Make Soft Em slightly wider under QP. * Make `cyrl/el.BGR` follow Greek Capital Lambda. * Let `cyrl/ghe.SRB` use `i.{hooky-bottom|z-shaped}` --- changes/30.1.3.md | 2 ++ .../font-glyphs/src/letter/cyrillic/el.ptl | 13 +++----- .../font-glyphs/src/letter/latin/lower-g.ptl | 2 +- .../font-glyphs/src/letter/latin/lower-il.ptl | 7 ++-- .../font-glyphs/src/letter/latin/upper-a.ptl | 27 ++++++++++++---- .../font-glyphs/src/letter/latin/upper-m.ptl | 14 ++++---- params/variants.toml | 32 +++++++++---------- 7 files changed, 56 insertions(+), 41 deletions(-) diff --git a/changes/30.1.3.md b/changes/30.1.3.md index d74e40118..c68ca86f4 100644 --- a/changes/30.1.3.md +++ b/changes/30.1.3.md @@ -3,6 +3,8 @@ * Make MODIFIER LETTER DOT VERTICAL BAR (`U+A717`) ... MODIFIER LETTER DOT HORIZONTAL BAR (`U+A719`) follow variants of Diacritical Dot (`cv96`). * Fix metrics of Cyrillie EnGhe and Abkhasian Che under Aile/Etoile (#2366). * Make CYRILLIC CAPITAL LETTER SOFT DE (`U+A662`) ... CYRILLIC SMALL LETTER SOFT EM (`A667`) follow variants of Greek Capital Gamma (`cv56`). +* Make Bulgarian Cyrillic Lower El follow variants of Greek Capital Lambda (`cv60`). +* Allow Italic Serbian Cyrillic Lower Ghe to use Hooky Bottom and Z-Shaped variants of `i` (`cv34`). * Fix CV/SS application of localized form of superscript/subscript letters (#2368). * Fix IPPH/APPH localization for superscript/subscript Greek Lower Beta and Chi (`U+1D5D`, `U+1D61`, `U+1D66`, `U+1D6A`). * Improve glyph visual for `U+279D`, `U+27A2`, `U+27A3`, and `U+2B4D`. diff --git a/packages/font-glyphs/src/letter/cyrillic/el.ptl b/packages/font-glyphs/src/letter/cyrillic/el.ptl index bebb7f7f2..0cccb58b9 100644 --- a/packages/font-glyphs/src/letter/cyrillic/el.ptl +++ b/packages/font-glyphs/src/letter/cyrillic/el.ptl @@ -97,7 +97,7 @@ glyph-block Letter-Cyrillic-El : begin straight { BODY-STRAIGHT SLAB-ALL SLAB-LOWER } tailed { BODY-TAILED SLAB-TAILED-U SLAB-TAILED-I } - define CyrlSoftElGheConfig : object + define CyrSoftElGheConfig : object serifless false topRightSerifed true @@ -114,15 +114,15 @@ glyph-block Letter-Cyrillic-El : begin include : CyrElShape df.leftSB xm XH body [if SLAB [if para.isItalic slabItalic slabUpright] SLAB-NONE] df.mvs include : MidHook.m df XH - define cyrlSoftElDf : DivFrame para.diversityM 3 + define cyrSoftElDf : DivFrame para.diversityM 3 - DefineSelectorGlyph "cyrl/elSoft" suffix cyrlSoftElDf 'e' + DefineSelectorGlyph "cyrl/elSoft" suffix cyrSoftElDf 'e' - foreach { suffixGhe cyrlSoftElVSlab } [Object.entries CyrlSoftElGheConfig] : do + foreach { suffixGhe cyrSoftElVSlab } [Object.entries CyrSoftElGheConfig] : do create-glyph "cyrl/elSoft.\(suffix).\(suffixGhe)" : glyph-proc set-width 0 set-mark-anchor 'cvDecompose' 0 0 - include : CyrSoftElShape cyrlSoftElDf.leftSB cyrlSoftElDf.rightSB XH body [if SLAB [if para.isItalic slabItalic slabUpright] SLAB-NONE] cyrlSoftElDf.mvs cyrlSoftElVSlab + include : CyrSoftElShape cyrSoftElDf.leftSB cyrSoftElDf.rightSB XH body [if SLAB [if para.isItalic slabItalic slabUpright] SLAB-NONE] cyrSoftElDf.mvs cyrSoftElVSlab select-variant "cyrl/elSoft.\(suffix)" (follow -- 'cyrl/enghe/ghePart') @@ -131,9 +131,6 @@ glyph-block Letter-Cyrillic-El : begin CreateSelectorVariants 'cyrl/elSoft' 0xA665 [Object.keys ElConfig] (follow -- 'cyrl/el') - alias 'cyrl/El.BGR' null 'grek/Lambda' - alias 'cyrl/el.BGR' null 'turnv' - derive-composites 'cyrl/ElDescender' 0x52E 'cyrl/El' [CyrDescender.rSideJut RightSB 0] derive-composites 'cyrl/elDescender' 0x52F 'cyrl/el.straight' [CyrDescender.rSideJut RightSB 0] diff --git a/packages/font-glyphs/src/letter/latin/lower-g.ptl b/packages/font-glyphs/src/letter/latin/lower-g.ptl index f06fcd101..af691fae3 100644 --- a/packages/font-glyphs/src/letter/latin/lower-g.ptl +++ b/packages/font-glyphs/src/letter/latin/lower-g.ptl @@ -154,9 +154,9 @@ glyph-block Letter-Latin-Lower-G : begin singleStorey SingleStorey.RoundHook singleStoreyFlatHook SingleStorey.FlatHook object # ear/serif + "" { SingleStorey.AutoSerifedBody 0 } serifless { SingleStorey.SeriflessBody 0 } serifed { SingleStorey.SerifedBody 0 } - autoSerifed { SingleStorey.AutoSerifedBody 0 } earlessCorner { SingleStorey.EarlessCornerBody DToothlessRise } earlessCornerHTB { SingleStorey.EarlessCornerBody 0 } earlessRounded { SingleStorey.EarlessRoundedBody (XH - SmallArchDepthA) } diff --git a/packages/font-glyphs/src/letter/latin/lower-il.ptl b/packages/font-glyphs/src/letter/latin/lower-il.ptl index f6a0ae990..ed535a4d1 100644 --- a/packages/font-glyphs/src/letter/latin/lower-il.ptl +++ b/packages/font-glyphs/src/letter/latin/lower-il.ptl @@ -297,7 +297,6 @@ glyph-block Letter-Latin-Lower-I : begin select-variant 'dotlessi' 0x131 link-reduced-variant 'dotlessi/sansSerif' 'dotlessi' MathSansSerif select-variant 'dotlessi/compLigRight' (shapeFrom -- 'dotlessi') - select-variant 'dotlessi/tailed' (shapeFrom -- 'dotlessi') select-variant 'dotlessiRetroflexHook' (follow -- 'dotlessi') CreateOgonekComposition 'iOgonek.dotless' null 'dotlessi' @@ -320,11 +319,13 @@ glyph-block Letter-Latin-Lower-I : begin select-variant 'latn/Iota' 0x196 (follow -- 'latn/iota') alias 'cyrl/Iota' 0xA646 'latn/Iota' + select-variant 'cyrl/ghe.SRB/base' (shapeFrom -- 'dotlessi') (follow -- 'cyrl/ghe.SRB') + CreateAccentedComposition 'cyrl/ghe.SRB' null 'cyrl/ghe.SRB/base' 'macronAbove' + CreateMultiAccentedComposition 'cyrl/gje.SRB' null 'cyrl/ghe.SRB/base' { 'macronAbove' 'acuteAbove' } + CreateTurnedLetter 'turni' 0x1D09 'i' HalfAdvance (XH / 2) CreateTurnedLetter 'grek/turniota' 0x2129 'latn/iota' HalfAdvance (XH / 2) - CreateAccentedComposition 'cyrl/ghe.SRB' null 'dotlessi/tailed' 'macronAbove' - CreateMultiAccentedComposition 'cyrl/gje.SRB' null 'dotlessi/tailed' { 'macronAbove' 'acuteAbove' } CreateAccentedComposition 'dotlessiBarOver' null 'dotlessi' 'barOver' CreateAccentedComposition 'iBarOver' 0x268 'dotlessiBarOver' 'tittleAbove' CreateAccentedComposition 'iOgonek' 0x12F 'iOgonek.dotless' 'tittleAbove' diff --git a/packages/font-glyphs/src/letter/latin/upper-a.ptl b/packages/font-glyphs/src/letter/latin/upper-a.ptl index 50a29c90a..2eb277106 100644 --- a/packages/font-glyphs/src/letter/latin/upper-a.ptl +++ b/packages/font-glyphs/src/letter/latin/upper-a.ptl @@ -15,10 +15,11 @@ glyph-block Letter-Latin-Upper-A : begin glyph-block-import Letter-Shared-Shapes : SerifFrame glyph-block-import Letter-Latin-V : VShapeOutline VShape VCornerHalfWidth - define SLAB-NONE 0 - define SLAB-TOP 1 - define SLAB-LEFT 2 - define SLAB-RIGHT 4 + define SLAB-NONE 0 + define SLAB-TOP 1 + define SLAB-LEFT 2 + define SLAB-RIGHT 4 + define SLAB-CYRL-BGR 8 glyph-block-export AMaskShape define [AMaskShape] : with-params [df fBarStraight top sw] : new-glyph : glyph-proc @@ -44,8 +45,10 @@ glyph-block Letter-Latin-Upper-A : begin define [ASerifs df top sw slabKind] : glyph-proc : begin local sf : SerifFrame.fromDf df top 0 - if [maskBits slabKind SLAB-LEFT] : include sf.lb.full - if [maskBits slabKind SLAB-RIGHT] : include sf.rb.full + if [maskBits slabKind SLAB-LEFT] : include + if ([maskBits slabKind SLAB-CYRL-BGR] && para.isItalic) sf.lb.outer sf.lb.full + if [maskBits slabKind SLAB-RIGHT] : include + if ([maskBits slabKind SLAB-CYRL-BGR] && para.isItalic) sf.rb.outer sf.rb.full if [maskBits slabKind SLAB-TOP] : include : intersection [MaskLeft df.middle] if [maskBits slabKind : bitOr SLAB-LEFT SLAB-RIGHT] : then : HSerif.lt df.middle top (MidJutSide + [HSwToV : 0.25 * sw]) sf.swSerif @@ -149,6 +152,15 @@ glyph-block Letter-Latin-Upper-A : begin sw -- Stroke slabKind -- slabKind + create-glyph "cyrl/el.BGR.\(suffix)" : glyph-proc + include : MarkSet.e + include : LambdaShape + df -- [DivFrame 1] + fBarStraight -- fStraightBar + top -- XH + sw -- Stroke + slabKind -- [bitOr slabKind SLAB-CYRL-BGR] + select-variant 'A' 'A' link-reduced-variant 'A/sansSerif' 'A' MathSansSerif select-variant 'smcpA' 0x1D00 (follow -- 'A') @@ -162,6 +174,9 @@ glyph-block Letter-Latin-Upper-A : begin link-reduced-variant 'grek/Lambda/sansSerif' 'grek/Lambda' MathSansSerif select-variant 'grek/smcpLambda' 0x1D27 (follow -- 'grek/Lambda') + alias 'cyrl/El.BGR' null 'grek/Lambda' + select-variant 'cyrl/el.BGR' (follow -- 'grek/Lambda') + # Delta glyph-block-export DeltaShape define [DeltaShape] : with-params [df top sw fBarStraight] : union diff --git a/packages/font-glyphs/src/letter/latin/upper-m.ptl b/packages/font-glyphs/src/letter/latin/upper-m.ptl index f40558215..dba5101d2 100644 --- a/packages/font-glyphs/src/letter/latin/upper-m.ptl +++ b/packages/font-glyphs/src/letter/latin/upper-m.ptl @@ -126,7 +126,7 @@ glyph-block Letter-Latin-Upper-M : begin grekCapitalSan { false FORM-SAN SLAB-AUTO } grekSmallSan { false FORM-SAN-SMALL SLAB-NONE } - define CyrlSoftEmGheConfig : object + define CyrSoftEmGheConfig : object serifless false topRightSerifed true @@ -154,21 +154,21 @@ glyph-block Letter-Latin-Upper-M : begin include : LeaningAnchor.Below.VBar.l df.leftSB include : MShape XH df form slab slanted - define cyrlSoftEmDf : DivFrame para.diversityM 4 + define cyrSoftEmDf : DivFrame [mix 1 para.diversityM 2] 4 - DefineSelectorGlyph "cyrl/EmSoft" suffix cyrlSoftEmDf 'capital' - DefineSelectorGlyph "cyrl/emSoft" suffix cyrlSoftEmDf 'e' + DefineSelectorGlyph "cyrl/EmSoft" suffix cyrSoftEmDf 'capital' + DefineSelectorGlyph "cyrl/emSoft" suffix cyrSoftEmDf 'e' - foreach { suffixGhe cyrlSoftEmVSlab } [Object.entries CyrlSoftEmGheConfig] : do + foreach { suffixGhe cyrSoftEmVSlab } [Object.entries CyrSoftEmGheConfig] : do create-glyph "cyrl/EmSoft.\(suffix).\(suffixGhe)" : glyph-proc set-width 0 set-mark-anchor 'cvDecompose' 0 0 - include : CyrSoftEmShape CAP cyrlSoftEmDf form slab slanted cyrlSoftEmVSlab + include : CyrSoftEmShape CAP cyrSoftEmDf form slab slanted cyrSoftEmVSlab create-glyph "cyrl/emSoft.\(suffix).\(suffixGhe)" : glyph-proc set-width 0 set-mark-anchor 'cvDecompose' 0 0 - include : CyrSoftEmShape XH cyrlSoftEmDf form slab slanted cyrlSoftEmVSlab + include : CyrSoftEmShape XH cyrSoftEmDf form slab slanted cyrSoftEmVSlab select-variant "cyrl/EmSoft.\(suffix)" (follow -- 'cyrl/EnGhe/GhePart') select-variant "cyrl/emSoft.\(suffix)" (follow -- 'cyrl/enghe/ghePart') diff --git a/params/variants.toml b/params/variants.toml index 492cc47d8..287b3a54d 100644 --- a/params/variants.toml +++ b/params/variants.toml @@ -2165,7 +2165,7 @@ selectorAffix."g/sansSerif" = "doubleStorey" selectorAffix."g/hookTopBase" = "singleStoreySerifless" selectorAffix."gScript" = "singleStoreyScriptCut" selectorAffix."gScriptCrossedTail" = "singleStoreyScriptCut" -selectorAffix."g/single" = "singleStoreyAutoSerifed" +selectorAffix."g/single" = "singleStorey" [prime.g.variants-buildup.stages.openness.open] rank = 1 @@ -2175,7 +2175,7 @@ selectorAffix."g/sansSerif" = "openDoubleStorey" selectorAffix."g/hookTopBase" = "singleStoreySerifless" selectorAffix."gScript" = "singleStoreyScriptCut" selectorAffix."gScriptCrossedTail" = "singleStoreyScriptCut" -selectorAffix."g/single" = "singleStoreyAutoSerifed" +selectorAffix."g/single" = "singleStorey" [prime.g.variants-buildup.stages.storey.single-storey] next = "hook" @@ -2338,7 +2338,7 @@ description = "`i` like a straight line" selector.dotlessi = "serifless" selector."dotlessi/sansSerif" = "serifless" selector."dotlessi/compLigRight" = "hooky" -selector."dotlessi/tailed" = "flatTailed" +selector."cyrl/ghe.SRB" = "flatTailed" [prime.i.variants.hooky] rank = 2 @@ -2347,7 +2347,7 @@ description = "Hooky `i`" selector.dotlessi = "hooky" selector."dotlessi/sansSerif" = "serifless" selector."dotlessi/compLigRight" = "hooky" -selector."dotlessi/tailed" = "serifedFlatTailed" +selector."cyrl/ghe.SRB" = "serifedFlatTailed" [prime.i.variants.hooky-bottom] rank = 3 @@ -2356,7 +2356,7 @@ description = "`i` with a sharp-turning horizontal tail" selector.dotlessi = "hookyBottom" selector."dotlessi/sansSerif" = "serifless" selector."dotlessi/compLigRight" = "zshaped" -selector."dotlessi/tailed" = "flatTailed" +selector."cyrl/ghe.SRB" = "hookyBottom" [prime.i.variants.zshaped] rank = 4 @@ -2365,7 +2365,7 @@ description = "Z-shaped `i`" selector.dotlessi = "zshaped" selector."dotlessi/sansSerif" = "serifless" selector."dotlessi/compLigRight" = "zshaped" -selector."dotlessi/tailed" = "serifedFlatTailed" +selector."cyrl/ghe.SRB" = "zshaped" [prime.i.variants.serifed] rank = 5 @@ -2374,7 +2374,7 @@ description = "Serifed `i`" selector.dotlessi = "serifed" selector."dotlessi/sansSerif" = "serifless" selector."dotlessi/compLigRight" = "serifed" -selector."dotlessi/tailed" = "serifedFlatTailed" +selector."cyrl/ghe.SRB" = "zshaped" [prime.i.variants.serifed-asymmetric] rank = 6 @@ -2383,7 +2383,7 @@ description = "`i` with shorter top serif and full bottom serif" selector.dotlessi = "serifedAsymmetric" selector."dotlessi/sansSerif" = "serifless" selector."dotlessi/compLigRight" = "serifed" -selector."dotlessi/tailed" = "serifedFlatTailed" +selector."cyrl/ghe.SRB" = "zshaped" [prime.i.variants.tailed] rank = 7 @@ -2392,7 +2392,7 @@ description = "`i` with curly tail" selector.dotlessi = "tailed" selector."dotlessi/sansSerif" = "tailed" selector."dotlessi/compLigRight" = "tailedSerifed" -selector."dotlessi/tailed" = "tailed" +selector."cyrl/ghe.SRB" = "tailed" [prime.i.variants.tailed-serifed] rank = 8 @@ -2401,7 +2401,7 @@ description = "`i` with top serif and curly tail" selector.dotlessi = "tailedSerifed" selector."dotlessi/sansSerif" = "tailed" selector."dotlessi/compLigRight" = "tailedSerifed" -selector."dotlessi/tailed" = "tailedSerifed" +selector."cyrl/ghe.SRB" = "tailedSerifed" [prime.i.variants.flat-tailed] rank = 9 @@ -2410,7 +2410,7 @@ description = "`i` with curly-then-flat tail" selector.dotlessi = "flatTailed" selector."dotlessi/sansSerif" = "flatTailed" selector."dotlessi/compLigRight" = "serifedFlatTailed" -selector."dotlessi/tailed" = "flatTailed" +selector."cyrl/ghe.SRB" = "flatTailed" [prime.i.variants.serifed-flat-tailed] rank = 10 @@ -2419,7 +2419,7 @@ description = "`i` with top serif and curly-then-flat tail" selector.dotlessi = "serifedFlatTailed" selector."dotlessi/sansSerif" = "flatTailed" selector."dotlessi/compLigRight" = "serifedFlatTailed" -selector."dotlessi/tailed" = "serifedFlatTailed" +selector."cyrl/ghe.SRB" = "serifedFlatTailed" [prime.i.variants.diagonal-tailed] rank = 11 @@ -2428,7 +2428,7 @@ description = "`i` with diagonal tail" selector.dotlessi = "diagonalTailed" selector."dotlessi/sansSerif" = "diagonalTailed" selector."dotlessi/compLigRight" = "serifedDiagonalTailed" -selector."dotlessi/tailed" = "diagonalTailed" +selector."cyrl/ghe.SRB" = "diagonalTailed" [prime.i.variants.serifed-diagonal-tailed] rank = 12 @@ -2437,7 +2437,7 @@ description = "`i` with top serif and diagonal tail" selector.dotlessi = "serifedDiagonalTailed" selector."dotlessi/sansSerif" = "diagonalTailed" selector."dotlessi/compLigRight" = "serifedDiagonalTailed" -selector."dotlessi/tailed" = "serifedDiagonalTailed" +selector."cyrl/ghe.SRB" = "serifedDiagonalTailed" [prime.i.variants.semi-tailed] rank = 13 @@ -2446,7 +2446,7 @@ description = "`i` with slightly curly tail" selector.dotlessi = "semiTailed" selector."dotlessi/sansSerif" = "semiTailed" selector."dotlessi/compLigRight" = "serifedSemiTailed" -selector."dotlessi/tailed" = "semiTailed" +selector."cyrl/ghe.SRB" = "semiTailed" [prime.i.variants.serifed-semi-tailed] rank = 14 @@ -2455,7 +2455,7 @@ description = "`i` with top serif and slightly curly tail" selector.dotlessi = "serifedSemiTailed" selector."dotlessi/sansSerif" = "semiTailed" selector."dotlessi/compLigRight" = "serifedSemiTailed" -selector."dotlessi/tailed" = "serifedSemiTailed" +selector."cyrl/ghe.SRB" = "serifedSemiTailed"