More unify

This commit is contained in:
be5invis 2022-12-14 06:47:04 -08:00
parent c23890aa9d
commit d054ca6fee
19 changed files with 289 additions and 293 deletions

View file

@ -8,7 +8,7 @@ glyph-block Letter-Cyrillic-Che : begin
glyph-block-import CommonShapes glyph-block-import CommonShapes
glyph-block-import Common-Derivatives glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : SerifFrame RightwardTailedBar DToothlessRise glyph-block-import Letter-Shared-Shapes : SerifFrame RightwardTailedBar DToothlessRise
glyph-block-import Letter-Shared-Shapes : CyrDescender CyrLeftDescender glyph-block-import Letter-Shared-Shapes : CyrDescender
define BODY-STRAIGHT 0 define BODY-STRAIGHT 0
define BODY-TAILED 1 define BODY-TAILED 1
@ -49,8 +49,8 @@ glyph-block Letter-Cyrillic-Che : begin
[Just SLAB-TAILED-BGR] sf.rt.inner [Just SLAB-TAILED-BGR] sf.rt.inner
__ : glyph-proc __ : glyph-proc
include : tagged 'SerifRB' : match slabType include : tagged 'SerifRB' : match slabType
[Just SLAB-ALL] sf.rb.full [Just SLAB-ALL] sf.rb.fullSide
[Just SLAB-ALL-BGR] sf.rb.full [Just SLAB-ALL-BGR] sf.rb.fullSide
[Just SLAB-LOWER] sf.rb.outer [Just SLAB-LOWER] sf.rb.outer
__ : glyph-proc __ : glyph-proc
@ -58,8 +58,12 @@ glyph-block Letter-Cyrillic-Che : begin
include : MarkSet.capital include : MarkSet.capital
include : CyrCheShape CAP [if SLAB 0.45 0.35] BODY-STRAIGHT : if SLAB SLAB-ALL SLAB-NONE include : CyrCheShape CAP [if SLAB 0.45 0.35] BODY-STRAIGHT : if SLAB SLAB-ALL SLAB-NONE
create-glyph 0x4B6 : composite-proc [refer-glyph 'cyrl/Che'] [CyrDescender RightSB] create-glyph 0x4B6 : composite-proc
create-glyph 0x4CB : composite-proc [refer-glyph 'cyrl/Che'] [CyrLeftDescender (RightSB - HVContrast * Stroke)] refer-glyph 'cyrl/Che'
CyrDescender.rSideJut RightSB 0
create-glyph 0x4CB : composite-proc
refer-glyph 'cyrl/Che'
CyrDescender.lSideJut (RightSB - HVContrast * Stroke) 0 (jut -- MidJutSide)
create-glyph 'cyrl/che.standard' : glyph-proc create-glyph 'cyrl/che.standard' : glyph-proc
include : MarkSet.e include : MarkSet.e
@ -84,11 +88,15 @@ glyph-block Letter-Cyrillic-Che : begin
select-variant 'cyrl/che' 0x447 select-variant 'cyrl/che' 0x447
select-variant 'cyrl/che.BGR' (follow -- 'cyrl/che') select-variant 'cyrl/che.BGR' (follow -- 'cyrl/che')
create-glyph 0x4B7 : composite-proc [refer-glyph 'cyrl/che.standard'] [CyrDescender RightSB] create-glyph 0x4B7 : composite-proc
create-glyph 0x4CC : composite-proc [refer-glyph 'cyrl/che.standard'] [CyrLeftDescender (RightSB - HVContrast * Stroke)] refer-glyph 'cyrl/che.standard'
CyrDescender.rSideJut RightSB 0
create-glyph 0x4CC : composite-proc
refer-glyph 'cyrl/che.standard'
CyrDescender.lSideJut (RightSB - HVContrast * Stroke) 0 (jut -- MidJutSide)
turned 'cyrl/Shha' 0x4BA 'cyrl/Che' Middle (CAP / 2) turned 'cyrl/Shha' 0x4BA 'cyrl/Che' Middle (CAP / 2)
derive-composites 'cyrl/ShhaDescender' 0x526 'cyrl/Shha' [CyrDescender RightSB] derive-composites 'cyrl/ShhaDescender' 0x526 'cyrl/Shha' [CyrDescender.rSideJut RightSB 0]
define SwCheVBar : Math.min OverlayStroke (0.625 * (RightSB - SB - Stroke * 2 * HVContrast) / HVContrast) define SwCheVBar : Math.min OverlayStroke (0.625 * (RightSB - SB - Stroke * 2 * HVContrast) / HVContrast)
create-glyph 'cyrl/CheVBar' 0x4B8 : glyph-proc create-glyph 'cyrl/CheVBar' 0x4B8 : glyph-proc

View file

@ -9,7 +9,7 @@ glyph-block Letter-Cyrillic-El : begin
glyph-block-import CommonShapes glyph-block-import CommonShapes
glyph-block-import Common-Derivatives glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : LegShape RightwardTailedBar glyph-block-import Letter-Shared-Shapes : LegShape RightwardTailedBar
glyph-block-import Letter-Shared-Shapes : CyrDescender CyrTailDescender CyrHookDescender glyph-block-import Letter-Shared-Shapes : CyrDescender CyrTailDescender PalatalHook
define BODY-STRAIGHT 0 define BODY-STRAIGHT 0
define BODY-TAILED 1 define BODY-TAILED 1
@ -62,14 +62,14 @@ glyph-block Letter-Cyrillic-El : begin
include : MarkSet.e include : MarkSet.e
include : CyrElShape XH BODY-TAILED : if SLAB [if para.isItalic SLAB-TAILED-I SLAB-TAILED-U] SLAB-NONE include : CyrElShape XH BODY-TAILED : if SLAB [if para.isItalic SLAB-TAILED-I SLAB-TAILED-U] SLAB-NONE
derive-composites 'cyrl/ElDescender' 0x52E 'cyrl/El' [CyrDescender RightSB] derive-composites 'cyrl/ElDescender' 0x52E 'cyrl/El' [CyrDescender.rSideJut RightSB 0]
derive-composites 'cyrl/elDescender' 0x52F 'cyrl/el.straight' [CyrDescender RightSB] derive-composites 'cyrl/elDescender' 0x52F 'cyrl/el.straight' [CyrDescender.rSideJut RightSB 0]
derive-composites 'cyrl/ElTail' 0x4C5 'cyrl/El' [CyrTailDescender RightSB] derive-composites 'cyrl/ElTail' 0x4C5 'cyrl/El' [CyrTailDescender.rSideJut RightSB 0]
derive-composites 'cyrl/elTail' 0x4C6 'cyrl/el.straight' [CyrTailDescender RightSB] derive-composites 'cyrl/elTail' 0x4C6 'cyrl/el.straight' [CyrTailDescender.rSideJut RightSB 0]
derive-composites 'cyrl/ElHook' 0x512 'cyrl/El' [CyrHookDescender RightSB] derive-composites 'cyrl/ElHook' 0x512 'cyrl/El' [PalatalHook.rSideJut RightSB 0]
derive-composites 'cyrl/elHook' 0x513 'cyrl/el.straight' [CyrHookDescender RightSB] derive-composites 'cyrl/elHook' 0x513 'cyrl/el.straight' [PalatalHook.rSideJut RightSB 0]
select-variant 'cyrl/el' 0x43B select-variant 'cyrl/el' 0x43B
alias 'cyrl/El.BGR' null 'grek/Lambda' alias 'cyrl/El.BGR' null 'grek/Lambda'

View file

@ -85,7 +85,7 @@ glyph-block Letter-Cyrillic-Sha : begin
define [CyrShchaShape top df] : glyph-proc define [CyrShchaShape top df] : glyph-proc
include : CyrShaShape top df include : CyrShaShape top df
#eject-contour 'serifRB' #eject-contour 'serifRB'
include : CyrDescender df.rightSB include : CyrDescender.rSideJut df.rightSB 0 (refSw -- df.mvs)
create-glyph 'cyrl/Shcha' 0x429 : glyph-proc create-glyph 'cyrl/Shcha' 0x429 : glyph-proc
local df : DivFrame para.diversityM 3 local df : DivFrame para.diversityM 3
@ -103,13 +103,13 @@ glyph-block Letter-Cyrillic-Sha : begin
local df : DivFrame para.diversityM 3 local df : DivFrame para.diversityM 3
set-width df.width set-width df.width
include [refer-glyph 'cyrl/sha.italic.toothed'] AS_BASE include [refer-glyph 'cyrl/sha.italic.toothed'] AS_BASE
include : CyrDescender df.rightSB include : CyrDescender.rSideJut df.rightSB 0 (refSw -- df.mvs)
create-glyph 'cyrl/shcha.italic.motionSerifed' : glyph-proc create-glyph 'cyrl/shcha.italic.motionSerifed' : glyph-proc
local df : DivFrame para.diversityM 3 local df : DivFrame para.diversityM 3
set-width df.width set-width df.width
include [refer-glyph 'cyrl/sha.italic.motionSerifedShachaBase'] AS_BASE include [refer-glyph 'cyrl/sha.italic.motionSerifedShachaBase'] AS_BASE
include : CyrDescender df.rightSB include : CyrDescender.rSideJut df.rightSB 0 (refSw -- df.mvs)
select-variant 'cyrl/shcha.italic' select-variant 'cyrl/shcha.italic'
alias 'cyrl/shcha.BGR' null 'cyrl/shcha.italic' alias 'cyrl/shcha.BGR' null 'cyrl/shcha.italic'

View file

@ -13,7 +13,7 @@ glyph-block Letter-Cyrillic-Tse : begin
include : VBarLeft SB 0 top include : VBarLeft SB 0 top
include : HBarBottom SB RightSB 0 include : HBarBottom SB RightSB 0
include : VBarRight RightSB 0 top include : VBarRight RightSB 0 top
include : CyrDescender RightSB include : CyrDescender.rSideJut RightSB 0
if SLAB : let [sf : SerifFrame top 0 SB RightSB] : begin if SLAB : let [sf : SerifFrame top 0 SB RightSB] : begin
include sf.lt.full include sf.lt.full
include sf.rt.full include sf.rt.full
@ -35,7 +35,7 @@ glyph-block Letter-Cyrillic-Tse : begin
widths.rhs sw widths.rhs sw
flat xTopBarLeft top [if SLAB [heading Rightward] null] flat xTopBarLeft top [if SLAB [heading Rightward] null]
curl xTopBarRight top [if SLAB [heading Rightward] null] curl xTopBarRight top [if SLAB [heading Rightward] null]
include : CyrDescender right include : CyrDescender.rSideJut right 0
if SLAB : let [sf : SerifFrame top 0 left right sw] : begin if SLAB : let [sf : SerifFrame top 0 left right sw] : begin
include sf.rt.outer include sf.rt.outer
@ -58,12 +58,12 @@ glyph-block Letter-Cyrillic-Tse : begin
create-glyph 'cyrl/tse.italic.toothed' : glyph-proc create-glyph 'cyrl/tse.italic.toothed' : glyph-proc
include [refer-glyph "u.toothed"] AS_BASE include [refer-glyph "u.toothed"] AS_BASE
eject-contour 'serifRB' eject-contour 'serifRB'
include : CyrDescender RightSB include : CyrDescender.rSideJut RightSB 0
create-glyph 'cyrl/tse.italic.motionSerifed' : glyph-proc create-glyph 'cyrl/tse.italic.motionSerifed' : glyph-proc
include [refer-glyph "u.motionSerifed"] AS_BASE include [refer-glyph "u.motionSerifed"] AS_BASE
eject-contour 'serifRB' eject-contour 'serifRB'
include : CyrDescender RightSB include : CyrDescender.rSideJut RightSB 0
create-glyph 'cyrl/TsTse' 0x4B4 : glyph-proc create-glyph 'cyrl/TsTse' 0x4B4 : glyph-proc
include : MarkSet.capital include : MarkSet.capital
@ -77,13 +77,13 @@ glyph-block Letter-Cyrillic-Tse : begin
include [refer-glyph "u.toothed"] AS_BASE ALSO_METRICS include [refer-glyph "u.toothed"] AS_BASE ALSO_METRICS
include [refer-glyph "tildeAbove"] include [refer-glyph "tildeAbove"]
eject-contour 'serifRB' eject-contour 'serifRB'
include : CyrDescender RightSB include : CyrDescender.rSideJut RightSB 0
create-glyph 'cyrl/tstse.italic.motionSerifed' : glyph-proc create-glyph 'cyrl/tstse.italic.motionSerifed' : glyph-proc
include [refer-glyph "u.motionSerifed"] AS_BASE ALSO_METRICS include [refer-glyph "u.motionSerifed"] AS_BASE ALSO_METRICS
include [refer-glyph "tildeAbove"] include [refer-glyph "tildeAbove"]
eject-contour 'serifRB' eject-contour 'serifRB'
include : CyrDescender RightSB include : CyrDescender.rSideJut RightSB 0
select-variant 'cyrl/tse.italic' select-variant 'cyrl/tse.italic'
select-variant 'cyrl/tstse.italic' (follow -- 'cyrl/tse.italic') select-variant 'cyrl/tstse.italic' (follow -- 'cyrl/tse.italic')

View file

@ -137,7 +137,11 @@ glyph-block Letter-Cyrillic-Zhe : begin
create-glyph "cyrl/ZheDescender.\(suffix)" : composite-proc create-glyph "cyrl/ZheDescender.\(suffix)" : composite-proc
refer-glyph "cyrl/Zhe.\(suffix)" refer-glyph "cyrl/Zhe.\(suffix)"
CyrDescender ([DivFrame para.diversityM 3].rightSB - O * 2) local df : DivFrame para.diversityM 3
CyrDescender.r
xLink -- df.rightSB - 0.5 * HVContrast * df.mvs
x -- df.rightSB + SideJut
y -- 0
create-glyph "cyrl/zhe.\(suffix)" : glyph-proc create-glyph "cyrl/zhe.\(suffix)" : glyph-proc
define df : DivFrame para.diversityM 3 define df : DivFrame para.diversityM 3
@ -147,7 +151,11 @@ glyph-block Letter-Cyrillic-Zhe : begin
create-glyph "cyrl/zheDescender.\(suffix)" : composite-proc create-glyph "cyrl/zheDescender.\(suffix)" : composite-proc
refer-glyph "cyrl/zhe.\(suffix)" refer-glyph "cyrl/zhe.\(suffix)"
CyrDescender ([DivFrame para.diversityM 3].rightSB - O * 2) local df : DivFrame para.diversityM 3
CyrDescender.r
xLink -- df.rightSB - 0.5 * HVContrast * df.mvs
x -- df.rightSB + SideJut
y -- 0
create-glyph "cyrl/zhe.BGR.\(suffix)" : glyph-proc create-glyph "cyrl/zhe.BGR.\(suffix)" : glyph-proc
define df : DivFrame para.diversityM 3 define df : DivFrame para.diversityM 3

View file

@ -54,8 +54,8 @@ glyph-block Letter-Greek-Pi : begin
include [refer-glyph src] AS_BASE include [refer-glyph src] AS_BASE
include : refer-glyph "macronAbove" include : refer-glyph "macronAbove"
derive-composites 'cyrl/PeDescender' 0x524 'cyrl/Pe' [CyrDescender RightSB] derive-composites 'cyrl/PeDescender' 0x524 'cyrl/Pe' [CyrDescender.rSideJut RightSB 0]
derive-composites 'cyrl/peDescender.upright' null 'cyrl/pe.upright' [CyrDescender RightSB] derive-composites 'cyrl/peDescender.upright' null 'cyrl/pe.upright' [CyrDescender.rSideJut RightSB 0]
create-glyph 'grek/pi' 0x3C0 : glyph-proc create-glyph 'grek/pi' 0x3C0 : glyph-proc
include : MarkSet.e include : MarkSet.e

View file

@ -9,8 +9,8 @@ glyph-module
glyph-block Letter-Greek-Upper-Gamma: begin glyph-block Letter-Greek-Upper-Gamma: begin
glyph-block-import CommonShapes glyph-block-import CommonShapes
glyph-block-import Common-Derivatives glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : nShoulder CyrDescender CyrHookDescender glyph-block-import Letter-Shared-Shapes : nShoulder CyrDescender
glyph-block-import Letter-Shared-Shapes : LetterBarOverlay VerticalHook glyph-block-import Letter-Shared-Shapes : LetterBarOverlay VerticalHook PalatalHook
glyph-block-import Letter-Blackboard : BBS BBD BBBarLeft glyph-block-import Letter-Blackboard : BBS BBD BBBarLeft
glyph-block-import Letter-Latin-Upper-F : xMidBarShrink glyph-block-import Letter-Latin-Upper-F : xMidBarShrink
@ -60,11 +60,17 @@ glyph-block Letter-Greek-Upper-Gamma: begin
create-glyph "cyrl/GheDescender.\(suffix)" : glyph-proc create-glyph "cyrl/GheDescender.\(suffix)" : glyph-proc
include [refer-glyph "grek/Gamma.\(suffix)"] AS_BASE ALSO_METRICS include [refer-glyph "grek/Gamma.\(suffix)"] AS_BASE ALSO_METRICS
include : CyrDescender (GammaBarLeft + Stroke * HVContrast) (overflow -- [if doSB (MidJutCenter - HalfStroke * HVContrast)]) include : CyrDescender.rSideJut
x -- GammaBarLeft + Stroke * HVContrast
y -- 0
jut -- MidJutSide
create-glyph "cyrl/GheDHook.\(suffix)" : glyph-proc create-glyph "cyrl/GheDHook.\(suffix)" : glyph-proc
include [refer-glyph "grek/Gamma.\(suffix)"] AS_BASE ALSO_METRICS include [refer-glyph "grek/Gamma.\(suffix)"] AS_BASE ALSO_METRICS
include : CyrHookDescender (GammaBarLeft + Stroke * HVContrast) (overflow -- (MidJutCenter - HalfStroke * HVContrast)) include : PalatalHook.rSideJut
x -- GammaBarLeft + Stroke * HVContrast
y -- 0
jut -- MidJutSide
create-glyph "cyrl/ghe.upright.\(suffix)" : glyph-proc create-glyph "cyrl/ghe.upright.\(suffix)" : glyph-proc
include : MarkSet.e include : MarkSet.e
@ -72,11 +78,17 @@ glyph-block Letter-Greek-Upper-Gamma: begin
create-glyph "cyrl/gheDescender.upright.\(suffix)" : glyph-proc create-glyph "cyrl/gheDescender.upright.\(suffix)" : glyph-proc
include [refer-glyph "cyrl/ghe.upright.\(suffix)"] AS_BASE ALSO_METRICS include [refer-glyph "cyrl/ghe.upright.\(suffix)"] AS_BASE ALSO_METRICS
include : CyrDescender (GammaBarLeft + Stroke * HVContrast) (overflow -- [if doSB (MidJutCenter - HalfStroke * HVContrast)]) include : CyrDescender.rSideJut
x -- GammaBarLeft + Stroke * HVContrast
y -- 0
jut -- MidJutSide
create-glyph "cyrl/gheDHook.upright.\(suffix)" : glyph-proc create-glyph "cyrl/gheDHook.upright.\(suffix)" : glyph-proc
include [refer-glyph "cyrl/ghe.upright.\(suffix)"] AS_BASE ALSO_METRICS include [refer-glyph "cyrl/ghe.upright.\(suffix)"] AS_BASE ALSO_METRICS
include : CyrHookDescender (GammaBarLeft + Stroke * HVContrast) (overflow -- (MidJutCenter - HalfStroke * HVContrast)) include : PalatalHook.rSideJut
x -- GammaBarLeft + Stroke * HVContrast
y -- 0
jut -- MidJutSide
create-glyph "cyrl/Ge.\(suffix)" : glyph-proc create-glyph "cyrl/Ge.\(suffix)" : glyph-proc
include : CyrlGeMarks.capital include : CyrlGeMarks.capital

View file

@ -275,20 +275,16 @@ glyph-block Letter-Latin-K : begin
if (slab && !tailed) : include : RightwardBottomSerif dim.slabStartX 0 SideJut if (slab && !tailed) : include : RightwardBottomSerif dim.slabStartX 0 SideJut
define [KCyrlCursiveDescender top straightBar slabLeft slab] : begin define [KDescender shape top straightBar slabLeft slab] : begin
define dim : KCursiveLoopAndLegDimen top straightBar slabLeft slab
return : CyrDescender dim.slabStartX
define [KCyrlNormalDescender top straightBar slabLeft slab] : CyrDescender
RightSB + [KBalanceRight slab straightBar] - [KO slab straightBar top Stroke]
connex -- [if straightBar 1 0.1]
define [KPalatalHook top straightBar slabLeft slab] : begin
local xPos : RightSB + [KBalanceRight slab straightBar] - [KO slab straightBar top Stroke] local xPos : RightSB + [KBalanceRight slab straightBar] - [KO slab straightBar top Stroke]
return : PalatalHook.r return : shape.r
x -- xPos + SideJut x -- xPos + SideJut
y -- 0 y -- 0
xLink -- xPos - [if straightBar 1 0.1] * HVContrast * Stroke xLink -- xPos - [if straightBar 1 0.1] * HVContrast * Stroke
define [KCyrlNormalDescender top straightBar slabLeft slab] : begin
return : KDescender CyrDescender top straightBar slabLeft slab
define [KPalatalHook top straightBar slabLeft slab] : begin
return : KDescender PalatalHook top straightBar slabLeft slab
define [KHookTopBar slab straightBar] : HooktopLeftBar.inner define [KHookTopBar slab straightBar] : HooktopLeftBar.inner
x -- SB + [KBalance slab straightBar] x -- SB + [KBalance slab straightBar]

View file

@ -9,8 +9,7 @@ glyph-block Letter-Latin-Lower-H : begin
glyph-block-import CommonShapes glyph-block-import CommonShapes
glyph-block-import Common-Derivatives glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : RightwardTailedBar nShoulder nShoulderMask glyph-block-import Letter-Shared-Shapes : RightwardTailedBar nShoulder nShoulderMask
glyph-block-import Letter-Shared-Shapes : CyrDescender CyrLeftDescender HooktopLeftBar glyph-block-import Letter-Shared-Shapes : CyrDescender HooktopLeftBar VerticalHook
glyph-block-import Letter-Shared-Shapes : VerticalHook
define [SmallHSerifs tailed hookTop] : glyph-proc : if SLAB : begin define [SmallHSerifs tailed hookTop] : glyph-proc : if SLAB : begin
if [not hookTop] : include : tagged 'serifLT' : LeftwardTopSerif SB Ascender SideJut if [not hookTop] : include : tagged 'serifLT' : LeftwardTopSerif SB Ascender SideJut
@ -98,7 +97,7 @@ glyph-block Letter-Latin-Lower-H : begin
select-variant 'hBar' 0x127 (follow -- 'h') select-variant 'hBar' 0x127 (follow -- 'h')
select-variant 'cyrl/shha' 0x4BB (shapeFrom -- 'h') select-variant 'cyrl/shha' 0x4BB (shapeFrom -- 'h')
derive-composites 'cyrl/shhaDescender' 0x527 'cyrl/shha' [CyrDescender RightSB] derive-composites 'cyrl/shhaDescender' 0x527 'cyrl/shha' [CyrDescender.rSideJut RightSB 0]
select-variant 'hHookTop' 0x266 select-variant 'hHookTop' 0x266
select-variant 'hHookTopLTail' 0x267 select-variant 'hHookTopLTail' 0x267

View file

@ -267,13 +267,16 @@ glyph-block Letter-Latin-Lower-M : begin
select-variant 'cyrl/te.italic' (shapeFrom -- 'm') select-variant 'cyrl/te.italic' (shapeFrom -- 'm')
alias 'cyrl/te.BGR' null 'cyrl/te.italic' alias 'cyrl/te.BGR' null 'cyrl/te.italic'
derive-composites 'cyrl/teDescender.italic' null 'cyrl/te.italic' derive-composites 'cyrl/teDescender.italic' null 'cyrl/te.italic' : do
CyrDescender [DivFrame para.diversityM 3].rightSB local df : DivFrame para.diversityM 3
derive-composites 'mPalatalHook' 0x1D86 'cyrl/te.italic' CyrDescender.rSideJut df.rightSB 0 (refSw -- df.mvs)
derive-composites 'mPalatalHook' 0x1D86 'cyrl/te.italic' : do
local df : DivFrame para.diversityM 3
PalatalHook.r PalatalHook.r
xLink -- [DivFrame para.diversityM 3].rightSB xLink -- df.rightSB
x -- [DivFrame para.diversityM 3].rightSB + SideJut x -- df.rightSB + SideJut
y -- 0 y -- 0
refSw -- df.mvs
select-variant 'mLTail' 0x271 select-variant 'mLTail' 0x271
select-variant 'turnmLeg' 0x270 (follow -- 'm') select-variant 'turnmLeg' 0x270 (follow -- 'm')

View file

@ -154,7 +154,7 @@ glyph-block Letter-Latin-Lower-N : begin
CreateAccentedComposition 'nTildeOver' 0x1D70 'n' 'tildeOverWide' CreateAccentedComposition 'nTildeOver' 0x1D70 'n' 'tildeOverWide'
derive-composites 'cyrl/peDescender.italic' null 'cyrl/peItalicDescBase' [CyrDescender RightSB] derive-composites 'cyrl/peDescender.italic' null 'cyrl/peItalicDescBase' [CyrDescender.rSideJut RightSB 0]
derive-composites 'nPalatalHook' 0x1D87 'cyrl/peItalicDescBase' derive-composites 'nPalatalHook' 0x1D87 'cyrl/peItalicDescBase'
PalatalHook.r PalatalHook.r
xLink -- RightSB xLink -- RightSB

View file

@ -18,7 +18,7 @@ glyph-block Letter-Latin-S : begin
glyph-block-import Letter-Shared-Shapes : ArcStartSerifL ArcEndSerifR glyph-block-import Letter-Shared-Shapes : ArcStartSerifL ArcEndSerifR
glyph-block-import Letter-Shared-Shapes : ArcStartInwardSerifR ArcEndInwardSerifL glyph-block-import Letter-Shared-Shapes : ArcStartInwardSerifR ArcEndInwardSerifL
glyph-block-import Letter-Shared-Shapes : ArcStartInwardSerifL ArcEndInwardSerifR glyph-block-import Letter-Shared-Shapes : ArcStartInwardSerifL ArcEndInwardSerifR
glyph-block-import Letter-Shared-Shapes : PalatalHook RetroflexHook glyph-block-import Letter-Shared-Shapes : PalatalHook RetroflexHook CyrDescender
define SLAB-NONE 0 define SLAB-NONE 0
define SLAB-CLASSICAL 1 define SLAB-CLASSICAL 1
@ -211,9 +211,6 @@ glyph-block Letter-Latin-S : begin
[Just SLAB-INWARD] : ArcEndInwardSerifR RightSB bot sw hook [Just SLAB-INWARD] : ArcEndInwardSerifR RightSB bot sw hook
__ : glyph-proc __ : glyph-proc
define CyrlGeMarks : object
e : MarkSet.OfZone { .top (XH + AccentStackOffset / 2) .bot 0 }
define SConfig : object define SConfig : object
serifless { SLAB-NONE SLAB-NONE } serifless { SLAB-NONE SLAB-NONE }
unilateralSerifed { SLAB-CLASSICAL SLAB-NONE } unilateralSerifed { SLAB-CLASSICAL SLAB-NONE }
@ -278,26 +275,6 @@ glyph-block Letter-Latin-S : begin
include : RevSAutoSlabStart doTS XH [AdviceStroke2 2 3 XH] Hook include : RevSAutoSlabStart doTS XH [AdviceStroke2 2 3 XH] Hook
include : RevSAutoSlabEnd doBS 0 [AdviceStroke2 2 3 XH] Hook include : RevSAutoSlabEnd doBS 0 [AdviceStroke2 2 3 XH] Hook
create-glyph "cyrl/gheDescender.italic.\(suffix)" : glyph-proc
include : MarkSet.e
include : RevSmallSStroke doTS SLAB-CLASSICAL [AdviceStroke2 2 3 XH] EssLower
include : RevSAutoSlabStart doTS XH [AdviceStroke2 2 3 XH] Hook
include : ArcEndSerifR RightSB 0 [AdviceStroke2 2 3 XH] Hook AccentStackOffset
create-glyph "cyrl/gheDHook.italic.\(suffix)" : glyph-proc
include : MarkSet.e
include : RevSmallSStroke doTS SLAB-CLASSICAL [AdviceStroke2 2 3 XH] EssLower
include : RevSAutoSlabStart doTS XH [AdviceStroke2 2 3 XH] Hook
local hd : FlatHookDepth [DivFrame 1]
local hookSw : ArcStartSerifWidth : AdviceStroke2 2 3 XH
include : dispiro
widths.rhs hookSw
flat RightSB (Hook - O * 2) [heading Downward]
curl RightSB (hd.y - Hook - 0.25 * hookSw) [heading Downward]
arcvh
flat (RightSB - hd.x + 0.25 * hookSw * HVContrast) (0 - Hook)
curl (RightSB - HookX - 0.5 * hookSw * HVContrast) (0 - Hook)
define [UpperSBaseWithAttach] : glyph-proc define [UpperSBaseWithAttach] : glyph-proc
include : SAutoSlabStart doTS CAP Stroke Hook include : SAutoSlabStart doTS CAP Stroke Hook
local stroke : include : SStrokeImpl CAP 0 doTS doBS [AdviceStroke2 2 3 CAP] EssUpper local stroke : include : SStrokeImpl CAP 0 doTS doBS [AdviceStroke2 2 3 CAP] EssUpper
@ -332,17 +309,6 @@ glyph-block Letter-Latin-S : begin
flat (RightSB - 1) Descender [widths sw 0] flat (RightSB - 1) Descender [widths sw 0]
curl RightSB Descender curl RightSB Descender
create-glyph "SRTail.\(suffix)" : glyph-proc
include [refer-glyph "S.\(suffix)"] AS_BASE ALSO_METRICS
include : RetroflexHook.l SB 0 (refSw -- [AdviceStroke2 2 3 CAP])
include : ExtendBelowBaseAnchors (-Hook)
create-glyph "sRTail.\(suffix)" : glyph-proc
include [refer-glyph "s.\(suffix)"] AS_BASE ALSO_METRICS
include : RetroflexHook.l SB 0 (refSw -- [AdviceStroke2 2 3 XH])
include : ExtendBelowBaseAnchors (-Hook)
select-variant 'S' 'S' select-variant 'S' 'S'
link-reduced-variant 'S/sansSerif' 'S' MathSansSerif link-reduced-variant 'S/sansSerif' 'S' MathSansSerif
select-variant 's' 's' select-variant 's' 's'
@ -350,6 +316,9 @@ glyph-block Letter-Latin-S : begin
select-variant 'smcpS' 0xA731 (follow -- 'S') select-variant 'smcpS' 0xA731 (follow -- 'S')
select-variant 'revS' 0x1A7 (follow -- 'S') select-variant 'revS' 0x1A7 (follow -- 'S')
select-variant 'revs' 0x1A8 (follow -- 's') select-variant 'revs' 0x1A8 (follow -- 's')
alias 'cyrl/Dze' 0x405 'S'
alias 'cyrl/dze' 0x455 's'
alias 'cyrl/ghe.italic' null 'revs'
select-variant 'DollarKernelStd' (follow -- 'S') select-variant 'DollarKernelStd' (follow -- 'S')
select-variant 'DollarKernelCap' (follow -- 'S') select-variant 'DollarKernelCap' (follow -- 'S')
@ -357,18 +326,26 @@ glyph-block Letter-Latin-S : begin
select-variant 'SSwash' 0x2C7E select-variant 'SSwash' 0x2C7E
select-variant 'sSwash' 0x23F select-variant 'sSwash' 0x23F
select-variant 'SRTail' 0xA7C5 select-variant 'S/descBase' (shapeFrom -- 'S') (follow -- 'SRTail')
select-variant 'sRTail' 0x282 select-variant 's/descBase' (shapeFrom -- 's') (follow -- 'sRTail')
select-variant 'revs/descBase' (shapeFrom -- 'revs') (follow -- 'sRTail')
alias 'cyrl/Dze' 0x405 'S'
alias 'cyrl/dze' 0x455 's'
alias 'cyrl/ghe.italic' null 'revs'
select-variant 'cyrl/gheDescender.italic' null (follow -- 'sSwash')
select-variant 'cyrl/gheDHook.italic' null (follow -- 'sSwash')
select-variant 's/phoneticRight' select-variant 's/phoneticRight'
derive-composites 'SRTail' 0xA7C5 'S/descBase'
RetroflexHook.l SB 0 (refSw -- [AdviceStroke 2 3 CAP])
derive-composites 'sRTail' 0x282 's/descBase'
RetroflexHook.l SB 0 (refSw -- [AdviceStroke 2 3 XH])
derive-composites 'cyrl/gheDescender.italic' null 'revs/descBase'
CyrDescender.r RightSB 0 (refSw -- [AdviceStroke 2 3 XH])
derive-composites 'cyrl/gheDHook.italic' null 'revs/descBase'
PalatalHook.r RightSB 0 (refSw -- [AdviceStroke 2 3 XH])
derive-composites 'cyrl/ghayn.italic' null 'revs'
FlatSlashShape Middle (XH / 2) (OverlayStroke / 2) (-0.2) 0.75
derive-composites 'cyrl/gheStrokeHook.italic' null 'cyrl/gheDHook.italic'
FlatSlashShape Middle (XH / 2) (OverlayStroke / 2) (-0.2) 0.75
derive-composites 'sPalatalHook' 0x1D8A 's' : PalatalHook.r derive-composites 'sPalatalHook' 0x1D8A 's' : PalatalHook.r
x -- [mix (Middle + CorrectionOMidS) RightSB 0.75] x -- [mix (Middle + CorrectionOMidS) RightSB 0.75]
y -- 0 y -- 0
@ -424,11 +401,7 @@ glyph-block Letter-Latin-S : begin
.y ([if (sign < 0) 0.25 0.375] * sign * BBD * [Math.cos theta]) .y ([if (sign < 0) 0.25 0.375] * sign * BBD * [Math.cos theta])
} }
derive-composites 'cyrl/ghayn.italic' null 'revs'
FlatSlashShape Middle (XH / 2) (OverlayStroke / 2) (-0.2) 0.75
derive-composites 'cyrl/gheStrokeHook.italic' null 'cyrl/gheDHook.italic'
FlatSlashShape Middle (XH / 2) (OverlayStroke / 2) (-0.2) 0.75
define DollarConfig : object define DollarConfig : object
open { 0.95 0.05 (Descender / 2) 0 "std" } open { 0.95 0.05 (Descender / 2) 0 "std" }

View file

@ -218,7 +218,9 @@ glyph-block Letter-Latin-U : begin
include [refer-glyph src] AS_BASE ALSO_METRICS include [refer-glyph src] AS_BASE ALSO_METRICS
include [refer-glyph 'graveAbove'] include [refer-glyph 'graveAbove']
derive-composites 'cyrl/iShortTail.italic' null 'cyrl/i.italic.reduced' [refer-glyph 'breveAbove'] [CyrTailDescender RightSB] derive-composites 'cyrl/iShortTail.italic' null 'cyrl/i.italic.reduced'
refer-glyph 'breveAbove'
CyrTailDescender.rSideJut RightSB 0
derive-composites 'uRTailBR' 0x1D99 'u/uRTailBase' derive-composites 'uRTailBR' 0x1D99 'u/uRTailBase'
RetroflexHook.rSideJut RightSB 0 (yOverflow -- Stroke) RetroflexHook.rSideJut RightSB 0 (yOverflow -- Stroke)

View file

@ -183,11 +183,11 @@ glyph-block Letter-Latin-Upper-H : begin
select-variant 'cyrl/en.BGR' (shapeFrom -- 'smcpH') select-variant 'cyrl/en.BGR' (shapeFrom -- 'smcpH')
alias 'grek/heta' 0x371 'halfSmcpH.serifless' alias 'grek/heta' 0x371 'halfSmcpH.serifless'
derive-composites 'cyrl/EnDescender' 0x4A2 'cyrl/En' [CyrDescender RightSB] derive-composites 'cyrl/EnDescender' 0x4A2 'cyrl/En' [CyrDescender.rSideJut RightSB 0]
derive-composites 'cyrl/enDescender' 0x4A3 'cyrl/en/descenderBase' [CyrDescender RightSB] derive-composites 'cyrl/enDescender' 0x4A3 'cyrl/en/descenderBase' [CyrDescender.rSideJut RightSB 0]
derive-composites 'cyrl/EnTail' 0x4C9 'cyrl/En' [CyrTailDescender RightSB] derive-composites 'cyrl/EnTail' 0x4C9 'cyrl/En' [CyrTailDescender.rSideJut RightSB 0]
derive-composites 'cyrl/enTail' 0x4CA 'cyrl/en/descenderBase' [CyrTailDescender RightSB] derive-composites 'cyrl/enTail' 0x4CA 'cyrl/en/descenderBase' [CyrTailDescender.rSideJut RightSB 0]
select-variant 'cyrl/EnGhe' 0x4A4 (follow -- 'H') select-variant 'cyrl/EnGhe' 0x4A4 (follow -- 'H')
select-variant 'cyrl/enghe' 0x4A5 (follow -- 'cyrl/en') select-variant 'cyrl/enghe' 0x4A5 (follow -- 'cyrl/en')

View file

@ -132,8 +132,12 @@ glyph-block Letter-Latin-Upper-M : begin
alias-reduced-variant 'grek/Mu/sansSerif' 'grek/Mu' 'M/sansSerif' MathSansSerif alias-reduced-variant 'grek/Mu/sansSerif' 'grek/Mu' 'M/sansSerif' MathSansSerif
alias 'cyrl/Em' 0x41C 'M' alias 'cyrl/Em' 0x41C 'M'
derive-composites 'cyrl/EmTail' 0x4CD 'cyrl/Em' [CyrTailDescender [DivFrame para.diversityM 3].rightSB] derive-composites 'cyrl/EmTail' 0x4CD 'cyrl/Em' : do
derive-composites 'cyrl/emTail' 0x4CE 'cyrl/em' [CyrTailDescender [DivFrame para.diversityM 3].rightSB] local df : DivFrame para.diversityM 3
CyrTailDescender.rSideJut df.rightSB 0 (sw -- df.mvs)
derive-composites 'cyrl/emTail' 0x4CE 'cyrl/em' : do
local df : DivFrame para.diversityM 3
CyrTailDescender.rSideJut df.rightSB 0 (sw -- df.mvs)
alias 'grek/San' 0x3FA 'M.grekCapitalSan' alias 'grek/San' 0x3FA 'M.grekCapitalSan'
alias 'grek/san' 0x3FB 'smcpMWithDescender.grekSmallSan' alias 'grek/san' 0x3FB 'smcpMWithDescender.grekSmallSan'

View file

@ -157,5 +157,5 @@ glyph-block Letter-Latin-Inverse-Upper-N : begin
alias 'cyrl/smcpI' 0x1D0E 'cyrl/i.upright' alias 'cyrl/smcpI' 0x1D0E 'cyrl/i.upright'
derive-composites 'cyrl/IShortTail' 0x48A 'cyrl/I' [refer-glyph 'breveAbove'] [CyrTailDescender RightSB] derive-composites 'cyrl/IShortTail' 0x48A 'cyrl/I' [refer-glyph 'breveAbove'] [CyrTailDescender.rSideJut RightSB 0]
derive-composites 'cyrl/iShortTail.upright' null 'cyrl/i.upright' [refer-glyph 'breveAbove'] [CyrTailDescender RightSB] derive-composites 'cyrl/iShortTail.upright' null 'cyrl/i.upright' [refer-glyph 'breveAbove'] [CyrTailDescender.rSideJut RightSB 0]

View file

@ -47,7 +47,10 @@ glyph-block Letter-Latin-Upper-T : begin
include : df.markSet.capDesc include : df.markSet.capDesc
set-base-anchor 'bottomright' (df.middle + HalfStroke * HVContrast) 0 set-base-anchor 'bottomright' (df.middle + HalfStroke * HVContrast) 0
include : TShape df CAP doST doSB include : TShape df CAP doST doSB
include : CyrDescender (df.middle + HalfStroke * HVContrast) (overflow -- [if doSB (MidJutCenter - HalfStroke * HVContrast)]) include : CyrDescender.rSideJut
x -- (df.middle + HalfStroke * HVContrast)
y -- 0
jut -- [if doSB MidJutCenter Jut]
create-glyph "TBar.\(suffix)" : glyph-proc create-glyph "TBar.\(suffix)" : glyph-proc
include [refer-glyph "T.\(suffix)"] AS_BASE ALSO_METRICS include [refer-glyph "T.\(suffix)"] AS_BASE ALSO_METRICS
@ -69,7 +72,10 @@ glyph-block Letter-Latin-Upper-T : begin
set-width df.width set-width df.width
include : df.markSet.p include : df.markSet.p
include : TShape df XH doST doSB include : TShape df XH doST doSB
include : CyrDescender (df.middle + HalfStroke * HVContrast) (overflow -- [if doSB (MidJutCenter - HalfStroke * HVContrast)]) include : CyrDescender.rSideJut
x -- (df.middle + HalfStroke * HVContrast)
y -- 0
jut -- [if doSB MidJutCenter Jut]
turned "turnT.\(suffix)" nothing "T.\(suffix)" df.middle (CAP / 2) turned "turnT.\(suffix)" nothing "T.\(suffix)" df.middle (CAP / 2)

View file

@ -10,19 +10,20 @@ glyph-block Letter-Latin-X : begin
glyph-block-import Common-Derivatives glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : ShoulderMidKnotLhsRev SerifFrame WithAIHSerifsMask glyph-block-import Letter-Shared-Shapes : ShoulderMidKnotLhsRev SerifFrame WithAIHSerifsMask
glyph-block-import Letter-Shared-Shapes : DiagonalTailInnerRadius DiagonalTailF glyph-block-import Letter-Shared-Shapes : DiagonalTailInnerRadius DiagonalTailF
glyph-block-import Letter-Shared-Shapes : CyrDescender CyrHookDescender glyph-block-import Letter-Shared-Shapes : CyrDescender PalatalHook
glyph-block-export HalfXStrand glyph-block-export HalfXStrand
define [HalfXStrand stb fSlab _leftx lefty rightx righty turn pStraight tension _fine] : glyph-proc define [HalfXStrand stb fSlab _leftx lefty rightx righty turn pStraight tension _fine] : glyph-proc
local sbCor : if stb ([StrokeWidthBlend 1 6] * OX * ([Math.abs (lefty - righty)] / CAP)) 0 local sbCor : if stb ([StrokeWidthBlend 1 6] * OX * ([Math.abs (lefty - righty)] / CAP)) 0
local leftx : _leftx + ((HalfStroke * HVContrast + sbCor) * [if (rightx > _leftx) 1 (-1)]) local leftx : _leftx + (HalfStroke * HVContrast + [Math.max (-SideJut) sbCor]) * [if (rightx > _leftx) 1 (-1)]
local fine : (_fine || Stroke) * 0.5 local fine : (_fine || Stroke) * 0.5
if stb : begin if stb : begin
local hst : HalfStroke * [DiagCor (righty - lefty) (rightx - leftx) 0 0] local hst : HalfStroke * [DiagCor (righty - lefty) (rightx - leftx) 0 0]
local hse : HalfStroke * [Math.min 0.97 ([AdviceStroke 3] / Stroke)] local hse : HalfStroke * [Math.min 0.97 ([AdviceStroke 3] / Stroke)]
local leftx2 : _leftx + (hst * HVContrast + [Math.max (-SideJut) sbCor]) * [if (rightx > _leftx) 1 (-1)]
include : dispiro include : dispiro
corner leftx lefty [widths.heading hst hst [if (lefty < righty) Upward Downward]] corner leftx2 lefty [widths.heading hst hst [if (lefty < righty) Upward Downward]]
corner rightx righty [widths hse hse] corner rightx righty [widths hse hse]
: else : begin : else : begin
@ -53,10 +54,12 @@ glyph-block Letter-Latin-X : begin
XStrand fStraight fSlab SB bottom RightSB top turn 0.4 tension XStrand fStraight fSlab SB bottom RightSB top turn 0.4 tension
XStrand fStraight fSlab SB top RightSB bottom turn 0.4 tension XStrand fStraight fSlab SB top RightSB bottom turn 0.4 tension
export : define [StraightBase fSlab top bottom turn tension] : XBase true fSlab top bottom turn tension export : define [StraightBase fSlab top bottom turn tension]
export : define [CurlyBase fSlab top bottom turn tension] : XBase false fSlab top bottom turn tension XBase true fSlab top bottom turn tension
export : define [CurlyBase fSlab top bottom turn tension]
XBase false fSlab top bottom turn tension
define [XCursiveHalfShape top] : glyph-proc define [XCursiveHalfShape top bottom] : glyph-proc
local ada : ArchDepthAOf (ArchDepth * 0.8) (Width / 2) local ada : ArchDepthAOf (ArchDepth * 0.8) (Width / 2)
local adb : ArchDepthBOf (ArchDepth * 0.8) (Width / 2) local adb : ArchDepthBOf (ArchDepth * 0.8) (Width / 2)
@ -82,22 +85,21 @@ glyph-block Letter-Latin-X : begin
ShoulderMidKnotLhsRev (xTurn) (top - O) fineMid swEnd (-1) (-1) ShoulderMidKnotLhsRev (xTurn) (top - O) fineMid swEnd (-1) (-1)
archv 16 archv 16
flat (xCenterRight - HVContrast * fineMid) (top - ada) [widths.lhs fineMid] flat (xCenterRight - HVContrast * fineMid) (top - ada) [widths.lhs fineMid]
curl (xCenterRight - HVContrast * fineMid) (top / 2 + O) curl (xCenterRight - HVContrast * fineMid) ([mix bottom top 0.5] + O)
define lowerHalf : include : dispiro define lowerHalf : include : dispiro
flat (xCenterRight - 0.5 * HVContrast * fineMid) (top / 2 - O) [widths.center fineMid] flat (xCenterRight - 0.5 * HVContrast * fineMid) ([mix bottom top 0.5] - O) [widths.center fineMid]
curl (xCenterRight - 0.5 * HVContrast * fineMid) [Math.min adb (swMid + rIn)] curl (xCenterRight - 0.5 * HVContrast * fineMid) (bottom + [Math.min adb (swMid + rIn)])
arcvh 16 arcvh 16
DiagonalTailF 1 [DivFrame 1] (xCenterRight - 0.5 * HVContrast * Stroke + TanSlope * rIn) 0 rIn 50 flatHookDepth Stroke DiagonalTailF 1 [DivFrame 1] (xCenterRight - 0.5 * HVContrast * Stroke + TanSlope * rIn) bottom rIn 50 flatHookDepth Stroke
define lowerHalfLastKnot lowerHalf.rhsKnots.(lowerHalf.rhsKnots.length - 1) define lowerHalfLastKnot lowerHalf.rhsKnots.(lowerHalf.rhsKnots.length - 1)
set-base-anchor 'cyrlDescenderAttach' lowerHalfLastKnot.x lowerHalfLastKnot.y set-base-anchor 'cyrlDescenderAttach' lowerHalfLastKnot.x lowerHalfLastKnot.y
export : define [CursiveBase fSerifs top bottom turn tension] export : define [CursiveBase fSerifs top bottom turn tension] : glyph-proc
WithTransform [ApparentTranslate 0 bottom] : glyph-proc include : XCursiveHalfShape top bottom
include : XCursiveHalfShape (top - bottom) include : FlipAround Middle [mix bottom top 0.5]
include : FlipAround Middle ((top - bottom) / 2) include : XCursiveHalfShape top bottom
include : XCursiveHalfShape (top - bottom)
# Serifs # Serifs
export : define [FullSerifs top bot] : let [sf : SerifFrame top bot SB RightSB] export : define [FullSerifs top bot] : let [sf : SerifFrame top bot SB RightSB]
@ -155,11 +157,25 @@ glyph-block Letter-Latin-X : begin
select-variant 'latn/chi' 0xAB53 (follow -- 'x') select-variant 'latn/chi' 0xAB53 (follow -- 'x')
select-variant 'latn/Chi' 0xA7B3 (follow -- 'x') select-variant 'latn/Chi' 0xA7B3 (follow -- 'x')
derive-composites 'cyrl/HaDescender' 0x4B2 'cyrl/Ha' [CyrDescender RightSB]
derive-composites 'cyrl/haDescender' 0x4B3 'cyrl/ha' [CyrDescender RightSB]
derive-composites 'cyrl/HaHook' 0x4FC 'cyrl/Ha' [CyrHookDescender RightSB] define [AddDescender Ctor] : function [src sel] : glyph-proc
derive-composites 'cyrl/haHook' 0x4FD 'cyrl/ha' [CyrHookDescender RightSB] include [refer-glyph src] AS_BASE ALSO_METRICS
local attachAnchor currentGlyph.baseAnchors.cyrlDescenderAttach
if attachAnchor
: then : begin
local attach : currentGlyph.gizmo.unapply attachAnchor
include : Ctor.r attach.x 0 (yAttach -- attach.y)
: else : begin
local sw : Ctor.Sw Stroke
include : Ctor.r
x -- RightSB + SideJut + sw * TanSlope
y -- 0
xLink -- RightSB - HVContrast * 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' alias 'xPalatalHook' 0x1D8D 'cyrl/haHook'
define [CyrlHaBarShape top] : HOverlayBar [mix SB RightSB 0.08] [mix SB RightSB 0.92] (top / 2) define [CyrlHaBarShape top] : HOverlayBar [mix SB RightSB 0.08] [mix SB RightSB 0.92] (top / 2)

View file

@ -440,6 +440,7 @@ glyph-block Letter-Shared-Shapes : begin
glyph-block-export SerifFrame glyph-block-export SerifFrame
define [SerifFrame] : params [top bot left right [sw Stroke]] : begin define [SerifFrame] : params [top bot left right [sw Stroke]] : begin
local jutFS MidJutSide
local jutIn : JutIn left right local jutIn : JutIn left right
local sideJutIn : jutIn - 0.5 * sw * HVContrast local sideJutIn : jutIn - 0.5 * sw * HVContrast
local lBarCenter : left + 0.5 * sw * HVContrast local lBarCenter : left + 0.5 * sw * HVContrast
@ -457,10 +458,12 @@ glyph-block Letter-Shared-Shapes : begin
inner : tagged 'serifRT' : LeftwardTopSerif rBarInner top sideJutIn sw inner : tagged 'serifRT' : LeftwardTopSerif rBarInner top sideJutIn sw
lb : object lb : object
full : tagged 'serifLB' : CenterBottomSerifAsymmetric lBarCenter bot Jut jutIn sw full : tagged 'serifLB' : CenterBottomSerifAsymmetric lBarCenter bot Jut jutIn sw
fullSide : tagged 'serifLB' : CenterBottomSerifAsymmetric lBarCenter bot Jut jutFS sw
outer : tagged 'serifLB' : LeftwardBottomSerif left bot SideJut sw outer : tagged 'serifLB' : LeftwardBottomSerif left bot SideJut sw
inner : tagged 'serifLB' : RightwardBottomSerif lBarInner bot sideJutIn sw inner : tagged 'serifLB' : RightwardBottomSerif lBarInner bot sideJutIn sw
rb : object rb : object
full : tagged 'serifRB' : CenterBottomSerifAsymmetric rBarCenter bot jutIn Jut sw full : tagged 'serifRB' : CenterBottomSerifAsymmetric rBarCenter bot jutIn Jut sw
fullSide : tagged 'serifRB' : CenterBottomSerifAsymmetric rBarCenter bot jutFS Jut sw
outer : tagged 'serifRB' : RightwardBottomSerif right bot SideJut sw outer : tagged 'serifRB' : RightwardBottomSerif right bot SideJut sw
inner : tagged 'serifRB' : LeftwardBottomSerif rBarInner bot sideJutIn sw inner : tagged 'serifRB' : LeftwardBottomSerif rBarInner bot sideJutIn sw
@ -482,54 +485,6 @@ glyph-block Letter-Shared-Shapes : begin
alsoThruThem {{0.5 0.94}} alsoThruThem {{0.5 0.94}}
straight.left.end zbot.x (zbot.y + fine) [heading Leftward] straight.left.end zbot.x (zbot.y + fine) [heading Leftward]
glyph-block-export CyrDescender
define [CyrDescender] : params [x [connex 0.5] [overflow nothing]] : glyph-proc
local attachAnchor currentGlyph.baseAnchors.cyrlDescenderAttach
if attachAnchor
: then : begin
local attach : currentGlyph.gizmo.unapply attachAnchor
local descenderOverflow : fallback overflow SideJut
include : union
VBarRight attach.x (HalfStroke - LongJut) attach.y VJutStroke
HBarTop (attach.x - connex * Stroke * HVContrast) attach.x attach.y
: else : begin
local descenderOverflow : fallback overflow SideJut
include : union
VBarRight (x + descenderOverflow + 0.125 * Stroke) (HalfStroke - LongJut) Stroke VJutStroke
HBarTop (x - connex * Stroke * HVContrast) (x + descenderOverflow) Stroke
glyph-block-export CyrHookDescender
define [CyrHookDescender] : params [x [connex 0.5] [overflow nothing]] : begin
local descenderOverflow : fallback overflow SideJut
local xRef : x + descenderOverflow + 0.25 * Stroke
PalatalHook.r
x -- x + descenderOverflow + 0.25 * Stroke
y -- 0
xAttach -- (x - connex * Stroke * HVContrast)
yOverflow -- Stroke
glyph-block-export CyrTailDescender
define [CyrTailDescender] : params [x [connex 0.5] [overflow nothing]] : begin
local descenderOverflow SideJut
local xRef : x + descenderOverflow + (0.3 + TanSlope) * Stroke
return : union
difference
ExtLineLhs 4 VJutStroke (xRef - 0.275 * LongJut) (HalfStroke - LongJut) xRef Stroke
MaskAbove Stroke
MaskBelow (HalfStroke - LongJut)
if (!SLAB && descenderOverflow > Stroke * 0.7 || connex)
HBarTop (x - connex * Stroke * HVContrast) (x + descenderOverflow) Stroke
glyph-proc
glyph-block-export CyrLeftDescender
define [CyrLeftDescender] : params [x [connex 0.5] [overflow nothing]] : begin
local descenderOverflow : fallback overflow SideJut
return : union
VBarLeft (x - descenderOverflow - 0.25 * Stroke) (HalfStroke - LongJut) Stroke VJutStroke
if (!SLAB && descenderOverflow > Stroke * 0.75 || connex)
HBarTop (x + connex * Stroke * HVContrast) (x - descenderOverflow) Stroke
glyph-proc
# Generic "connected" vertical hooks # Generic "connected" vertical hooks
glyph-block-export VerticalHook glyph-block-export VerticalHook
define VerticalHook : namespace define VerticalHook : namespace
@ -571,17 +526,58 @@ glyph-block Letter-Shared-Shapes : begin
sw -- sw sw -- sw
yExtension -- yExtension yExtension -- yExtension
# Palatal Hooks do "Descender shapes"
glyph-block-export PalatalHook define [xLinkStroke xLink x yAttach sw]
define PalatalHook : namespace if (xLink == nothing) [no-shape] : HBarBottom
define [Impl x y xLink yAttach yOverflow sw maskOut] : glyph-proc Math.min xLink (x - 0.5 * HVContrast * sw)
Math.max xLink (x + 0.5 * HVContrast * sw)
begin yAttach
define [Descenders Impl] : namespace
export : define Sw ArcStartSerifWidth
export : define [adviceGap refSw] : HVContrast * [Sw refSw] + [Math.max (Width / 16) [AdviceStroke 12]]
export : define [m] : params [x y xLink [yAttach y] [yOverflow 0] [refSw Stroke] [maskOut null]] : begin
local sw : Sw refSw
return : Impl x y xLink yAttach yOverflow sw maskOut
export : define [l] : params [x y xLink [yAttach y] [yOverflow 0] [refSw Stroke] [maskOut null]] : begin
local sw : Sw refSw
return : Impl (x + 0.5 * sw * HVContrast) y xLink yAttach yOverflow sw maskOut
export : define [r] : params [x y xLink [yAttach y] [yOverflow 0] [refSw Stroke] [maskOut null]] : begin
local sw : Sw refSw
return : Impl (x - 0.5 * sw * HVContrast) y xLink yAttach yOverflow sw maskOut
export : define [lSideJut] : params [x y [yOverflow 0] [refSw Stroke] [jut Jut]] : begin
local sw : Sw refSw
local xPos : x + 0.5 * HVContrast * (refSw + sw) - jut - sw * TanSlope
return : Impl xPos y x y yOverflow sw
export : define [rSideJut] : params [x y [yOverflow 0] [refSw Stroke] [jut Jut]] : begin
local sw : Sw refSw
local xPos : x - 0.5 * HVContrast * (refSw + sw) + jut + sw * TanSlope
return : Impl xPos y x y yOverflow sw
# Descender of cyrillics
glyph-block-export CyrDescender
define CyrDescender : Descenders : function [x y xLink yAttach sw] : union
xLinkStroke xLink x yAttach sw
VBar x yAttach (y - LongJut) sw
glyph-block-export CyrTailDescender
define CyrTailDescender : Descenders : function [x y xLink yAttach sw] : union
xLinkStroke xLink x yAttach sw
intersection
MaskBelow (yAttach + Stroke)
MaskAbove (y - LongJut)
ExtLineCenter 16 sw (x - 0.125 * LongJut) (y + 0.5 * sw - LongJut) x y
# Palatal Hooks
glyph-block-export PalatalHook
define PalatalHook : Descenders : function [x y xLink yAttach yOverflow sw maskOut] : glyph-proc
include : ExtendBelowBaseAnchors (y - Hook) include : ExtendBelowBaseAnchors (y - Hook)
include : difference include : difference
union union
if (xLink == nothing) [no-shape] : HBarBottom xLinkStroke xLink x yAttach sw
Math.min xLink (x - 0.5 * HVContrast * sw)
Math.max xLink (x + 0.5 * HVContrast * sw)
begin yAttach
VerticalHook.m VerticalHook.m
x -- x x -- x
y -- y y -- y
@ -591,116 +587,89 @@ glyph-block Letter-Shared-Shapes : begin
yExtension -- yAttach + yOverflow - y yExtension -- yAttach + yOverflow - y
if maskOut maskOut [no-shape] if maskOut maskOut [no-shape]
export : define [r] : params [x y xLink [yAttach y] [yOverflow 0] [refSw Stroke] [maskOut null]] : begin # Retroflex hooks
local sw : Sw refSw glyph-block-export RetroflexHook
Impl (x - 0.5 * HVContrast * sw) y xLink yAttach yOverflow sw maskOut define RetroflexHook : Descenders : function [x y xLink yAttach yOverflow sw] : union
xLinkStroke xLink x yAttach sw
VerticalHook.m
x -- x
y -- y
xDepth -- HookX
yDepth -- Hook
sw -- sw
yExtension -- yAttach + yOverflow - y
export : define Sw ArcStartSerifWidth # Left bar with hook at top, shared by multiple glyphs
export : define [adviceGap refSw] glyph-block-export HooktopLeftBar
HVContrast * [Sw refSw] + [Math.max (Width / 16) [AdviceStroke 12]] define HooktopLeftBar : namespace
export : define [outer] : params [[x SB] [top Ascender] [bottom 0]] : composite-proc
VBarLeft x bottom top
VerticalHook.l x top HookX (-Hook)
export : define [inner] : params [[x SB] [top Ascender] [bottom 0]] : composite-proc
VBarLeft x bottom (top - Hook - HalfStroke)
VerticalHook.l x (top - Hook - HalfStroke) HookX (-Hook)
# Retroflex hooks do "Belt overlays"
glyph-block-export RetroflexHook define [BeltOverlayAt x y] : begin
define RetroflexHook : namespace local fine : AdviceStroke 4.5
define [Impl x y xLink yAttach yOverflow sw] : glyph-proc local r : XH * 0.05
local hd : FlatHookDepth [DivFrame 1] return : dispiro
include : union widths.rhs fine
if (xLink == nothing) [no-shape] : HBarBottom flat x (y + r) [heading Leftward]
Math.min xLink (x - 0.5 * HVContrast * sw) curl (x - HalfStroke - r * 1.5) (y + r)
Math.max xLink (x + 0.5 * HVContrast * sw) archv
begin yAttach g4.down.mid (x - HalfStroke - r * 2.5) y [heading Downward]
VerticalHook.m arcvh
x -- x flat (x - HalfStroke - r * 1.5) (y - r)
y -- y curl (x + HalfStroke + r * 1.5 + fine) (y - r)
xDepth -- HookX
yDepth -- Hook
sw -- sw
yExtension -- yAttach + yOverflow - y
export : define Sw ArcStartSerifWidth glyph-block-export BeltOverlay
export : define [m] : params [x y xLink [yAttach y] [yOverflow 0] [refSw Stroke]] define [BeltOverlay top xMiddle] : BeltOverlayAt xMiddle (0.5 * top)
Impl x y xLink yAttach yOverflow [Sw refSw] set BeltOverlay.at BeltOverlayAt
export : define [l] : params [x y xLink [yAttach y] [yOverflow 0] [refSw Stroke]] do "Letter bar overlays"
begin glyph-block-export LetterBarOverlay
local sw : Sw refSw define [LetterBarOverlay] : params [x y space refSw pXInSw sw] : begin
return : Impl (x + 0.5 * sw * HVContrast) y xLink yAttach yOverflow sw local {xLeftSpace xRightSpace} space
export : define [r] : params [x y xLink [yAttach y] [yOverflow 0] [refSw Stroke]] local xLeftEdge : x - pXInSw * refSw * HVContrast
begin local xRightEdge : x + (1 - pXInSw) * refSw * HVContrast
local sw : Sw refSw local p : (xLeftEdge - xLeftSpace) / ((xRightSpace - xRightEdge) + (xLeftEdge - xLeftSpace))
return : Impl (x - 0.5 * sw * HVContrast) y xLink yAttach yOverflow sw local xC : mix xLeftEdge xRightEdge (1 - p)
export : define [rSideJut] : params [x y [yOverflow 0] [refSw Stroke]] : begin return : HOverlayBar
local sw : Sw refSw Math.min (xLeftEdge - SideJut)
return : Impl (x + SideJut - 0.5 * sw * HVContrast) y x y yOverflow sw Math.max (xC - 0.75 * LongJut) [mix xLeftSpace xLeftEdge 0.3]
# Left bar with hook at top, shared by multiple glyphs Math.max (xRightEdge + SideJut)
glyph-block-export HooktopLeftBar Math.min [mix xRightSpace xRightEdge 0.3] (xC + 0.75 * LongJut)
define HooktopLeftBar : namespace begin y
export : define [outer] : params [[x SB] [top Ascender] [bottom 0]] : composite-proc begin sw
VBarLeft x bottom top
VerticalHook.l x top HookX (-Hook)
export : define [inner] : params [[x SB] [top Ascender] [bottom 0]] : composite-proc
VBarLeft x bottom (top - Hook - HalfStroke)
VerticalHook.l x (top - Hook - HalfStroke) HookX (-Hook)
define [BeltOverlayAt x y] : begin set LetterBarOverlay.l : function []
local fine : AdviceStroke 4.5 params [x y [space {0 Width}] [refSw Stroke] [sw OverlayStroke]] : begin
local r : XH * 0.05 LetterBarOverlay x y (space -- space) (refSw -- refSw) (pXInSw -- 0) (sw -- sw)
return : dispiro set LetterBarOverlay.m : function []
widths.rhs fine params [x y [space {0 Width}] [refSw Stroke] [sw OverlayStroke]] : begin
flat x (y + r) [heading Leftward] LetterBarOverlay x y (space -- space) (refSw -- refSw) (pXInSw -- 0.5) (sw -- sw)
curl (x - HalfStroke - r * 1.5) (y + r) set LetterBarOverlay.r : function []
archv params [x y [space {0 Width}] [refSw Stroke] [sw OverlayStroke]] : begin
g4.down.mid (x - HalfStroke - r * 2.5) y [heading Downward] LetterBarOverlay x y (space -- space) (refSw -- refSw) (pXInSw -- 1) (sw -- sw)
arcvh
flat (x - HalfStroke - r * 1.5) (y - r)
curl (x + HalfStroke + r * 1.5 + fine) (y - r)
glyph-block-export BeltOverlay define [calcYAndSw bot top py sw] : begin
define [BeltOverlay top xMiddle] : BeltOverlayAt xMiddle (0.5 * top) local y : mix bot top py
set BeltOverlay.at BeltOverlayAt local sw1 : Math.min sw (1.25 * (top - bot) * py) (1.25 * (top - bot) * (1 - py))
return { y sw1 }
glyph-block-export LetterBarOverlay set LetterBarOverlay.l.in : function []
define [LetterBarOverlay] : params [x y space refSw pXInSw sw] : begin params [x bot top [py 0.5] [space {0 Width}] [refSw Stroke] [sw OverlayStroke]]
local {xLeftSpace xRightSpace} space : begin
local xLeftEdge : x - pXInSw * refSw * HVContrast local { y sw1 } : calcYAndSw bot top py sw
local xRightEdge : x + (1 - pXInSw) * refSw * HVContrast LetterBarOverlay x y (space -- space) (refSw -- refSw) (pXInSw -- 0) (sw -- sw1)
local p : (xLeftEdge - xLeftSpace) / ((xRightSpace - xRightEdge) + (xLeftEdge - xLeftSpace)) set LetterBarOverlay.m.in : function []
local xC : mix xLeftEdge xRightEdge (1 - p) params [x bot top [py 0.5] [space {0 Width}] [refSw Stroke] [sw OverlayStroke]]
return : HOverlayBar : begin
Math.min (xLeftEdge - SideJut) local { y sw1 } : calcYAndSw bot top py sw
Math.max (xC - 0.75 * LongJut) [mix xLeftSpace xLeftEdge 0.3] LetterBarOverlay x y (space -- space) (refSw -- refSw) (pXInSw -- 0.5) (sw -- sw1)
Math.max (xRightEdge + SideJut) set LetterBarOverlay.r.in : function []
Math.min [mix xRightSpace xRightEdge 0.3] (xC + 0.75 * LongJut) params [x bot top [py 0.5] [space {0 Width}] [refSw Stroke] [sw OverlayStroke]]
begin y : begin
begin sw local { y sw1 } : calcYAndSw bot top py sw
LetterBarOverlay x y (space -- space) (refSw -- refSw) (pXInSw -- 1) (sw -- sw1)
set LetterBarOverlay.l : function []
params [x y [space {0 Width}] [refSw Stroke] [sw OverlayStroke]] : begin
LetterBarOverlay x y (space -- space) (refSw -- refSw) (pXInSw -- 0) (sw -- sw)
set LetterBarOverlay.m : function []
params [x y [space {0 Width}] [refSw Stroke] [sw OverlayStroke]] : begin
LetterBarOverlay x y (space -- space) (refSw -- refSw) (pXInSw -- 0.5) (sw -- sw)
set LetterBarOverlay.r : function []
params [x y [space {0 Width}] [refSw Stroke] [sw OverlayStroke]] : begin
LetterBarOverlay x y (space -- space) (refSw -- refSw) (pXInSw -- 1) (sw -- sw)
define [calcYAndSw bot top py sw] : begin
local y : mix bot top py
local sw1 : Math.min sw (1.25 * (top - bot) * py) (1.25 * (top - bot) * (1 - py))
return { y sw1 }
set LetterBarOverlay.l.in : function []
params [x bot top [py 0.5] [space {0 Width}] [refSw Stroke] [sw OverlayStroke]]
: begin
local { y sw1 } : calcYAndSw bot top py sw
LetterBarOverlay x y (space -- space) (refSw -- refSw) (pXInSw -- 0) (sw -- sw1)
set LetterBarOverlay.m.in : function []
params [x bot top [py 0.5] [space {0 Width}] [refSw Stroke] [sw OverlayStroke]]
: begin
local { y sw1 } : calcYAndSw bot top py sw
LetterBarOverlay x y (space -- space) (refSw -- refSw) (pXInSw -- 0.5) (sw -- sw1)
set LetterBarOverlay.r.in : function []
params [x bot top [py 0.5] [space {0 Width}] [refSw Stroke] [sw OverlayStroke]]
: begin
local { y sw1 } : calcYAndSw bot top py sw
LetterBarOverlay x y (space -- space) (refSw -- refSw) (pXInSw -- 1) (sw -- sw1)