From 76fd81968b2d4be25730d471de2158666edaef4f Mon Sep 17 00:00:00 2001 From: John McWilliams <37010132+jmcwilliams403@users.noreply.github.com> Date: Fri, 19 Apr 2024 17:09:52 -0400 Subject: [PATCH] =?UTF-8?q?Make=20Cyrillic=20Capital=20Shha=20(`=D2=BA`)?= =?UTF-8?q?=20follow=20variants=20of=20`H`.=20(#2302)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Alias `cyrl/ha` to `x`. * Rename `cyrl/ha` to `cyrl/kha`. * Make `cyrl/Shha` follow `H`. --- changes/29.2.1.md | 1 + .../src/auto-build/transformed.ptl | 6 +-- .../font-glyphs/src/letter/cyrillic/che.ptl | 37 ++++++++++++++----- packages/font-glyphs/src/letter/latin/x.ptl | 20 +++++----- params/variants.toml | 9 ----- 5 files changed, 41 insertions(+), 32 deletions(-) diff --git a/changes/29.2.1.md b/changes/29.2.1.md index 0e0a373f4..cafc89ce5 100644 --- a/changes/29.2.1.md +++ b/changes/29.2.1.md @@ -1,5 +1,6 @@ * Refine shape of `U+1CC09`, `U+1CC0A`, `U+1CC10` and `U+1CC11`. * Refine terminal shape of Schwa and Reversed Lower E (`U+018F`, `U+0258`..`U+025A`, `U+04D8`..`U+04D9`) under italics. +* Make CYRILLIC CAPITAL LETTER SHHA (`U+04BA`) follow variants of Capital H (`cv08`). * Add characters: - ARC (`U+2312`) ... SECTOR (`U+2314`). - ERASE TO THE RIGHT (`U+2326`) ... X IN A RECTANGLE BOX (`U+2327`) (#2289). diff --git a/packages/font-glyphs/src/auto-build/transformed.ptl b/packages/font-glyphs/src/auto-build/transformed.ptl index 39e7da72f..e94eebdcd 100644 --- a/packages/font-glyphs/src/auto-build/transformed.ptl +++ b/packages/font-glyphs/src/auto-build/transformed.ptl @@ -315,7 +315,7 @@ glyph-block Autobuild-Transformed : begin list 0x1E040 'cyrl/te' list 0x1E041 'cyrl/u' list 0x1E042 'cyrl/ef' - list 0x1E043 'cyrl/ha' + list 0x1E043 'cyrl/kha' list 0x1E044 'cyrl/tse' list 0x1E045 'cyrl/che' list 0x1E046 'cyrl/sha' @@ -432,7 +432,7 @@ glyph-block Autobuild-Transformed : begin list 0x1E05E 'cyrl/es' list 0x1E05F 'cyrl/u' list 0x1E060 'cyrl/ef' - list 0x1E061 'cyrl/ha' + list 0x1E061 'cyrl/kha' list 0x1E062 'cyrl/tse' list 0x1E063 'cyrl/che' list 0x1E064 'cyrl/sha' @@ -529,7 +529,7 @@ glyph-block Autobuild-Transformed : begin list 0x2DEB 'cyrl/pe' list 0x2DED 'cyrl/es' list 0x2DEE 'cyrl/te' - list 0x2DEF 'cyrl/ha' + list 0x2DEF 'cyrl/kha' list 0x2DF0 'cyrl/tse' list 0x2DF1 'cyrl/che' list 0x2DF2 'cyrl/sha' diff --git a/packages/font-glyphs/src/letter/cyrillic/che.ptl b/packages/font-glyphs/src/letter/cyrillic/che.ptl index cb60518c0..fc61d7540 100644 --- a/packages/font-glyphs/src/letter/cyrillic/che.ptl +++ b/packages/font-glyphs/src/letter/cyrillic/che.ptl @@ -23,9 +23,10 @@ glyph-block Letter-Cyrillic-Che : begin ALL 1 LOWER 2 TOP 3 - TAILED-I 4 - ALL-BGR 5 - TAILED-BGR 6 + BOT 4 + TAILED-I 5 + ALL-BGR 6 + TAILED-BGR 7 glyph-block-export CyrCheShape define [CyrCheShape] : with-params [df top pyBar bodyType slabType [sw df.mvs]] : glyph-proc @@ -59,6 +60,7 @@ glyph-block Letter-Cyrillic-Che : begin [Just SERIFS.ALL] sf.rb.fullSide [Just SERIFS.ALL-BGR] sf.rb.fullSide [Just SERIFS.LOWER] sf.rb.outer + [Just SERIFS.BOT] sf.rb.outer __ : glyph-proc create-glyph 'cyrl/Che' 0x427 : glyph-proc @@ -102,13 +104,28 @@ glyph-block Letter-Cyrillic-Che : begin refer-glyph 'cyrl/che.standard' CyrDescender.lSideJut (RightSB - [HSwToV Stroke]) 0 (jut -- MidJutSide) - CreateTurnedLetter 'cyrl/Shha' 0x4BA 'cyrl/Che' HalfAdvance (CAP / 2) - derive-composites 'cyrl/ShhaDescender' 0x526 'cyrl/Shha' [CyrDescender.rSideJut RightSB 0] - - define [ChrVBar top] : begin + define [ChrVBar top pyBar] : begin local SwCheVBar : Math.min OverlayStroke (0.625 * (RightSB - SB - [HSwToV : 2 * Stroke]) / HVContrast) - local yc : top * [if SLAB 0.45 0.35] + Stroke * 0.1 + local yc : top * [fallback pyBar 0.5] + Stroke * 0.1 return : VBar.m Middle (yc + LongJut * 0.8) (yc - LongJut * 0.8) SwCheVBar - derive-composites 'cyrl/CheVBar' 0x4B8 'cyrl/Che' [ChrVBar CAP] - derive-composites 'cyrl/cheVBar' 0x4B9 'cyrl/che' [ChrVBar XH] + derive-composites 'cyrl/CheVBar' 0x4B8 'cyrl/Che' [ChrVBar CAP [if SLAB 0.45 0.35]] + derive-composites 'cyrl/cheVBar' 0x4B9 'cyrl/che' [ChrVBar XH [if SLAB 0.45 0.4 ]] + + define ShhaConfig : object + serifless SERIFS.NONE + topLeftSerifed SERIFS.BOT + topLeftBottomRightSerifed SERIFS.LOWER + serifed SERIFS.ALL + + foreach { suffix serifs } [pairs-of ShhaConfig] : do + create-glyph "cyrl/Shha.\(suffix)" : glyph-proc + include : MarkSet.capital + include : LeaningAnchor.Above.VBar.l SB + include : CyrCheShape [DivFrame 1] CAP 0.4 BODY.STRAIGHT serifs + include : FlipAround Middle (CAP / 2) + + select-variant 'cyrl/Shha' 0x4BA (follow -- 'H') + select-variant 'cyrl/Shha/descBase' (shapeFrom -- 'cyrl/Shha') (follow -- 'H/descenderBase') + + derive-composites 'cyrl/ShhaDescender' 0x526 'cyrl/Shha/descBase' [CyrDescender.rSideJut RightSB 0] diff --git a/packages/font-glyphs/src/letter/latin/x.ptl b/packages/font-glyphs/src/letter/latin/x.ptl index a956e86e2..3c017a418 100644 --- a/packages/font-glyphs/src/letter/latin/x.ptl +++ b/packages/font-glyphs/src/letter/latin/x.ptl @@ -231,11 +231,11 @@ glyph-block Letter-Latin-X : begin link-reduced-variant 'X/sansSerif' 'X' MathSansSerif alias 'grek/Chi' 0x3A7 'X' alias-reduced-variant 'grek/Chi/sansSerif' 'grek/Chi' 'X/sansSerif' MathSansSerif - alias 'cyrl/Ha' 0x425 'X' + alias 'cyrl/Kha' 0x425 'X' select-variant 'x' 'x' link-reduced-variant 'x/sansSerif' 'x' MathSansSerif - select-variant 'cyrl/ha' 0x445 (shapeFrom -- 'x') + alias 'cyrl/kha' 0x445 'x' select-variant 'grek/chi' 0x3C7 (shapeFrom -- 'latn/chi') link-reduced-variant 'grek/chi/sansSerif' 'grek/chi' MathSansSerif (shapeFrom -- 'latn/chi') @@ -258,15 +258,15 @@ glyph-block Letter-Latin-X : begin y -- 0 xLink -- RightSB - [HSwToV HalfStroke] - derive-glyphs 'cyrl/HaDescender' 0x4B2 'cyrl/Ha' [AddDescender CyrDescender] - derive-glyphs 'cyrl/haDescender' 0x4B3 'cyrl/ha' [AddDescender CyrDescender] - derive-glyphs 'cyrl/HaHook' 0x4FC 'cyrl/Ha' [AddDescender PalatalHook] - derive-glyphs 'cyrl/haHook' 0x4FD 'cyrl/ha' [AddDescender PalatalHook] - alias 'xPalatalHook' 0x1D8D 'cyrl/haHook' + derive-glyphs 'cyrl/KhaDescender' 0x4B2 'cyrl/Kha' [AddDescender CyrDescender] + derive-glyphs 'cyrl/khaDescender' 0x4B3 'cyrl/kha' [AddDescender CyrDescender] + derive-glyphs 'cyrl/KhaHook' 0x4FC 'cyrl/Kha' [AddDescender PalatalHook] + derive-glyphs 'cyrl/khaHook' 0x4FD 'cyrl/kha' [AddDescender PalatalHook] + alias 'xPalatalHook' 0x1D8D 'cyrl/khaHook' - define [CyrlHaBarShape top] : HOverlayBar [mix SB RightSB 0.08] [mix SB RightSB 0.92] (top / 2) - derive-composites 'cyrl/HaBar' 0x4FE 'cyrl/Ha' [CyrlHaBarShape CAP] - derive-composites 'cyrl/haBar' 0x4FF 'cyrl/ha' [CyrlHaBarShape XH] + define [CyrlKhaBarShape top] : HOverlayBar [mix SB RightSB 0.08] [mix SB RightSB 0.92] (top / 2) + derive-composites 'cyrl/KhaBar' 0x4FE 'cyrl/Kha' [CyrlKhaBarShape CAP] + derive-composites 'cyrl/khaBar' 0x4FF 'cyrl/kha' [CyrlKhaBarShape XH] glyph-block-import Letter-Blackboard : BBS BBD define [BBXShape l r top] : let [kDiag : DiagCorDs top (r - l) BBD] : union diff --git a/params/variants.toml b/params/variants.toml index b6cb76f35..e3481b9ed 100644 --- a/params/variants.toml +++ b/params/variants.toml @@ -4073,7 +4073,6 @@ rank = 1 descriptionAffix = "straight shape" selectorAffix.x = "straight" selectorAffix."x/sansSerif" = "straight" -selectorAffix."cyrl/ha" = "straight" selectorAffix."cyrl/rha/right" = "straight" [prime.x.variants-buildup.stages.body.curly] @@ -4081,7 +4080,6 @@ rank = 2 descriptionAffix = "curly shape" selectorAffix.x = "curly" selectorAffix."x/sansSerif" = "curly" -selectorAffix."cyrl/ha" = "curly" selectorAffix."cyrl/rha/right" = "curly" [prime.x.variants-buildup.stages.body.cursive] @@ -4090,7 +4088,6 @@ next = "END" descriptionAffix = "cursive shape" selectorAffix.x = "cursive" selectorAffix."x/sansSerif" = "cursive" -selectorAffix."cyrl/ha" = "cursive" selectorAffix."cyrl/rha/right" = "cursive" [prime.x.variants-buildup.stages.body.semi-chancery-straight] @@ -4099,7 +4096,6 @@ next = "END" descriptionAffix = "Semi-chancery shape with straight counter-leg" selectorAffix.x = "semiChanceryStraight" selectorAffix."x/sansSerif" = "semiChanceryStraight" -selectorAffix."cyrl/ha" = "semiChanceryStraight" selectorAffix."cyrl/rha/right" = "semiChanceryStraight" [prime.x.variants-buildup.stages.body.semi-chancery-curly] @@ -4108,7 +4104,6 @@ next = "END" descriptionAffix = "Semi-chancery shape with curly counter-leg" selectorAffix.x = "semiChanceryCurly" selectorAffix."x/sansSerif" = "semiChanceryCurly" -selectorAffix."cyrl/ha" = "semiChanceryCurly" selectorAffix."cyrl/rha/right" = "semiChanceryCurly" [prime.x.variants-buildup.stages.body.chancery] @@ -4117,7 +4112,6 @@ next = "END" descriptionAffix = "Chancery shape" selectorAffix.x = "chancery" selectorAffix."x/sansSerif" = "chancery" -selectorAffix."cyrl/ha" = "chancery" selectorAffix."cyrl/rha/right" = "chancery" [prime.x.variants-buildup.stages.serifs.serifless] @@ -4126,7 +4120,6 @@ descriptionAffix = "serifs" descriptionJoiner = "without" selectorAffix.x = "serifless" selectorAffix."x/sansSerif" = "serifless" -selectorAffix."cyrl/ha" = "serifless" selectorAffix."cyrl/rha/right" = "serifless" [prime.x.variants-buildup.stages.serifs.motion-serifed] @@ -4134,7 +4127,6 @@ rank = 2 descriptionAffix = "motion serifs" selectorAffix.x = "motionSerifed" selectorAffix."x/sansSerif" = "serifless" -selectorAffix."cyrl/ha" = "motionSerifed" selectorAffix."cyrl/rha/right" = "serifless" [prime.x.variants-buildup.stages.serifs.serifed] @@ -4142,7 +4134,6 @@ rank = 3 descriptionAffix = "serifs" selectorAffix.x = "serifed" selectorAffix."x/sansSerif" = "serifless" -selectorAffix."cyrl/ha" = "serifed" selectorAffix."cyrl/rha/right" = "serifed"