Cont
This commit is contained in:
parent
392e31e7a1
commit
fcdbba15fd
9 changed files with 745 additions and 1011 deletions
|
@ -1,6 +1,6 @@
|
|||
$$include '../../../meta/macros.ptl'
|
||||
|
||||
import [mix linreg clamp fallback] from"../../../support/utils.mjs"
|
||||
import [mix linreg fallback SuffixCfg] from"../../../support/utils.mjs"
|
||||
import [Dotless CvDecompose MathSansSerif] from"../../../support/gr.mjs"
|
||||
|
||||
glyph-module
|
||||
|
@ -179,16 +179,16 @@ glyph-block Letter-Latin-Lower-A : begin
|
|||
corner (RightSB - Stroke * HVContrast) 0
|
||||
corner (RightSB - Stroke * HVContrast) (0 + Stroke / 2)
|
||||
|
||||
define SingleStoreyConfig : object
|
||||
singleStoreySerifless { SingleStorey.FullBarBody SingleStorey.SeriflessBar }
|
||||
singleStoreySerifed { SingleStorey.FullBarBody SingleStorey.SerifedBar }
|
||||
singleStoreyTailed { SingleStorey.FullBarBody SingleStorey.TailedBar }
|
||||
singleStoreyEarlessCornerSerifless { SingleStorey.EarlessCornerBody SingleStorey.SeriflessBar }
|
||||
singleStoreyEarlessCornerSerifed { SingleStorey.EarlessCornerBody SingleStorey.SerifedBar }
|
||||
singleStoreyEarlessCornerTailed { SingleStorey.EarlessCornerBody SingleStorey.TailedBar }
|
||||
singleStoreyEarlessRoundedSerifless { SingleStorey.EarlessRoundedBody SingleStorey.SeriflessBar }
|
||||
singleStoreyEarlessRoundedSerifed { SingleStorey.EarlessRoundedBody SingleStorey.SerifedBar }
|
||||
singleStoreyEarlessRoundedTailed { SingleStorey.EarlessRoundedBody SingleStorey.TailedBar }
|
||||
define SingleStoreyConfig : SuffixCfg.weave
|
||||
object # body
|
||||
singleStorey SingleStorey.FullBarBody
|
||||
singleStoreyEarlessCorner SingleStorey.EarlessCornerBody
|
||||
singleStoreyEarlessRounded SingleStorey.EarlessRoundedBody
|
||||
|
||||
object # bar
|
||||
serifless SingleStorey.SeriflessBar
|
||||
serifed SingleStorey.SerifedBar
|
||||
tailed SingleStorey.TailedBar
|
||||
|
||||
foreach { suffix { body bar } } [Object.entries SingleStoreyConfig] : do
|
||||
create-glyph "a.\(suffix)" : glyph-proc
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
$$include '../../../meta/macros.ptl'
|
||||
|
||||
import [mix linreg clamp fallback] from"../../../support/utils.mjs"
|
||||
import [mix clamp fallback SuffixCfg] from"../../../support/utils.mjs"
|
||||
import [Dotless CvDecompose MathSansSerif] from"../../../support/gr.mjs"
|
||||
|
||||
glyph-module
|
||||
|
@ -71,25 +71,22 @@ glyph-block Letter-Latin-Lower-D : begin
|
|||
define [BaseSerif df yTop] : tagged 'serifRB'
|
||||
HSerif.rb df.rightSB 0 SideJut
|
||||
|
||||
define DConfig : object
|
||||
toothedSerifless { ToothedBody null null }
|
||||
toothedTopSerifed { ToothedBody TopSerif null }
|
||||
toothedSerifed { ToothedBody TopSerif BaseSerif }
|
||||
toothedBottomSerifed { ToothedBody null BaseSerif }
|
||||
tailedSerifless { TailedBody null null }
|
||||
tailedSerifed { TailedBody TopSerif null }
|
||||
toothlessCornerSerifless { ToothlessCornerBody null null }
|
||||
toothlessCornerSerifed { ToothlessCornerBody TopSerif null }
|
||||
toothlessCornerSeriflessHBB { ToothlessCornerHBBBody null null }
|
||||
toothlessCornerSerifedHBB { ToothlessCornerHBBBody TopSerif null }
|
||||
toothlessRoundedSerifless { ToothlessRoundedBody null null }
|
||||
toothlessRoundedSerifed { ToothlessRoundedBody TopSerif null }
|
||||
toothlessRoundedSeriflessHBB { ToothlessRoundedHBBBody null null }
|
||||
toothlessRoundedSerifedHBB { ToothlessRoundedHBBBody TopSerif null }
|
||||
toothlessRoundedBottomSerifed { ToothlessRoundedHBBBody null BaseSerif }
|
||||
toothlessRoundedBilateralSerifed{ ToothlessRoundedHBBBody TopSerif BaseSerif }
|
||||
define DConfig : SuffixCfg.weave
|
||||
object # body
|
||||
toothed ToothedBody
|
||||
toothlessCorner ToothlessCornerBody
|
||||
toothlessCornerHBB ToothlessCornerHBBBody
|
||||
toothlessRounded ToothlessRoundedBody
|
||||
toothlessRoundedHBB ToothlessRoundedHBBBody
|
||||
tailed TailedBody
|
||||
|
||||
foreach { suffix { Body topSerif bottomSerif } } [Object.entries DConfig] : do
|
||||
function [body] : object # serifs
|
||||
serifless { null null }
|
||||
topSerifed { TopSerif null }
|
||||
bottomSerifed { null [if (body === 'toothed') BaseSerif null] }
|
||||
serifed { TopSerif [if (body === 'toothed') BaseSerif null] }
|
||||
|
||||
foreach { suffix { Body {topSerif bottomSerif} } } [Object.entries DConfig] : do
|
||||
local yOverlay : mix XH (Ascender - [if topSerif Stroke 0]) 0.5
|
||||
|
||||
create-glyph "d.\(suffix)" : glyph-proc
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
$$include '../../../meta/macros.ptl'
|
||||
|
||||
import [mix linreg clamp fallback] from"../../../support/utils.mjs"
|
||||
import [mix fallback SuffixCfg] from"../../../support/utils.mjs"
|
||||
import [Dotless CvDecompose MathSansSerif] from"../../../support/gr.mjs"
|
||||
|
||||
glyph-module
|
||||
|
@ -135,47 +135,24 @@ glyph-block Letter-Latin-Lower-F : begin
|
|||
define dfNarrowF : DivFrame para.diversityF
|
||||
define pNarrowSide : mix 1 para.diversityF 1.5
|
||||
|
||||
define SmallFConfig : object
|
||||
'serifless' { { StandardSmallFShape [DivFrame 1] } { 0.95 fbar CH-NONE } 'b' }
|
||||
'serifed' { { StandardSmallFShape [DivFrame 1] } { 0.95 fbar CH-SERIF } 'b' }
|
||||
'extended' { { StandardSmallFShape [DivFrame 1] } { 0.95 fbar CH-EXTENSION } 'if' }
|
||||
'tailed' { { StandardSmallFShape [DivFrame 1] } { 1 fbar CH-HOOK } 'if' }
|
||||
'diagonalTailed' { { StandardSmallFShape [DivFrame 1] } { 1 fbar CH-DIAGONAL-HOOK } 'if' }
|
||||
'seriflessCrossbarAtXHeight' { { StandardSmallFShape [DivFrame 1] } { 0.95 XH CH-NONE } 'b' }
|
||||
'serifedCrossbarAtXHeight' { { StandardSmallFShape [DivFrame 1] } { 0.95 XH CH-SERIF } 'b' }
|
||||
'extendedCrossbarAtXHeight' { { StandardSmallFShape [DivFrame 1] } { 0.95 XH CH-EXTENSION } 'if' }
|
||||
'tailedCrossbarAtXHeight' { { StandardSmallFShape [DivFrame 1] } { 1 XH CH-HOOK } 'if' }
|
||||
'diagonalTailedCrossbarAtXHeight' { { StandardSmallFShape [DivFrame 1] } { 1 XH CH-DIAGONAL-HOOK } 'if' }
|
||||
'flatHook' { { [NarrowFShape 0] dfNarrowF } { pNarrowSide fbar CH-NONE } 'b' }
|
||||
'flatHookSerifed' { { [NarrowFShape 0] dfNarrowF } { pNarrowSide fbar CH-SERIF } 'b' }
|
||||
'flatHookExtended' { { [NarrowFShape 0] dfNarrowF } { pNarrowSide fbar CH-EXTENSION } 'if' }
|
||||
'flatHookTailed' { { [NarrowFShape 0] dfNarrowF } { pNarrowSide fbar CH-HOOK } 'if' }
|
||||
'flatHookDiagonalTailed' { { [NarrowFShape 0] dfNarrowF } { pNarrowSide fbar CH-DIAGONAL-HOOK } 'if' }
|
||||
'flatHookCrossbarAtXHeight' { { [NarrowFShape 0] dfNarrowF } { pNarrowSide XH CH-NONE } 'b' }
|
||||
'flatHookSerifedCrossbarAtXHeight' { { [NarrowFShape 0] dfNarrowF } { pNarrowSide XH CH-SERIF } 'b' }
|
||||
'flatHookExtendedCrossbarAtXHeight' { { [NarrowFShape 0] dfNarrowF } { pNarrowSide XH CH-EXTENSION } 'if' }
|
||||
'flatHookTailedCrossbarAtXHeight' { { [NarrowFShape 0] dfNarrowF } { pNarrowSide XH CH-HOOK } 'if' }
|
||||
'flatHookDiagonalTailedCrossbarAtXHeight' { { [NarrowFShape 0] dfNarrowF } { pNarrowSide XH CH-DIAGONAL-HOOK } 'if' }
|
||||
define SmallFConfig : SuffixCfg.weave
|
||||
object # body
|
||||
"" { StandardSmallFShape [DivFrame 1] }
|
||||
flatHook { [NarrowFShape 0] dfNarrowF }
|
||||
flatHookCLC1 { [NarrowFShape 1] dfNarrowF }
|
||||
flatHookCLC2 { [NarrowFShape 2] dfNarrowF }
|
||||
flatHookCLC3 { [NarrowFShape 3] dfNarrowF }
|
||||
function [body] : object # hooks
|
||||
serifless { [if body pNarrowSide 0.95] CH-NONE 'b' }
|
||||
serifed { [if body pNarrowSide 0.95] CH-SERIF 'b' }
|
||||
extended { [if body pNarrowSide 0.95] CH-EXTENSION 'if' }
|
||||
tailed { [if body pNarrowSide 1] CH-HOOK 'if' }
|
||||
diagonalTailed { [if body pNarrowSide 1] CH-DIAGONAL-HOOK 'if' }
|
||||
object # crossbar
|
||||
"" fbar
|
||||
crossbarAtXHeight XH
|
||||
|
||||
'flatHookCLC1' { { [NarrowFShape 1] dfNarrowF } { pNarrowSide XH CH-NONE } 'b' }
|
||||
'flatHookSerifedCLC1' { { [NarrowFShape 1] dfNarrowF } { pNarrowSide XH CH-SERIF } 'b' }
|
||||
'flatHookExtendedCLC1' { { [NarrowFShape 1] dfNarrowF } { pNarrowSide XH CH-EXTENSION } 'if' }
|
||||
'flatHookTailedCLC1' { { [NarrowFShape 1] dfNarrowF } { pNarrowSide XH CH-HOOK } 'if' }
|
||||
'flatHookDiagonalTailedCLC1' { { [NarrowFShape 1] dfNarrowF } { pNarrowSide XH CH-DIAGONAL-HOOK } 'if' }
|
||||
|
||||
'flatHookCLC2' { { [NarrowFShape 2] dfNarrowF } { pNarrowSide fbar CH-NONE } 'b' }
|
||||
'flatHookSerifedCLC2' { { [NarrowFShape 2] dfNarrowF } { pNarrowSide fbar CH-SERIF } 'b' }
|
||||
'flatHookExtendedCLC2' { { [NarrowFShape 2] dfNarrowF } { pNarrowSide fbar CH-EXTENSION } 'if' }
|
||||
'flatHookTailedCLC2' { { [NarrowFShape 2] dfNarrowF } { pNarrowSide fbar CH-HOOK } 'if' }
|
||||
'flatHookDiagonalTailedCLC2' { { [NarrowFShape 2] dfNarrowF } { pNarrowSide fbar CH-DIAGONAL-HOOK } 'if' }
|
||||
|
||||
'flatHookCLC3' { { [NarrowFShape 3] dfNarrowF } { pNarrowSide fbar CH-NONE } 'b' }
|
||||
'flatHookSerifedCLC3' { { [NarrowFShape 3] dfNarrowF } { pNarrowSide fbar CH-SERIF } 'b' }
|
||||
'flatHookExtendedCLC3' { { [NarrowFShape 3] dfNarrowF } { pNarrowSide fbar CH-EXTENSION } 'if' }
|
||||
'flatHookTailedCLC3' { { [NarrowFShape 3] dfNarrowF } { pNarrowSide fbar CH-HOOK } 'if' }
|
||||
'flatHookDiagonalTailedCLC3' { { [NarrowFShape 3] dfNarrowF } { pNarrowSide fbar CH-DIAGONAL-HOOK } 'if' }
|
||||
|
||||
foreach { suffix {{Body df} {pBar yBar ch} mk}} [Object.entries SmallFConfig] : do
|
||||
foreach { suffix {{Body df} {pBar ch mk} yBar}} [Object.entries SmallFConfig] : do
|
||||
create-glyph "f.\(suffix)" : glyph-proc
|
||||
set-width df.width
|
||||
include : df.markSet.(mk)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
$$include '../../../meta/macros.ptl'
|
||||
|
||||
import [mix linreg clamp fallback] from"../../../support/utils.mjs"
|
||||
import [mix fallback SuffixCfg] from"../../../support/utils.mjs"
|
||||
import [Dotless CvDecompose MathSansSerif] from"../../../support/gr.mjs"
|
||||
|
||||
glyph-module
|
||||
|
@ -11,6 +11,14 @@ glyph-block Letter-Latin-Lower-G : begin
|
|||
glyph-block-import Letter-Shared-Shapes : OBarLeft OBarRight DToothlessRise DMBlend
|
||||
glyph-block-import Letter-Shared-Shapes : FlatHookDepth PalatalHook VerticalHook
|
||||
|
||||
define [OverlayW bw] : glyph-proc
|
||||
define l : mix 0 SB 0.3
|
||||
define r : mix Width RightSB 0.3
|
||||
include : HBar.m l r currentGlyph.baseAnchors.overlay.y bw
|
||||
|
||||
# overlay bar width for double-storey g
|
||||
define obwDoubleStorey : Math.min [AdviceStroke 5] (0.5 / 3 * (CAP - Stroke * 4))
|
||||
|
||||
create-glyph 'g.doubleStorey' : glyph-proc
|
||||
include : MarkSet.p
|
||||
local obot : XH * DesignParameters.gBarPos - O - Stroke * 0.4
|
||||
|
@ -42,6 +50,8 @@ glyph-block Letter-Latin-Lower-G : begin
|
|||
|
||||
set-base-anchor 'overlay' Middle [mix (Descender + O) groundy 0.5]
|
||||
|
||||
create-forked-glyph 'gBar.doubleStorey' : OverlayW obwDoubleStorey
|
||||
|
||||
create-glyph 'g.openDoubleStorey' : glyph-proc
|
||||
include : MarkSet.p
|
||||
local obot : XH * DesignParameters.gBarPos - O - Stroke * 0.4
|
||||
|
@ -69,6 +79,8 @@ glyph-block Letter-Latin-Lower-G : begin
|
|||
|
||||
set-base-anchor 'overlay' Middle [mix (Descender + O) groundy 0.5]
|
||||
|
||||
create-forked-glyph 'gBar.openDoubleStorey' : OverlayW obwDoubleStorey
|
||||
|
||||
define SingleStorey : namespace
|
||||
export : define [RoundHookT sink df yTop offset sw] : sink
|
||||
widths.rhs sw
|
||||
|
@ -116,21 +128,19 @@ glyph-block Letter-Latin-Lower-G : begin
|
|||
sw -- df.mvs
|
||||
include : FlipAround df.middle (top / 2)
|
||||
|
||||
define SingleStoreyConfig : object
|
||||
singleStoreySerifless { SingleStorey.SeriflessBody SingleStorey.RoundHook 0 }
|
||||
singleStoreySerifed { SingleStorey.SerifedBody SingleStorey.RoundHook 0 }
|
||||
singleStoreyEarlessCorner { SingleStorey.EarlessCornerBody SingleStorey.RoundHook DToothlessRise }
|
||||
singleStoreyEarlessCornerHTB { SingleStorey.EarlessCornerBody SingleStorey.RoundHook 0 }
|
||||
singleStoreyEarlessRounded { SingleStorey.EarlessRoundedBody SingleStorey.RoundHook SmallArchDepthB }
|
||||
singleStoreyEarlessRoundedHTB { SingleStorey.EarlessRoundedBody SingleStorey.RoundHook 0 }
|
||||
singleStoreyFlatHookSerifless { SingleStorey.SeriflessBody SingleStorey.FlatHook 0 }
|
||||
singleStoreyFlatHookSerifed { SingleStorey.SerifedBody SingleStorey.FlatHook 0 }
|
||||
singleStoreyEarlessCornerFlatHook { SingleStorey.EarlessCornerBody SingleStorey.FlatHook DToothlessRise }
|
||||
singleStoreyEarlessCornerFlatHookHTB { SingleStorey.EarlessCornerBody SingleStorey.FlatHook 0 }
|
||||
singleStoreyEarlessRoundedFlatHook { SingleStorey.EarlessRoundedBody SingleStorey.FlatHook SmallArchDepthB }
|
||||
singleStoreyEarlessRoundedFlatHookHTB { SingleStorey.EarlessRoundedBody SingleStorey.FlatHook 0 }
|
||||
define SingleStoreyConfig : SuffixCfg.weave
|
||||
object # hook
|
||||
singleStorey SingleStorey.RoundHook
|
||||
singleStoreyFlatHook SingleStorey.FlatHook
|
||||
object # ear/serif
|
||||
serifless { SingleStorey.SeriflessBody 0 }
|
||||
serifed { SingleStorey.SerifedBody 0 }
|
||||
earlessCorner { SingleStorey.EarlessCornerBody DToothlessRise }
|
||||
earlessCornerHTB { SingleStorey.EarlessCornerBody 0 }
|
||||
earlessRounded { SingleStorey.EarlessRoundedBody SmallArchDepthB }
|
||||
earlessRoundedHTB { SingleStorey.EarlessRoundedBody 0 }
|
||||
|
||||
foreach { suffix { bodyShape hookShape hookStart } } [Object.entries SingleStoreyConfig] : do
|
||||
foreach { suffix { hookShape {bodyShape hookStart} } } [Object.entries SingleStoreyConfig] : do
|
||||
create-glyph "g.\(suffix)" : glyph-proc
|
||||
include : MarkSet.p
|
||||
set-base-anchor 'overlay' Middle (XH / 2)
|
||||
|
@ -158,17 +168,20 @@ glyph-block Letter-Latin-Lower-G : begin
|
|||
refSw -- dfSub.mvs
|
||||
maskOut -- [intersection [MaskBelow 0] [MaskLeft dfSub.rightSB]]
|
||||
|
||||
create-glyph "gBar.\(suffix)" : glyph-proc
|
||||
include [refer-glyph "g.\(suffix)"] AS_BASE ALSO_METRICS
|
||||
include : OverlayW [AdviceStroke2 2 4 XH]
|
||||
|
||||
|
||||
select-variant 'g' 'g'
|
||||
link-reduced-variant 'g/sansSerif' 'g' MathSansSerif
|
||||
turned 'turng' 0x1D77 'g' Middle [mix Descender XH 0.5]
|
||||
select-variant "gBar" 0x1E5 (follow -- 'g')
|
||||
|
||||
select-variant 'gScript/hookTopBase' null (shapeFrom -- 'g')
|
||||
select-variant 'gScript' 0x261 (shapeFrom -- 'g')
|
||||
follow -- [if SLAB 'gScript/slabSerif' 'gScript/sansSerif']
|
||||
select-variant 'GScript' 0xA7AC
|
||||
follow -- [if SLAB 'gScript/slabSerif' 'gScript/sansSerif']
|
||||
select-variant 'gPalatalHook' 0x1D83
|
||||
follow -- [if SLAB 'gScript/slabSerif' 'gScript/sansSerif']
|
||||
select-variant 'gScript' 0x261 (shapeFrom -- 'g') (follow -- 'gScript')
|
||||
select-variant 'GScript' 0xA7AC (follow -- 'gScript')
|
||||
select-variant 'gPalatalHook' 0x1D83 (follow -- 'gScript')
|
||||
|
||||
|
||||
alias 'cyrl/de.SRB' null 'gScript'
|
||||
|
@ -192,25 +205,3 @@ glyph-block Letter-Latin-Lower-G : begin
|
|||
include : intersection
|
||||
VBar.r (RightSB - BBD) Descender XH BBS
|
||||
SingleStorey.RoundHookT spiro-outline [DivFrame 1] XH 1 BBS
|
||||
|
||||
do
|
||||
define l : mix 0 SB 0.3
|
||||
define r : mix Width RightSB 0.3
|
||||
define bwDoubleStorey : Math.min [AdviceStroke 5] (0.5 / 3 * (CAP - Stroke * 4))
|
||||
define bwSingleStorey : AdviceStroke2 2 4 XH
|
||||
define [derive suffix bw] : create-glyph "gbar.\(suffix)" : glyph-proc
|
||||
include [refer-glyph "g.\(suffix)"] AS_BASE
|
||||
include : HBar.m l r [query-glyph "g.\(suffix)"].baseAnchors.overlay.y bw
|
||||
|
||||
derive 'doubleStorey' bwDoubleStorey
|
||||
derive 'openDoubleStorey' bwDoubleStorey
|
||||
derive 'singleStoreySerifless' bwSingleStorey
|
||||
derive 'singleStoreySerifed' bwSingleStorey
|
||||
derive 'singleStoreyEarlessCorner' bwSingleStorey
|
||||
derive 'singleStoreyEarlessRounded' bwSingleStorey
|
||||
derive 'singleStoreyFlatHookSerifless' bwSingleStorey
|
||||
derive 'singleStoreyFlatHookSerifed' bwSingleStorey
|
||||
derive 'singleStoreyEarlessCornerFlatHook' bwSingleStorey
|
||||
derive 'singleStoreyEarlessRoundedFlatHook' bwSingleStorey
|
||||
|
||||
select-variant "gbar" 0x1E5 (follow -- 'g')
|
|
@ -1,6 +1,6 @@
|
|||
$$include '../../../meta/macros.ptl'
|
||||
|
||||
import [mix linreg clamp fallback] from"../../../support/utils.mjs"
|
||||
import [mix fallback SuffixCfg] from"../../../support/utils.mjs"
|
||||
import [Dotless CvDecompose MathSansSerif] from"../../../support/gr.mjs"
|
||||
|
||||
glyph-module
|
||||
|
@ -44,18 +44,17 @@ glyph-block Letter-Latin-Lower-H : begin
|
|||
corner (SB + HalfStroke * HVContrast) yOverlay
|
||||
corner xOverlayEnd yOverlay
|
||||
|
||||
define HConfig : object
|
||||
straightSerifless { 0 false no-shape }
|
||||
tailedSerifless { 1 false no-shape }
|
||||
straightMotionSerifed { 0 true SmallHMotionSerifs }
|
||||
tailedMotionSerifed { 1 true SmallHMotionSerifs }
|
||||
straightTopLeftSerifed { 0 true SmallHTopLeftSerifs }
|
||||
straightLeftSerifed { 0 true SmallHSerifs }
|
||||
tailedLeftSerifed { 1 true SmallHSerifs }
|
||||
straightSerifed { 0 true SmallHSerifs }
|
||||
tailedSerifed { 1 true SmallHSerifs }
|
||||
define HConfig : SuffixCfg.weave
|
||||
object # tail
|
||||
straight false
|
||||
tailed true
|
||||
object # serifs
|
||||
serifless { false no-shape }
|
||||
serifed { true SmallHSerifs }
|
||||
motionSerifed { true SmallHMotionSerifs }
|
||||
topLeftSerifed { true SmallHTopLeftSerifs }
|
||||
|
||||
foreach { suffix { fTailed fHasTopSerif Serifs } } [Object.entries HConfig] : do
|
||||
foreach { suffix { fTailed {fHasTopSerif Serifs} } } [Object.entries HConfig] : do
|
||||
create-glyph "h.\(suffix)" : glyph-proc
|
||||
include : MarkSet.b
|
||||
include : VBar.l SB 0 Ascender
|
||||
|
|
|
@ -186,7 +186,7 @@ glyph-block Letter-Latin-Lower-M : begin
|
|||
"topLeftSerifed" { LtSerifs }
|
||||
"topLeftAndBottomRightSerifed" { LtRbSerifs }
|
||||
|
||||
foreach { suffix { {Body earless} {tailed} {shortLeg} {Serifs} } } [pairs-of SmallMConfig] : do
|
||||
foreach { suffix { {Body earless} {shortLeg} {tailed} {Serifs} } } [pairs-of SmallMConfig] : do
|
||||
define [mShapeBody df height] : glyph-proc
|
||||
include : Body height 0 [if shortLeg [SmallMShortLegHeight height df] 0] [if tailed ([SmallMSmoothHeight height df] + O) 0] df
|
||||
if tailed : include : RightwardTailedBar df.rightSB 0 [SmallMSmoothHeight height df] (sw -- df.mvs)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
$$include '../../../meta/macros.ptl'
|
||||
|
||||
import [mix linreg clamp fallback] from"../../../support/utils.mjs"
|
||||
import [mix clamp fallback SuffixCfg] from"../../../support/utils.mjs"
|
||||
import [Dotless CvDecompose MathSansSerif Joining] from"../../../support/gr.mjs"
|
||||
|
||||
glyph-module
|
||||
|
@ -65,35 +65,28 @@ glyph-block Letter-Latin-Lower-N : begin
|
|||
include : RightwardTailedBar right yBot yBR sw
|
||||
include : AdjustTrailingAnchor
|
||||
|
||||
define NConfig : object
|
||||
'straightSerifless' { EaredBody 0 nothing nothing nothing }
|
||||
'straightMotionSerifed' { EaredBody 0 NTopLeftSerif nothing NBottomRightSerifItalic }
|
||||
'straightTopLeftSerifed' { EaredBody 0 NTopLeftSerif nothing nothing }
|
||||
'straightSerifed' { EaredBody 0 NTopLeftSerif NBottomLeftSerif NBottomRightSerifUpright }
|
||||
define NConfig : SuffixCfg.weave
|
||||
object # body
|
||||
"" EaredBody
|
||||
earlessCorner EarlessCornerBody
|
||||
earlessRounded EarlessRoundedBody
|
||||
earlessCornerHTB EarlessCornerBody
|
||||
earlessRoundedHTB EarlessRoundedBody
|
||||
object # terminal
|
||||
straight 0
|
||||
tailed 1
|
||||
function [body tail] : object # serifs
|
||||
serifless { nothing nothing nothing }
|
||||
topLeftSerifed { NTopLeftSerif nothing nothing }
|
||||
motionSerifed { NTopLeftSerif nothing [if (tail != 'tailed') NBottomRightSerifItalic] }
|
||||
serifed : list
|
||||
match body
|
||||
([Just "earlessCorner"] || [Just "earlessRounded"]) nothing
|
||||
([Just "earlessCornerHTB"] || [Just "earlessRoundedHTB"]) NHTB
|
||||
begin NBottomLeftSerif
|
||||
if (tail != 'tailed') NBottomRightSerifUpright
|
||||
|
||||
'tailedSerifless' { EaredBody 1 nothing nothing nothing }
|
||||
'tailedMotionSerifed' { EaredBody 1 NTopLeftSerif nothing nothing }
|
||||
'tailedSerifed' { EaredBody 1 NTopLeftSerif NBottomLeftSerif nothing }
|
||||
|
||||
'earlessCornerStraightSerifless' { EarlessCornerBody 0 nothing nothing nothing }
|
||||
'earlessCornerStraightSerifed' { EarlessCornerBody 0 nothing NBottomLeftSerif NBottomRightSerifUpright }
|
||||
'earlessCornerTailedSerifless' { EarlessCornerBody 1 nothing nothing nothing }
|
||||
'earlessCornerTailedSerifed' { EarlessCornerBody 1 nothing NBottomLeftSerif nothing }
|
||||
'earlessRoundedStraightSerifless' { EarlessRoundedBody 0 nothing nothing nothing }
|
||||
'earlessRoundedStraightSerifed' { EarlessRoundedBody 0 nothing NBottomLeftSerif NBottomRightSerifUpright }
|
||||
'earlessRoundedTailedSerifless' { EarlessRoundedBody 1 nothing nothing nothing }
|
||||
'earlessRoundedTailedSerifed' { EarlessRoundedBody 1 nothing NBottomLeftSerif nothing }
|
||||
|
||||
'earlessCornerStraightHTBSerifless' { EarlessCornerBody 0 NHTB nothing nothing }
|
||||
'earlessCornerStraightHTBSerifed' { EarlessCornerBody 0 NHTB NBottomLeftSerif NBottomRightSerifUpright }
|
||||
'earlessCornerTailedHTBSerifless' { EarlessCornerBody 1 NHTB nothing nothing }
|
||||
'earlessCornerTailedHTBSerifed' { EarlessCornerBody 1 NHTB NBottomLeftSerif nothing }
|
||||
'earlessRoundedStraightHTBSerifless' { EarlessRoundedBody 0 NHTB nothing nothing }
|
||||
'earlessRoundedStraightHTBSerifed' { EarlessRoundedBody 0 NHTB NBottomLeftSerif NBottomRightSerifUpright }
|
||||
'earlessRoundedTailedHTBSerifless' { EarlessRoundedBody 1 NHTB nothing nothing }
|
||||
'earlessRoundedTailedHTBSerifed' { EarlessRoundedBody 1 NHTB NBottomLeftSerif nothing }
|
||||
|
||||
foreach { suffix { Body tailed sLT sLB sRB } } [Object.entries NConfig] : do
|
||||
foreach { suffix { Body tailed {sLT sLB sRB} } } [Object.entries NConfig] : do
|
||||
create-glyph "n.\(suffix)" : glyph-proc
|
||||
include : MarkSet.e
|
||||
set-base-anchor 'trailing' RightSB 0
|
||||
|
|
|
@ -281,19 +281,26 @@ class VbStageAlternative {
|
|||
|
||||
tryAccept(globalState, localState) {
|
||||
// Reject if disable conditions match
|
||||
if (this.shouldReject(localState)) return null;
|
||||
if (this.evalCondition(this.disableIf, localState)) return null;
|
||||
|
||||
// Accept this alternative.
|
||||
const ans = localState.clone();
|
||||
ans.stage = this.next;
|
||||
ans.assignments.set(this.stage, this.key);
|
||||
if (this.stage === globalState.entry) ans.rankGroup = this.rank;
|
||||
if (this.keyAffix) ans.addKeyAffix(this.mode, this.keyAffix);
|
||||
if (this.descriptionJoiner && this.descriptionAffix)
|
||||
ans.addDescription(this.mode, this.descriptionJoiner, this.descriptionAffix);
|
||||
if (this.selectorAffix)
|
||||
|
||||
if (this.keyAffix) ans.addKeyAffix(this.mode, this.evalValue(this.keyAffix, localState));
|
||||
if (this.descriptionJoiner && this.descriptionAffix) {
|
||||
ans.addDescription(
|
||||
this.mode,
|
||||
this.evalValue(this.descriptionJoiner, localState),
|
||||
this.evalValue(this.descriptionAffix, localState)
|
||||
);
|
||||
}
|
||||
if (this.selectorAffix) {
|
||||
for (const [selector, suffix] of Object.entries(this.selectorAffix))
|
||||
ans.addSelectorAffix(this.mode, selector, suffix);
|
||||
ans.addSelectorAffix(this.mode, selector, this.evalValue(suffix, localState));
|
||||
}
|
||||
|
||||
if (!this.next || this.next === "END") {
|
||||
ans.rank = ++globalState.rank;
|
||||
|
@ -304,10 +311,22 @@ class VbStageAlternative {
|
|||
}
|
||||
}
|
||||
|
||||
shouldReject(localState) {
|
||||
if (!this.disableIf) return false;
|
||||
evalValue(expr, localState) {
|
||||
if (typeof expr === "string") return expr;
|
||||
if (expr.if) {
|
||||
const condition = this.evalCondition(expr.if, localState);
|
||||
if (condition) {
|
||||
return this.evalCondition(expr.then, localState);
|
||||
} else {
|
||||
return this.evalCondition(expr.else, localState);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (const branch of this.disableIf) {
|
||||
evalCondition(expr, localState) {
|
||||
if (!expr) return false;
|
||||
|
||||
for (const branch of expr) {
|
||||
let statementMatches = true;
|
||||
for (let [k, v] of Object.entries(branch)) {
|
||||
v = v.trim();
|
||||
|
|
1450
params/variants.toml
1450
params/variants.toml
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue