Skip to content

Commit

Permalink
Attempt to save a small amount of glyphs surrounding a. (#2591)
Browse files Browse the repository at this point in the history
* Move `invaScript` to `transformed-jobs-data.ptl`.

* Rename `a/turnABase` to `a/doubleStorey`.
  • Loading branch information
jmcwilliams403 authored Nov 16, 2024
1 parent 26dc602 commit 01650c7
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ export : define Reversed : list
list 0xA7FB 'F'
list 0xA7FC 'P'
list 0xA7FD 'turnM'
list 0xAB64 'turnaScript'
list 0x1DF01 'gScript'
list 0x1DF03 'k'
list 0x1DF07 'eng'
Expand Down
2 changes: 1 addition & 1 deletion packages/font-glyphs/src/letter/latin-ext/lower-ae-oe.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ glyph-block Letter-Latin-Lower-AE-OE : begin
local df : DivFrame para.diversityM 3
include : OODots df 1.5 (DrawAt === DotAt) kdr

select-variant "aa" 0xA733 (follow -- 'a/turnABase')
select-variant "aa" 0xA733 (follow -- 'a/doubleStorey')

select-variant "ae/a"
select-variant "ae/e" (follow -- 'e')
Expand Down
59 changes: 18 additions & 41 deletions packages/font-glyphs/src/letter/latin/lower-a.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ glyph-block Letter-Latin-Lower-A : begin
glyph-block-import Letter-Shared-Shapes : RightwardTailedBar InvRightwardTailedBar
glyph-block-import Letter-Shared-Shapes : DToothlessRise DMBlend RetroflexHook InwardSlabArcStart

glyph-block-export DoubleStorey DoubleStoreyConfig
glyph-block-export DoubleStorey
define DoubleStorey : namespace
define [ADoubleStoreyStroke df] : AdviceStroke2 2 3 XH df.div
define [ADoubleStoreySmoothA df] : begin
Expand Down Expand Up @@ -102,17 +102,18 @@ glyph-block Letter-Latin-Lower-A : begin
[Just ToothlessRounded] : ArcMask df 2 [ADoubleStoreySmoothA df] sw
__ : ArcMask df 0 nothing nothing sw

glyph-block-export DoubleStoreyConfig
define DoubleStoreyConfig : object
doubleStoreySerifless { DoubleStorey.Serifless (RightSB ) 1 }
doubleStoreySerifed { DoubleStorey.Serifed (RightSB + SideJut) 1 }
doubleStoreyTailed { DoubleStorey.Tailed (RightSB + SideJut) 1 }
doubleStoreyToothlessCorner { DoubleStorey.ToothlessCorner nothing 1 }
doubleStoreyToothlessRounded { DoubleStorey.ToothlessRounded nothing 1 }
doubleStoreyHookInwardSerifedSerifless { DoubleStorey.Serifless (RightSB ) 2 }
doubleStoreyHookInwardSerifedSerifed { DoubleStorey.Serifed (RightSB + SideJut) 2 }
doubleStoreyHookInwardSerifedTailed { DoubleStorey.Tailed (RightSB + SideJut) 2 }
doubleStoreyHookInwardSerifedToothlessCorner { DoubleStorey.ToothlessCorner nothing 2 }
doubleStoreyHookInwardSerifedToothlessRounded { DoubleStorey.ToothlessRounded nothing 2 }
doubleStoreySerifless { DoubleStorey.Serifless RightSB 1 }
doubleStoreySerifed { DoubleStorey.Serifed (RightSB + SideJut) 1 }
doubleStoreyTailed { DoubleStorey.Tailed (RightSB + SideJut) 1 }
doubleStoreyToothlessCorner { DoubleStorey.ToothlessCorner nothing 1 }
doubleStoreyToothlessRounded { DoubleStorey.ToothlessRounded nothing 1 }
doubleStoreyHookInwardSerifedSerifless { DoubleStorey.Serifless RightSB 2 }
doubleStoreyHookInwardSerifedSerifed { DoubleStorey.Serifed (RightSB + SideJut) 2 }
doubleStoreyHookInwardSerifedTailed { DoubleStorey.Tailed (RightSB + SideJut) 2 }
doubleStoreyHookInwardSerifedToothlessCorner { DoubleStorey.ToothlessCorner nothing 2 }
doubleStoreyHookInwardSerifedToothlessRounded { DoubleStorey.ToothlessRounded nothing 2 }

foreach { suffix { body xTrailing hookStyle } } [Object.entries DoubleStoreyConfig] : do
create-glyph "a.\(suffix)" : glyph-proc
Expand All @@ -139,7 +140,7 @@ glyph-block Letter-Latin-Lower-A : begin
Rect XH 0 (RightSB - BBD) Width
include : HBar.b (RightSB - BBD) RightSB 0 BBS

glyph-block-export SingleStorey SingleStoreyConfig
glyph-block-export SingleStorey
define SingleStorey : namespace
export : define [FullBarBody df height bar mask _sw] : glyph-proc
local sw : fallback _sw df.mvs
Expand Down Expand Up @@ -205,32 +206,12 @@ glyph-block Letter-Latin-Lower-A : begin
include : TailedBar df height mask sw
include [SerifFrame.fromDf df height 0 (swSerif -- sw)].rt.outer

set SeriflessBar.inv SeriflessBar
set SerifedBar.inv TopSerifedBar
set TopSerifedBar.inv SerifedBar
set DoubleSerifedBar.inv DoubleSerifedBar
set TailedBar.inv : function [df height mask sw] : glyph-proc
set-base-anchor 'trailing' (df.rightSB + SideJut) 0
include : difference
InvRightwardTailedBar df.rightSB 0 height sw
mask df height sw
set TailedSerifedBar.inv : function [df height mask sw] : glyph-proc
set-base-anchor 'trailing' (df.rightSB + SideJut) 0
include : difference
InvRightwardTailedBar df.rightSB 0 height sw
mask df height sw
include [SerifFrame.fromDf df height 0 (swSerif -- sw)].rb.outer


export : define [ScriptCut df y sw] : spiro-outline
corner df.rightSB y
corner (df.rightSB - [HSwToV sw]) y
corner (df.rightSB - [HSwToV sw]) (y - sw / 2)
export : define [InvScriptCut df y sw] : spiro-outline
corner df.rightSB 0
corner (df.rightSB - [HSwToV sw]) 0
corner (df.rightSB - [HSwToV sw]) (0 + sw / 2)

glyph-block-export SingleStoreyConfig
define SingleStoreyConfig : object
singleStoreySerifless { SingleStorey.FullBarBody SingleStorey.SeriflessBar }
singleStoreyEarlessCornerSerifless { SingleStorey.EarlessCornerBody SingleStorey.SeriflessBar }
Expand Down Expand Up @@ -260,24 +241,20 @@ glyph-block Letter-Latin-Lower-A : begin
create-glyph "aScript.\(suffix)" : glyph-proc
include : MarkSet.e
include : body [DivFrame 1] XH bar SingleStorey.ScriptCut
create-glyph "invaScript.\(suffix)" : glyph-proc
include : MarkSet.e
include : body [DivFrame 1] XH bar.inv SingleStorey.InvScriptCut

select-variant 'a' 'a'
link-reduced-variant 'a/sansSerif' 'a' MathSansSerif
link-reduced-variant 'a/rtailBase' 'a'
link-reduced-variant 'a/turnABase' 'a'
link-reduced-variant 'a/doubleStorey' 'a'
select-variant 'cyrl/a' 0x430 (shapeFrom -- 'a')

CreateTurnedLetter 'turna' 0x250 'a/turnABase' HalfAdvance (XH / 2)
CreateTurnedLetter 'turna' 0x250 'a/doubleStorey' HalfAdvance (XH / 2)

derive-composites 'aRetroflexHook' 0x1D8F 'a/rtailBase'
RetroflexHook.rSideJut RightSB 0 (yOverflow -- Stroke)

select-variant 'aScript' 0x251 (follow -- [conditional-follow SLAB 'aScript/autoSerifed/slab' 'aScript/autoSerifed/sans'])
select-variant 'AScript' 0x2C6D (follow -- [conditional-follow SLAB 'aScript/autoSerifed/slab' 'aScript/autoSerifed/sans'])
select-variant 'invaScript' 0xAB64 (follow -- [conditional-follow SLAB 'aScript/autoSerifed/slab' 'aScript/autoSerifed/sans'])
select-variant 'aScript' 0x251 (follow -- [conditional-follow SLAB 'aScript/autoSerifed/slab' 'aScript/autoSerifed/sans'])
select-variant 'AScript' 0x2C6D (follow -- [conditional-follow SLAB 'aScript/autoSerifed/slab' 'aScript/autoSerifed/sans'])

derive-composites 'aScriptRetroflexHook' 0x1D90 'aScript.singleStoreySerifless'
RetroflexHook.rSideJut RightSB 0 (yOverflow -- Stroke)
Expand Down
28 changes: 14 additions & 14 deletions params/variants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2136,7 +2136,7 @@ selectorAffix.a = "doubleStorey"
selectorAffix."ae/a" = "doubleStorey"
selectorAffix."a/sansSerif" = "doubleStorey"
selectorAffix."a/rtailBase" = "doubleStorey"
selectorAffix."a/turnABase" = "doubleStorey"
selectorAffix."a/doubleStorey" = "doubleStorey"
selectorAffix."a/singleStorey/autoSerifed/slab" = "singleStorey"
selectorAffix."a/singleStorey/autoSerifed/sans" = "singleStorey"
selectorAffix."aScript/autoSerifed/slab" = "singleStorey"
Expand All @@ -2150,7 +2150,7 @@ selectorAffix.a = "singleStorey"
selectorAffix."ae/a" = "doubleStorey"
selectorAffix."a/sansSerif" = "singleStorey"
selectorAffix."a/rtailBase" = "singleStorey"
selectorAffix."a/turnABase" = "doubleStorey"
selectorAffix."a/doubleStorey" = "doubleStorey"
selectorAffix."a/singleStorey/autoSerifed/slab" = "singleStorey"
selectorAffix."a/singleStorey/autoSerifed/sans" = "singleStorey"
selectorAffix."aScript/autoSerifed/slab" = "singleStorey"
Expand All @@ -2167,7 +2167,7 @@ selectorAffix.a = ""
selectorAffix."ae/a" = ""
selectorAffix."a/sansSerif" = ""
selectorAffix."a/rtailBase" = ""
selectorAffix."a/turnABase" = ""
selectorAffix."a/doubleStorey" = ""
selectorAffix."a/singleStorey/autoSerifed/slab" = ""
selectorAffix."a/singleStorey/autoSerifed/sans" = ""
selectorAffix."aScript/autoSerifed/slab" = ""
Expand All @@ -2181,7 +2181,7 @@ selectorAffix.a = "hookInwardSerifed"
selectorAffix."ae/a" = "hookInwardSerifed"
selectorAffix."a/sansSerif" = ""
selectorAffix."a/rtailBase" = "hookInwardSerifed"
selectorAffix."a/turnABase" = "hookInwardSerifed"
selectorAffix."a/doubleStorey" = "hookInwardSerifed"
selectorAffix."a/singleStorey/autoSerifed/slab" = ""
selectorAffix."a/singleStorey/autoSerifed/sans" = ""
selectorAffix."aScript/autoSerifed/slab" = ""
Expand All @@ -2197,7 +2197,7 @@ selectorAffix.a = ""
selectorAffix."ae/a" = ""
selectorAffix."a/sansSerif" = ""
selectorAffix."a/rtailBase" = ""
selectorAffix."a/turnABase" = ""
selectorAffix."a/doubleStorey" = ""
selectorAffix."a/singleStorey/autoSerifed/slab" = ""
selectorAffix."a/singleStorey/autoSerifed/sans" = ""
selectorAffix."aScript/autoSerifed/slab" = ""
Expand All @@ -2210,7 +2210,7 @@ selectorAffix.a = "earlessCorner"
selectorAffix."ae/a" = ""
selectorAffix."a/sansSerif" = "earlessCorner"
selectorAffix."a/rtailBase" = "earlessCorner"
selectorAffix."a/turnABase" = ""
selectorAffix."a/doubleStorey" = ""
selectorAffix."a/singleStorey/autoSerifed/slab" = "earlessCorner"
selectorAffix."a/singleStorey/autoSerifed/sans" = "earlessCorner"
selectorAffix."aScript/autoSerifed/slab" = ""
Expand All @@ -2223,7 +2223,7 @@ selectorAffix.a = "earlessRounded"
selectorAffix."ae/a" = ""
selectorAffix."a/sansSerif" = "earlessRounded"
selectorAffix."a/rtailBase" = "earlessRounded"
selectorAffix."a/turnABase" = ""
selectorAffix."a/doubleStorey" = ""
selectorAffix."a/singleStorey/autoSerifed/slab" = "earlessRounded"
selectorAffix."a/singleStorey/autoSerifed/sans" = "earlessRounded"
selectorAffix."aScript/autoSerifed/slab" = ""
Expand All @@ -2237,7 +2237,7 @@ selectorAffix.a = "serifless"
selectorAffix."ae/a" = "serifless"
selectorAffix."a/sansSerif" = "serifless"
selectorAffix."a/rtailBase" = "serifless"
selectorAffix."a/turnABase" = "serifless"
selectorAffix."a/doubleStorey" = "serifless"
selectorAffix."a/singleStorey/autoSerifed/slab" = "serifless"
selectorAffix."a/singleStorey/autoSerifed/sans" = "serifless"
selectorAffix."aScript/autoSerifed/slab" = "serifless"
Expand All @@ -2250,7 +2250,7 @@ selectorAffix.a = "serifed"
selectorAffix."ae/a" = "serifless"
selectorAffix."a/sansSerif" = "serifless"
selectorAffix."a/rtailBase" = "serifless"
selectorAffix."a/turnABase" = "serifed"
selectorAffix."a/doubleStorey" = "serifed"
selectorAffix."a/singleStorey/autoSerifed/slab" = { if = [{ storey = "double-storey" }], then = "doubleSerifed", else = "serifed" }
selectorAffix."a/singleStorey/autoSerifed/sans" = "serifed"
selectorAffix."aScript/autoSerifed/slab" = "serifed"
Expand All @@ -2264,7 +2264,7 @@ selectorAffix.a = "doubleSerifed"
selectorAffix."ae/a" = "serifless"
selectorAffix."a/sansSerif" = "serifless"
selectorAffix."a/rtailBase" = "topSerifed"
selectorAffix."a/turnABase" = "serifed"
selectorAffix."a/doubleStorey" = "serifed"
selectorAffix."a/singleStorey/autoSerifed/slab" = "doubleSerifed"
selectorAffix."a/singleStorey/autoSerifed/sans" = "doubleSerifed"
selectorAffix."aScript/autoSerifed/slab" = "serifed"
Expand All @@ -2277,7 +2277,7 @@ selectorAffix.a = "tailed"
selectorAffix."ae/a" = "serifless"
selectorAffix."a/sansSerif" = "tailed"
selectorAffix."a/rtailBase" = "serifless"
selectorAffix."a/turnABase" = "tailed"
selectorAffix."a/doubleStorey" = "tailed"
selectorAffix."a/singleStorey/autoSerifed/slab" = { if = [{ storey = "double-storey" }], then = "tailedSerifed", else = "tailed" }
selectorAffix."a/singleStorey/autoSerifed/sans" = "tailed"
selectorAffix."aScript/autoSerifed/slab" = "tailed"
Expand All @@ -2291,7 +2291,7 @@ selectorAffix.a = "tailedSerifed"
selectorAffix."ae/a" = "serifless"
selectorAffix."a/sansSerif" = "tailed"
selectorAffix."a/rtailBase" = "topSerifed"
selectorAffix."a/turnABase" = "tailed"
selectorAffix."a/doubleStorey" = "tailed"
selectorAffix."a/singleStorey/autoSerifed/slab" = "tailedSerifed"
selectorAffix."a/singleStorey/autoSerifed/sans" = "tailedSerifed"
selectorAffix."aScript/autoSerifed/slab" = "tailed"
Expand All @@ -2305,7 +2305,7 @@ selectorAffix.a = "toothlessCorner"
selectorAffix."ae/a" = "serifless"
selectorAffix."a/sansSerif" = "toothlessCorner"
selectorAffix."a/rtailBase" = "serifless"
selectorAffix."a/turnABase" = "toothlessCorner"
selectorAffix."a/doubleStorey" = "toothlessCorner"
selectorAffix."a/singleStorey/autoSerifed/slab" = "doubleSerifed"
selectorAffix."a/singleStorey/autoSerifed/sans" = "serifless"
selectorAffix."aScript/autoSerifed/slab" = "serifed"
Expand All @@ -2319,7 +2319,7 @@ selectorAffix.a = "toothlessRounded"
selectorAffix."ae/a" = "serifless"
selectorAffix."a/sansSerif" = "toothlessRounded"
selectorAffix."a/rtailBase" = "serifless"
selectorAffix."a/turnABase" = "toothlessRounded"
selectorAffix."a/doubleStorey" = "toothlessRounded"
selectorAffix."a/singleStorey/autoSerifed/slab" = "doubleSerifed"
selectorAffix."a/singleStorey/autoSerifed/sans" = "serifless"
selectorAffix."aScript/autoSerifed/slab" = "serifed"
Expand Down

0 comments on commit 01650c7

Please sign in to comment.