From b79ac389f98e670735f2eb8d6a79c882e8f60b45 Mon Sep 17 00:00:00 2001 From: John McWilliams <37010132+jmcwilliams403@users.noreply.github.com> Date: Fri, 20 Dec 2024 05:49:15 -0500 Subject: [PATCH] Make schwa with retroflex hook slightly wider. (#2619) Also move `Autobuild-Rhotic` from `transformed.ptl` to `composite.ptl`. --- changes/32.3.0.md | 6 +-- .../font-glyphs/src/auto-build/composite.ptl | 31 ++++++++++- .../src/auto-build/transformed.ptl | 42 +-------------- .../font-glyphs/src/letter/latin/lower-e.ptl | 52 +++++++++++++------ 4 files changed, 70 insertions(+), 61 deletions(-) diff --git a/changes/32.3.0.md b/changes/32.3.0.md index c3e2c4fc6..fed5c99f5 100644 --- a/changes/32.3.0.md +++ b/changes/32.3.0.md @@ -20,6 +20,7 @@ - CYRILLIC SMALL LETTER LJE (`U+0459`) ... CYRILLIC SMALL LETTER NJE (`U+045A`). - CYRILLIC CAPITAL LETTER OMEGA (`U+0460`). - CYRILLIC CAPITAL LETTER OMEGA WITH TITLO (`U+047C`). + - CYRILLIC CAPITAL LETTER OT (`U+047E`). - CYRILLIC CAPITAL LETTER PE WITH MIDDLE HOOK (`U+04A6`) ... CYRILLIC SMALL LETTER PE WITH MIDDLE HOOK (`U+04A7`). - CYRILLIC CAPITAL LIGATURE A IE (`U+04D4`) ... CYRILLIC SMALL LIGATURE A IE (`U+04D5`). - CYRILLIC CAPITAL LETTER KOMI DJE (`U+0502`) ... CYRILLIC SMALL LETTER KOMI ZJE (`U+0505`). @@ -46,6 +47,7 @@ - LATIN SMALL LETTER UE (`U+1D6B`). - LATIN SMALL LETTER M WITH MIDDLE TILDE (`U+1D6F`). - LATIN SMALL LETTER M WITH PALATAL HOOK (`U+1D86`). + - LATIN SMALL LETTER SCHWA WITH RETROFLEX HOOK (`U+1D95`). - MODIFIER LETTER SMALL M WITH HOOK (`U+1DAC`) ... MODIFIER LETTER SMALL TURNED M WITH LONG LEG (`U+1DAD`). - LATIN SMALL LETTER M WITH ACUTE (`U+1E3F`). - LATIN SMALL LETTER M WITH DOT ABOVE (`U+1E41`). @@ -91,9 +93,7 @@ - CYRILLIC SUBSCRIPT SMALL LETTER EF (`U+1E060`). - CYRILLIC SUBSCRIPT SMALL LETTER SHA (`U+1E064`). * Add characters: - - MARRIAGE SYMBOL (`U+26AD`). - - DIVORCE SYMBOL (`U+26AE`). - - UNMARRIED PARTNERSHIP SYMBOL (`U+26AF`). + - MARRIAGE SYMBOL (`U+26AD`) ... UNMARRIED PARTNERSHIP SYMBOL (`U+26AF`). - LEFT OUTER JOIN (`U+27D5`) ... FULL OUTER JOIN (`U+27D7`). - Z NOTATION LEFT BINDING BRACKET (`U+2989`). - Z NOTATION RIGHT BINDING BRACKET (`U+298A`). diff --git a/packages/font-glyphs/src/auto-build/composite.ptl b/packages/font-glyphs/src/auto-build/composite.ptl index bf0076f71..5b9eeac6f 100644 --- a/packages/font-glyphs/src/auto-build/composite.ptl +++ b/packages/font-glyphs/src/auto-build/composite.ptl @@ -1669,6 +1669,35 @@ glyph-block Autobuild-Pnonetic-Ligatures : begin createPhoneticLigatures ToLetter 'thSlash' 1 2 stdShrink 1 : list list 0x1D7A { 't/phoneticLeft1' 'h' 'wideSlash' } 'b' +glyph-block Autobuild-Rhotic : begin + glyph-block-import Mark-Shared-Metrics : markFine + glyph-block-import CommonShapes + glyph-block-import Common-Derivatives + glyph-block-import Recursive-Build : Widen + glyph-block-import Letter-Latin-Rhotic : ErTail + glyph-block-import Autobuild-Transformed-Shared : extendRelatedGlyphs link-relations + + define [createRhotics groupName yTail _records] : begin + local {records relSets targetNameMap} : extendRelatedGlyphs "rhotic_\(groupName)" _records + local pendingGlyphs : records.map : [record] => record.1 + local thinFont : Widen pendingGlyphs 0.85 1 + foreach {unicode glyphid pri} [items-of records] + if [not : query-glyph targetNameMap.(glyphid)] + create-glyph (targetNameMap.(glyphid)) unicode : glyph-proc + if [not : thinFont.queryByName glyphid] : begin + throw : new Error "Cannot find glyph \(glyphid)" + include : MarkSet.e + include : thinFont.queryByName glyphid + include : ErTail (Width * 0.85 - SB - [HSwToV : 1.25 * markFine]) yTail (XH * 0.2) + + link-relations relSets + return { targetNameMap records } + + createRhotics 'er' (XH / 2) + list { 0x25A 'schwa' } + createRhotics 'revLatinEpsilonEr' (XH * [mix 0.65 1 0.5]) + list { 0x25D 'latn/epsilonRev' } + glyph-block Autobuild-Double-Emotions : begin glyph-block-import CommonShapes glyph-block-import Common-Derivatives @@ -1707,7 +1736,7 @@ glyph-block Autobuild-Double-Emotions : begin applyRelations jobs.relApplications define stdShrink : clamp 0.625 0.9 : StrokeWidthBlend 0.625 0.9 - createDoubleEmotions 'doubleemotion' para.diversityMM stdShrink stdShrink 1 1 : list + createDoubleEmotions 'doubleemotion' para.diversityM stdShrink stdShrink 1 1 : list list 0x203c { 'exclam' 'zwsp' 'exclam' 'zwsp' } list 0x2047 { 'question/hookPart' 'question/dotPart' 'question/hookPart' 'question/dotPart' } list 0x2048 { 'question/hookPart' 'question/dotPart' 'exclam' 'zwsp' } diff --git a/packages/font-glyphs/src/auto-build/transformed.ptl b/packages/font-glyphs/src/auto-build/transformed.ptl index a771eee8a..5eff6229a 100644 --- a/packages/font-glyphs/src/auto-build/transformed.ptl +++ b/packages/font-glyphs/src/auto-build/transformed.ptl @@ -469,46 +469,6 @@ glyph-block Autobuild-Transformed-Mathematical : begin CreateMathBoldFraktur 0x1D56C UpperLatin CreateMathBoldFraktur 0x1D586 LowerLatin -glyph-block Autobuild-Rhotic : begin - glyph-block-import Mark-Shared-Metrics : markFine markstroke - glyph-block-import CommonShapes - glyph-block-import Common-Derivatives - glyph-block-import Recursive-Build : Widen - glyph-block-import Letter-Latin-Rhotic : ErTail - glyph-block-import Autobuild-Transformed-Shared : extendRelatedGlyphs link-relations - glyph-block-import Letter-Shared-Shapes : RetroflexHook - - define [ErTailAttachment y] : ErTail (Width * 0.85 - SB - [HSwToV : 1.25 * markFine]) y (XH * 0.2) - define [RhoticTailAttachment] : RetroflexHook.r - x -- [mix RightSB Width 0.5] - y -- 0 - yAttach -- (XH / 2 - HalfStroke) - xLink -- (Width * 0.85 - SB - [HSwToV : 1.25 * markFine]) - refSw -- [AdviceStroke 4] - - define [createRhotics groupName tail _records] : begin - local {records relSets targetNameMap} : extendRelatedGlyphs "rhotic_\(groupName)" _records - local pendingGlyphs : records.map : [record] => record.1 - local thinFont : Widen pendingGlyphs 0.85 1 - foreach {unicode glyphid pri} [items-of records] - if [not : query-glyph targetNameMap.(glyphid)] - create-glyph (targetNameMap.(glyphid)) unicode : glyph-proc - if [not : thinFont.queryByName glyphid] : begin - throw : new Error "Cannot find glyph \(glyphid)" - include : MarkSet.e - include : thinFont.queryByName glyphid - include tail - - link-relations relSets - return { targetNameMap records } - - createRhotics 'er' [ErTailAttachment (XH / 2)] - list { 0x25A 'schwa' } - createRhotics 'rhotic' [RhoticTailAttachment] - list { 0x1D95 'schwa' } - createRhotics 'revLatinEpsilonEr' [ErTailAttachment (XH * [mix 0.65 1 0.5])] - list { 0x25D 'latn/epsilonRev' } - glyph-block Autobuild-Rotated : begin glyph-block-import CommonShapes glyph-block-import Common-Derivatives @@ -527,7 +487,7 @@ glyph-block Autobuild-Rotated : begin set-width MosaicWidth if [not : df.queryByName gns] : throw : new Error "Cannot find glyph \(gns)" include : df.queryByName gns - include : Translate (-(Width / 2)) (-CAP / 2) + include : Translate ((-Width) / 2) ((-CAP) / 2) include : Rotate (Math.PI / 2) include : Scale s include : Translate (MosaicWidth / 2) SymbolMid diff --git a/packages/font-glyphs/src/letter/latin/lower-e.ptl b/packages/font-glyphs/src/letter/latin/lower-e.ptl index 857200992..e6bd3a4d6 100644 --- a/packages/font-glyphs/src/letter/latin/lower-e.ptl +++ b/packages/font-glyphs/src/letter/latin/lower-e.ptl @@ -16,10 +16,10 @@ glyph-block Letter-Latin-Lower-E : begin glyph-block-import Mark-Adjustment : ExtendBelowBaseAnchors glyph-block-import Letter-Latin-C : CConfig - define [HookHeightFull top stroke noSwash] : Math.min Hook (AHook / XH * top) + define [HookHeightFull top stroke noSwash] : Math.min Hook : AHook / XH * top define [HookHeight top stroke noSwash] : Math.min [HookHeightFull top stroke noSwash] - if (para.isItalic && !noSwash) top (stroke + 0.277 * (top - stroke * 3)) + if (para.isItalic && !noSwash) top : stroke + 0.277 * (top - stroke * 3) define SLAB-NONE 0 define SLAB-CLASSICAL 1 @@ -121,7 +121,7 @@ glyph-block Letter-Latin-Lower-E : begin g4 (df.leftSB + 0.5 * OX) [HookHeight top stroke true] define [AbkCheShape] : with-params [ - fDesc Body df top [stroke df.mvs] [barpos nothing] + fDesc Body df top [stroke : Math.min df.mvs : AdviceStroke2 2 3 top] [barpos nothing] [ada SmallArchDepthA] [adb SmallArchDepthB] [tailSlab nothing] ] : glyph-proc local gap : 0.375 * (df.width - 2 * df.leftSB - 2.5 * stroke) - [HSwToV : 0.25 * stroke] @@ -171,14 +171,14 @@ glyph-block Letter-Latin-Lower-E : begin # Connected Ogonek shape local fine : AdviceStroke 8 - local depth : 0 - Descender - markStroke + local depth : (-Descender) - markStroke local extL : (7 / 16) * depth + 0.25 * markStress local extR : Math.max (0.0625 * markExtend) (1.5 * TanSlope * markStroke) local beginCoSlope : if para.isItalic 0.2 0 - set-base-anchor 'trailing' (RightSB + extR) (-depth + 0.5 * O - markStroke) - set-base-anchor 'belowBraceL' (RightSB - extL - [HSwToV : 0.25 * markStroke]) (-0.75 * depth) - set-base-anchor 'belowBraceR' (RightSB - 0.75 * extL) (-0.75 * depth) + set-base-anchor 'trailing' (RightSB + extR) ((-depth) + 0.5 * O - markStroke) + set-base-anchor 'belowBraceL' (RightSB - extL - [HSwToV : 0.25 * markStroke]) ((-0.75) * depth) + set-base-anchor 'belowBraceR' (RightSB - 0.75 * extL) ((-0.75) * depth) local turnSlope : 0.5 * ((markStroke - fine) / markStroke - (ArchDepthB - ArchDepth) / ArchDepth) @@ -190,13 +190,13 @@ glyph-block Letter-Latin-Lower-E : begin alsoThruThem.computed { (1/3) (2/3) } : object rx : function [rt] rt deltaX : function [rt] 0 - ry : function [rt] : 1/24 + rt + (1/2 - rt) * (3/8) - deltaY : function [rt] (-0.25 * [mix fine markStroke rt]) + ry : function [rt] : (1/24) + rt + ((1/2) - rt) * (3/8) + deltaY : function [rt] : (-0.25) * [mix fine markStroke rt] modifier : function [rt] : widths.rhs [mix fine markStroke : rt ** 2] - g4.down.mid (RightSB - extL) (-0.75 * depth) [widths.rhs.heading markStroke {.x HVContrast .y turnSlope}] + g4.down.mid (RightSB - extL) ((-0.75) * depth) [widths.rhs.heading markStroke {.x HVContrast .y turnSlope}] arcvh [widths.rhs markStroke] - g4 (RightSB + [mix (-extL) extR (11/16)]) (-depth + O) [heading Rightward] - g4 (RightSB + extR) (-depth + 0.5 * O) [heading Rightward] + g4 (RightSB + [mix (-extL) extR (11/16)]) ((-depth) + O) [heading Rightward] + g4 (RightSB + extR) ((-depth) + 0.5 * O) [heading Rightward] create-glyph "eWithNotch.\(suffix)" : glyph-proc include : MarkSet.e @@ -215,13 +215,14 @@ glyph-block Letter-Latin-Lower-E : begin create-glyph "eRetroflexHook.\(suffix)" : glyph-proc include : MarkSet.e - local lastKnot : include : Body [DivFrame 1] XH + include : Body [DivFrame 1] XH ada -- SmallArchDepthA adb -- SmallArchDepthB + tailSlab -- SLAB-CLASSICAL include : RetroflexHook.r - x -- lastKnot.x + x -- RightSB y -- 0 - yAttach -- lastKnot.y + yAttach -- AHook create-glyph "Schwa.\(suffix)" : glyph-proc include : MarkSet.capital @@ -234,6 +235,24 @@ glyph-block Letter-Latin-Lower-E : begin include [refer-glyph "e.\(suffix)"] AS_BASE ALSO_METRICS include : FlipAround Middle (XH / 2) + create-glyph "schwaRetroflexHook.\(suffix)" : glyph-proc + local df : include : DivFrame para.diversityM 1 + include : df.markSet.e + local divSub : Math.min 1 : 0.85 * para.diversityM + local dfSub : DivFrame divSub 2 + local stroke : AdviceStroke2 2 3 XH divSub + include : Body dfSub XH + stroke -- stroke + ada -- [dfSub.archDepthA SmallArchDepth stroke] + adb -- [dfSub.archDepthB SmallArchDepth stroke] + include : FlipAround dfSub.middle (XH / 2) + include : RetroflexHook.r + x -- [mix RightSB df.width 0.5] + y -- 0 + yAttach -- (XH / 2 - HalfStroke) + xLink -- (dfSub.rightSB - [HSwToV : 0.5 * stroke]) + refSw -- [AdviceStroke 4] + create-glyph "eRev.\(suffix)" : glyph-proc include : MarkSet.e include : RevBody [DivFrame 1] XH @@ -243,7 +262,7 @@ glyph-block Letter-Latin-Lower-E : begin create-glyph "eBar.\(suffix)" : glyph-proc include [refer-glyph "e.\(suffix)"] AS_BASE ALSO_METRICS include : HBar.m [mix SB 0 0.7] [mix RightSB Width 0.7] (XH * 0.25 + Stroke * 0.25) - Math.min [AdviceStroke 5] (0.25 * (XH - 3 * Stroke)) + Math.min (0.25 * (XH - 3 * Stroke)) : AdviceStroke 5 DefineSelectorGlyph "cyrl/Schwa" suffix [DivFrame 1] 'capital' DefineSelectorGlyph "cyrl/schwa" suffix [DivFrame 1] 'e' @@ -321,6 +340,7 @@ glyph-block Letter-Latin-Lower-E : begin select-variant 'Schwa' 0x18F select-variant 'schwa' 0x259 + select-variant 'schwaRetroflexHook' 0x1D95 (follow -- 'schwa') select-variant 'eRev' 0x258 (follow -- 'e')