Skip to content

Commit

Permalink
Make schwa with retroflex hook slightly wider.
Browse files Browse the repository at this point in the history
Also move `Autobuild-Rhotic` from `transformed.ptl` to `composite.ptl`.
  • Loading branch information
jmcwilliams403 committed Dec 19, 2024
1 parent 4b3e3f8 commit 438688e
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 61 deletions.
6 changes: 3 additions & 3 deletions changes/32.3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`).
Expand All @@ -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`).
Expand Down Expand Up @@ -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`).
Expand Down
31 changes: 30 additions & 1 deletion packages/font-glyphs/src/auto-build/composite.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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' }
Expand Down
42 changes: 1 addition & 41 deletions packages/font-glyphs/src/auto-build/transformed.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
52 changes: 36 additions & 16 deletions packages/font-glyphs/src/letter/latin/lower-e.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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)

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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'
Expand Down Expand Up @@ -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')

Expand Down

0 comments on commit 438688e

Please sign in to comment.