Iosevka/font-src/glyphs/letter/latin.ptl
be5invis 4998206c50 * Fix broken serif shapes in Italic Cyrillic Small I (#717).
* Make variant selectors for `m` and `u` have more effect on Cyrillic letters.
2020-11-08 09:17:09 -08:00

7866 lines
280 KiB
Text

$$include '../../meta/macros.ptl'
import [mix linreg clamp fallback] from '../../support/utils'
import [designParameters] from '../../meta/aesthetics'
import [Dotless DoNotDeriveVariants CvDecompose] from "../../support/gr"
glyph-module
glyph-block Letter-Shared : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-export CreateDottedComposition
define [CreateDottedComposition sourceGid dstGid unicode]
with-related-glyphs sourceGid dstGid unicode
lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
include : refer-glyph "dotAbove"
Dotless.set currentGlyph src
if [not sel] : CvDecompose.set currentGlyph { src "dotAbove" }
glyph-block-export CreateCommaCaronComposition
define [CreateCommaCaronComposition sourceGid dstGid unicode]
with-related-glyphs sourceGid dstGid unicode
lambda [src sel] : glyph-proc
define srcGlyph : query-glyph src
define commaOffset : (Width / 2) * [Math.pow (srcGlyph.advanceWidth / Width * 2) (2/3)]
include : refer-glyph "commaTR"
include : Upright
include : Translate commaOffset 0
include : Italify
include srcGlyph AS_BASE ALSO_METRICS
glyph-block Letter-Blackboard : begin
glyph-block-import CommonShapes
glyph-block-export BBS BBD
define BBS : adviceBlackness 6
define BBD : clamp (Width / 5.5) (Width / 4) (BBS * 2)
glyph-block-export BBBarLeft
define [BBBarLeft] : params [x yBot yTop [bbs BBS] [bbd BBD]] : union
VBarLeft x yBot yTop bbs
VBarLeft (x + bbd) yBot yTop bbs
HBarTop x (x + bbd) yTop bbs
HBarBottom x (x + bbd) yBot bbs
glyph-block-export BBBarCenter
define [BBBarCenter] : params [x yBot yTop [bbs BBS] [bbd BBD]] : union
VBar (x - bbd / 2) yBot yTop bbs
VBar (x + bbd / 2) yBot yTop bbs
HBarTop (x - bbd / 2) (x + bbd / 2) yTop bbs
HBarBottom (x - bbd / 2) (x + bbd / 2) yBot bbs
glyph-block-export BBBarRight
define [BBBarRight] : params [x yBot yTop [bbs BBS] [bbd BBD]] : union
VBarRight x yBot yTop bbs
VBarRight (x - bbd) yBot yTop bbs
HBarTop x (x - bbd) yTop bbs
HBarBottom x (x - bbd) yBot bbs
glyph-block-import Marks : markMiddle aboveMarkTop
create-glyph 'mathbb/dotAbove' : glyph-proc
set-width 0
set-mark-anchor 'above' markMiddle XH markMiddle aboveMarkTop
set-base-anchor 'aboveBrace' markMiddle (XH + Accent)
include : DotStrokeAt markMiddle (XH + Accent) (BBD / 2 + BBS) BBS
glyph-block Letter-Shared-Metrics : begin
glyph-block-export BowlXDepth
define [BowlXDepth top bottom left right sw] : begin
local trShrink [Math.pow ((right - left) / (RightSB - SB)) 0.5]
local turnRadius : Math.max (sw * 1.25 * HVContrast)
trShrink * [Math.min ((top - bottom) * 0.45) ((right - left + sw * HVContrast) * 0.5)]
return turnRadius
glyph-block Letter-Shared-Shapes : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-export RightwardTailedBar
define [RightwardTailedBar] : params [x low high [sw Stroke]] : begin
local hookDepth : Math.max SideJut [adviceBlackness 8] (SB * 0.625)
local hookTurn : Math.max [adviceBlackness 16] (hookDepth - [adviceBlackness 16])
local overshoot : O * 1
return : dispiro
flat (x - HVContrast * sw) high [widths.lhs.heading sw Downward]
curl (x - HVContrast * sw) (low + overshoot + sw + hookTurn) [heading Downward]
arcvh
flat (x + hookTurn) (low + overshoot) [heading Rightward]
curl (x + hookDepth + sw * TanSlope) (low + overshoot)
glyph-block-export DToothlessRise
glyph-block-export DMBlend
define DToothlessRise : Hook * 0.375 + Stroke / 16
define DMBlend 0.80
glyph-block-export CurlyTail
define [CurlyTail] : params [fine rinner xleft bottom right x2 y2 [adj 0.4] [adj2 0.4] [adj3 0]] : begin
local ltr : right > xleft
set right : right - fine * [if ltr 1 (-1)]
local mid : mix [mix xleft right 0.5] (right - rinner * [if ltr 1 (-1)]) adj
local midu : mix [mix xleft right 0.5] (right - rinner * [if ltr 1 (-1)]) adj2
return : list
g4.[if ltr 'right' 'left'].mid (mid + CorrectionOMidX * fine * adj3 * [if ltr 1 (-1)]) (bottom + fine + O) [widths [if ltr 0 fine] [if ltr fine 0]]
archv 2
g4 right (bottom + fine + rinner - 0.1)
g4 right (bottom + fine + rinner + 0.1)
arcvh 2
g4 mid (bottom + fine + rinner * 2 - O)
alsoThruThem {{0.25 0.06} {0.52 0.25}} important
g4 x2 y2
glyph-block-export HCurlyTail
define [HCurlyTail fine wide rinner left m1 _right x1 x2 y2] : glyph-proc
local right : _right - fine
local mid : right - rinner + O
include : dispiro
widths.rhs wide
flat left wide [heading Rightward]
curl m1 wide [heading Rightward]
archv 8
g4 right (wide + rinner - O / 2) [widths.heading 0 fine {.x (-HVContrast) .y ((wide - fine) / (wide + rinner * 2 - O))}]
arcvh 8
g4.left.mid mid (wide + rinner * 2 - O) [heading Leftward]
quadcontrols ((x1 - mid) / (x2 - mid)) 0 8
g4 x2 y2
glyph-block-export nShoulderKnots
define [nShoulderKnots] : params [left right [fine ShoulderFine] [top XH] [bottom 0] [sma SmallSmoothA] [smb SmallSmoothB] [stroke Stroke] [fMask false] [leftY0 nothing]] : begin
local slope : shoulderMidSlope fine stroke
local middle : [mix (left - stroke * HVContrast) right 0.5] + (slope - CorrectionOMidX) * stroke
return : list
flat left [fallback leftY0 (top - sma - 2)] [widths fine 0]
curl left (top - sma)
arcvh
g4 middle (top - O) [widths.heading 0 stroke {.y (1) .x (slope)}]
archv
flat right (top - smb) [widths.rhs stroke]
[if fMask corner curl] right bottom [widths.rhs.heading stroke Downward]
if [not fMask] {} {[corner left bottom]}
glyph-block-export nShoulder nShoulderMask
define [nShoulder] : begin
local a : Array.prototype.slice.call arguments 0
glyph-proc
include : dispiro : nShoulderKnots.apply null a
define [nShoulderMask] : begin
local a : Array.prototype.slice.call arguments 0
glyph-proc
include : spiro-outline : nShoulderKnots.apply null [a.concat { (fMask -- true) }]
glyph-block Letter-Latin-Upper-I : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
create-glyph 'I.straight' : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include : df.markSet.capital
include : VBar df.middle 0 CAP
set currentGlyph.autoRefPriority (-2)
create-glyph 'I.line' : glyph-proc
local df : DivFrame para.diversityII
set-width df.width
include : df.markSet.capital
include : VBar df.middle 0 CAP
set currentGlyph.autoRefPriority (-2)
define [ISerifShape top] : glyph-proc
local df : DivFrame para.diversityI
include : VBar df.middle 0 top
include : CenterBottomSerif df.middle 0 (LongJut * df.div)
include : CenterTopSerif df.middle top (LongJut * df.div)
create-glyph 'I.serifed' : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include : df.markSet.capital
include : ISerifShape CAP
select-variant 'I' 'I'
alias 'grek/Iota' 0x399 'I'
alias 'cyrl/UkrainianI' 0x406 'I'
alias 'cyrl/Palochka' 0x4C0 'I'
create-glyph 'smcpI' 0x26A : glyph-proc
local df : DivFrame para.diversityI
include : df.markSet.e
set-width df.width
include : ISerifShape XH
glyph-block-import Letter-Blackboard : BBS BBD BBBarCenter
create-glyph 'mathbb/I' 0x1D540 : glyph-proc
include : MarkSet.capital
include : BBBarCenter Middle 0 CAP
include : HBarTop (Middle - BBD / 2 - Jut) (Middle + BBD / 2 + Jut) CAP BBS
include : HBarBottom (Middle - BBD / 2 - Jut) (Middle + BBD / 2 + Jut) 0 BBS
glyph-block Letter-Latin-Lower-I : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared : CreateDottedComposition
glyph-block-export IotaShape TailedIShape
### dotless i, i and iota
define [IotaShape top] : glyph-proc
local df : DivFrame para.diversityI
local middle df.middle
set-base-anchor 'above' middle top
include : tagged 'serifLT' : LeftwardTopSerif middle top (LongJut * df.div)
include : dispiro
widths.center
flat middle top [heading Downward]
curl middle Hook
arcvh
flat (middle + Hook - HalfStroke) HalfStroke
curl (middle + [Math.max HookX (LongJut * 1.05 * df.div)]) HalfStroke [heading Rightward]
create-glyph 'grek/iota' 0x3B9 : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include : df.markSet.e
include : IotaShape XH
alias 'latiniota' 0x269 'grek/iota'
create-glyph 'latinIota' 0x196 : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include : df.markSet.capital
include : IotaShape CAP
create-glyph 'dotlessi.straight' : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include : df.markSet.e
include : VBar (df.middle) 0 XH
set currentGlyph.autoRefPriority (-2)
create-glyph 'dotlessi.hooky' : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include : df.markSet.e
local balance : IBalance2 * df.div * df.div
include : VBar (df.middle + balance) 0 XH
include : LeftwardTopSerif (df.middle + balance) XH (LongJut * df.div)
create-glyph 'dotlessi.zshaped' : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include : df.markSet.e
include : VBar (df.middle) 0 XH
include : LeftwardTopSerif (df.middle) XH (LongJut * df.div)
include : RightwardBottomSerif df.middle 0 (LongJut * df.div)
create-glyph 'dotlessi.line' : glyph-proc
local df : DivFrame para.diversityII
set-width df.width
include : df.markSet.e
include : VBar (df.middle) 0 XH
create-glyph 'dotlessi.serifed' : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include : df.markSet.e
local balance : IBalance * df.div * df.div
include : VBar (df.middle + balance) 0 XH
include : LeftwardTopSerif (df.middle + balance) XH (LongJut * df.div - balance)
include : RightwardBottomSerif df.middle 0 (LongJut * df.div)
include : LeftwardBottomSerif df.middle 0 (LongJut * df.div)
create-glyph 'dotlessi.serifedAsymmetric' : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include : df.markSet.e
local balance : IBalance * df.div * df.div
include : VBar (df.middle + balance) 0 XH
include : LeftwardTopSerif (df.middle + balance) XH
mix Jut ((LongJut * df.div) - balance) 0.5
include : RightwardBottomSerif df.middle 0 (LongJut * df.div)
include : LeftwardBottomSerif df.middle 0 (LongJut * df.div)
create-glyph 'dotlessi.italic' : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include : df.markSet.e
if para.isItalic
: then : begin
local shift : (1 - df.div) * 0.2
local left : [mix SB df.rightSB ([StrokeWidthBlend 0.42 0.46] - shift)] - HalfStroke * HVContrast
local right : mix SB df.rightSB (1.1 - shift)
local rightTerm : Math.max right (left + HookX + Stroke)
local middle : mix left right (0.55 * df.div)
include : dispiro
widths.lhs
flat left XH [heading Downward]
curl left (SmallSmoothB * 0.8)
hookend O
g4 rightTerm (Hook * [StrokeWidthBlend 0.85 1] * df.div)
include : dispiro
flat (left - (LongJut * df.div) + HalfStroke * HVContrast) XH [widths 0 Stroke]
curl left XH
set-base-anchor 'above' (left + HalfStroke * HVContrast + [StrokeWidthBlend 0.25 0] * TanSlope * df.width) XH
set-base-anchor 'below' middle 0
: else : begin
include : IotaShape XH
define [TailedIShape] : params [df top [xMiddle (df.middle - LBalance2)] [setMarks true] [hookScale 1]] : glyph-proc
local x0 : mix HalfStroke (HalfStroke + (Hook - Stroke + 1) * 0.85 * df.div + LBalance2) hookScale
local x1 : mix HalfStroke ([Math.max (Hook - HalfStroke + 1) (LongJut * df.div)] + LBalance2) hookScale
include : dispiro
widths.center
flat xMiddle top [heading Downward]
curl xMiddle [mix Stroke Hook hookScale]
arcvh
g4.right.mid (xMiddle + x0) (HalfStroke + O) [heading Rightward]
g4 (xMiddle + x1) (HalfStroke + (1 - 2 * hookScale) * O) [heading Rightward]
if setMarks : begin
set-base-anchor 'above' xMiddle top
set-base-anchor 'below' xMiddle 0
set-base-anchor 'overlay' xMiddle (top * OverlayPos)
set-base-anchor 'topright' (xMiddle + RightSB - Middle) top
create-glyph 'dotlessi.tailed' : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include : df.markSet.e
include : TailedIShape df XH
create-glyph 'dotlessi.hookybottom' : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include : df.markSet.e
include : VBar (df.middle) 0 XH
include : RightwardBottomSerif df.middle 0 (LongJut * df.div)
select-variant 'dotlessi' 0x131
create-glyph 'iogonek.dotless' : glyph-proc
include [refer-glyph 'dotlessi'] AS_BASE
include : refer-glyph "ogonekBelow"
CreateDottedComposition 'dotlessi' 'i' 'i'
CreateDottedComposition 'dotlessi' 'cyrl/Ukrainiani' 0x456
turned 'turni' 0x1D09 'i' [lambda [] : this.advanceWidth / 2] (XH / 2) [MarkSet.p]
glyph-block-import Letter-Blackboard : BBS BBD BBBarCenter
create-glyph 'mathbb/dotlessi' : glyph-proc
include : MarkSet.e
include : BBBarCenter Middle 0 XH
include : HBarTop (Middle - BBD / 2 - Jut) Middle XH BBS
include : HBarBottom (Middle - BBD / 2 - Jut) (Middle + BBD / 2 + Jut) 0 BBS
create-glyph 'mathbb/i' 0x1D55A : glyph-proc
include [refer-glyph 'mathbb/dotlessi'] AS_BASE ALSO_METRICS
include [refer-glyph 'mathbb/dotAbove']
Dotless.set currentGlyph 'mathbb/dotlessi'
glyph-block Letter-Latin-Upper-J : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Blackboard : BBS BBD
create-glyph 'J.serifless' : glyph-proc
set-width Width
include : MarkSet.capital
set-base-anchor 'above' (RightSB - Stroke * HVContrast * 0.75 - JBalance2) CAP
set-base-anchor 'overlay' (RightSB - Stroke * HVContrast * 0.75 - JBalance2) (CAP * OverlayPos)
local sw : Math.min (0.4 * (RightSB - JBalance2 - SB)) Stroke
local hookx (0.75 * SB)
include : dispiro
widths.rhs sw
flat (RightSB - JBalance2) CAP [heading Downward]
curl (RightSB - JBalance2) SmoothB
hookend O
g4 hookx Hook
create-glyph 'J.shorthook' : glyph-proc
set-width Width
include : MarkSet.capital
local slope (Stroke * 0.00092)
local expand 0.35
local coexpand ((1 - expand) / 2)
local smooth : Hook + 0.75 * Stroke
local hookx (0.5 * SB)
include : dispiro
widths.rhs
flat (RightSB - JBalance2) CAP [heading Downward]
curl (RightSB - JBalance2) smooth
straight.left.end [mix SB RightSB 0.3] O [heading Leftward]
create-glyph 'J.serifed' : glyph-proc
include [refer-glyph 'J.serifless'] AS_BASE ALSO_METRICS
include : LeftwardTopSerif (RightSB - HalfStroke * HVContrast - JBalance2) CAP LongJut
create-glyph 'J.serifedBothSides' : glyph-proc
include [refer-glyph 'J.serifed'] AS_BASE ALSO_METRICS
include : RightwardTopSerif (RightSB - HalfStroke * HVContrast - JBalance2) CAP Jut
create-glyph 'J.serifedSymmetric' : glyph-proc
include [refer-glyph 'J.serifless'] AS_BASE ALSO_METRICS
include : CenterTopSerif (RightSB - HalfStroke * HVContrast - JBalance2 + O) CAP (Jut + JBalance2)
select-variant 'J' 'J'
alias 'cyrl/Je' 0x408 'J'
alias 'grek/Yot' 0x37F 'J'
create-glyph 'mathbb/J' 0x1D541 : glyph-proc
local hookx (0.75 * SB)
include : MarkSet.capital
set-base-anchor 'above' (RightSB - BBD * HVContrast * 0.75 - JBalance2) CAP
set-base-anchor 'overlay' (RightSB - BBD * HVContrast * 0.75 - JBalance2) (CAP * OverlayPos)
include : dispiro
widths.rhs BBS
flat (RightSB - JBalance2) CAP [heading Downward]
curl (RightSB - JBalance2) SmoothB
hookend O
g4 hookx Hook
include : HBarTop (RightSB - JBalance2 - BBD) (RightSB - JBalance2) CAP BBS
include : intersection
VBarRight (RightSB - JBalance2 - BBD) 0 CAP BBS
spiro-outline
corner (RightSB - JBalance2 - 1) CAP [heading Downward]
curl (RightSB - JBalance2 - 1) SmoothB
hookend (1 + O)
g4 (hookx + 1) Hook
corner (hookx + 1) CAP
glyph-block Letter-Latin-Lower-J : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared : CreateDottedComposition
glyph-block-import Letter-Shared-Shapes : CurlyTail
glyph-block-import Letter-Blackboard : BBS BBD
### j and dotless j
create-glyph 'dotlessj.straight' : glyph-proc
include : MarkSet.p
local center : Middle + JBalance + HalfStroke * HVContrast
set-base-anchor 'above' (center - HVContrast * HalfStroke) XH
set-base-anchor 'overlay' (center - HVContrast * HalfStroke) (XH / 2)
local hookx : center - (Width * 0.5) - Stroke * HVContrast + OXHook
local turn : [mix center hookx 0.5] + CorrectionOMidS
include : dispiro
widths.rhs
flat center XH [heading Downward]
curl center (Descender + SmoothA)
hookend (Descender + O)
g4 hookx (Descender + JHook)
create-glyph 'mathbb/dotlessj' : glyph-proc
include : MarkSet.p
local center : Middle + JBalance + BBD / 2
set-base-anchor 'above' (center - HVContrast * BBS / 2 - BBD / 2) XH
set-base-anchor 'overlay' (center - HVContrast * BBS / 2 - BBD / 2) (XH / 2)
local hookx : center - (Width * 0.5) - BBD * HVContrast + OXHook
local turn : [mix center hookx 0.5] + CorrectionOMidS
include : dispiro
widths.rhs BBS
flat center XH [heading Downward]
curl center (Descender + SmoothA)
hookend (Descender + O)
g4 hookx (Descender + JHook)
include : HBarTop (center - BBD) center XH BBS
include : intersection
VBarRight (center - BBD) Descender XH BBS
spiro-outline
corner center XH [heading Downward]
curl center (Descender + SmoothA)
hookend (Descender + O)
g4 hookx (Descender + JHook)
corner hookx XH
create-glyph 'mathbb/j' 0x1D55B : glyph-proc
include [refer-glyph 'mathbb/dotlessj'] AS_BASE ALSO_METRICS
include [refer-glyph 'mathbb/dotAbove']
Dotless.set currentGlyph 'mathbb/dotlessj'
create-glyph 'dotlessj.line' : glyph-proc
include : MarkSet.p
include : VBar Middle Descender XH
create-glyph 'dotlessj.serifed' : glyph-proc
include : MarkSet.p
include [refer-glyph 'dotlessj.straight'] AS_BASE
include : LeftwardTopSerif (Middle + JBalance) XH LongJut
set-base-anchor 'above' (Middle + JBalance - Stroke * 0.166 * HVContrast) XH
set-base-anchor 'overlay' (Middle + JBalance - Stroke * 0.166 * HVContrast) (XH / 2)
define [FlatHookDotlessJShape] : params [df crossLeft crossRight barCenter serif] : glyph-proc
local terminal : crossLeft - OX * 2
local bar : barCenter + HalfStroke * HVContrast
local tTurn : Math.max (Hook * 0.9) (Stroke * 1.5) : Math.min Hook (Stroke * 1.75)
if serif : include : LeftwardTopSerif barCenter XH (LongJut * df.div)
include : dispiro
widths.lhs
flat [Math.min terminal (bar - tTurn - [Math.max (Stroke / 3) (df.width / 6)])] Descender
curl (bar - tTurn) Descender
archv
flat bar (Descender + tTurn)
curl bar XH [heading Upward]
set-base-anchor 'above' barCenter XH
set-base-anchor 'overlay' barCenter (XH / 2)
create-glyph 'dotlessj.flatHookSerifed' : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include : df.markSet.p
include : FlatHookDotlessJShape df
crossLeft -- df.leftSB
crossRight -- df.rightSB
barCenter -- [df.middle + JBalance * df.div]
serif -- true
create-glyph 'dotlessj.flatHookSerifless' : glyph-proc
local df : DivFrame para.diversityII
set-width df.width
include : df.markSet.p
include : FlatHookDotlessJShape df
crossLeft -- df.leftSB
crossRight -- df.rightSB
barCenter -- [df.middle + 0.5 * JBalance * df.div]
create-glyph 'dotlessj.narrow' : glyph-proc
local df : DivFrame para.diversityII
set-width df.width
include : df.markSet.p
include : FlatHookDotlessJShape df
crossLeft -- [mix 0 SB (1 / 2)]
crossRight -- [mix df.width df.rightSB (1 / 2)]
barCenter -- df.middle
serif -- false
create-glyph 'dotlessj.narrowSerifed' : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include : df.markSet.p
include : FlatHookDotlessJShape df
crossLeft -- [mix 0 SB (1 / 2)]
crossRight -- [mix df.width df.rightSB (1 / 2)]
barCenter -- [df.middle + JBalance * df.div]
serif -- true
select-variant 'dotlessj' 0x237
CreateDottedComposition 'dotlessj' 'j' 'j'
CreateDottedComposition 'dotlessj' 'grek/yot' 0x3F3
CreateDottedComposition 'dotlessj' 'cyrl/je' 0x458
create-glyph 'dotlessjCurlyTail' : glyph-proc
include : MarkSet.p
set-base-anchor 'above' (Middle + JBalance) XH
local fine : adviceBlackness 3.5
local rinner : LongJut / 2 - fine / 2
local m1 : Middle - HalfStroke * HVContrast + JBalance
local x2 : mix RightSB m1 0.25
local y2 : Descender + O
include : LeftwardTopSerif (Middle + JBalance) XH LongJut
include : dispiro
widths.lhs
flat m1 XH [heading Downward]
curl m1 (Descender + fine + rinner * 2)
CurlyTail fine rinner m1 Descender (m1 - LongJut) x2 y2
create-glyph 'jcurlytail' 0x29D : glyph-proc
include [refer-glyph 'dotlessjCurlyTail'] AS_BASE ALSO_METRICS
include : refer-glyph "dotAbove"
if [not currentGlyph.related] : set currentGlyph.related {.}
set currentGlyph.related.dotless 'dotlessjCurlyTail'
glyph-block Letter-Latin-Upper-L : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Marks : markMiddle aboveMarkBot aboveMarkTop
glyph-block-import Letter-Blackboard : BBS BBD
define LBarLeftX : SB * 1.5
define [LShape top] : glyph-proc
include : VBarLeft LBarLeftX 0 top
include : HBarBottom (LBarLeftX - O) (RightSB - OX) 0
if SLAB : begin
include : LeftwardBottomSerif (LBarLeftX) 0 SideJut
include : LeftwardTopSerif (LBarLeftX + HVContrast * HalfStroke) top Jut
include : RightwardTopSerif (LBarLeftX + HVContrast * HalfStroke) top MidJutSide
include : UpwardRightSerif (RightSB - OX) 0 VJut
create-glyph 'L' 'L' : glyph-proc
set-width Width
include : MarkSet.capital
include : LShape CAP
create-glyph 'mathbb/L' 0x1D543 : glyph-proc
include : MarkSet.capital
include : VBarLeft LBarLeftX 0 CAP BBS
include : HBarBottom (LBarLeftX - O) (RightSB - OX) 0 BBS
include : VBarLeft (LBarLeftX + BBD) 0 CAP BBS
include : HBarTop LBarLeftX (LBarLeftX + BBD) CAP BBS
turned 'turnL' 0xA780 'L' Middle (CAP / 2)
create-glyph 'Lcaron' 0x13D : glyph-proc
include : refer-glyph "commaAbove"
include : Translate (Width + (RightSB - SB) * 0.375) 0
include [refer-glyph 'L'] AS_BASE
create-glyph 'Lslash' 0x141 : glyph-proc
include [refer-glyph 'L'] AS_BASE ALSO_METRICS
local fine : 0.5 * OverlayStroke
local middle : mix Stroke CAP 0.5
include : dispiro
flat [mix 0 SB 0.5] (middle - LongJut * 0.4) [widths fine fine]
curl (1.6 * LongJut + [mix 0 SB 0.5]) (middle + LongJut * 0.4)
create-glyph 'LTildeOver' 0x2C62 : glyph-proc
include [refer-glyph 'L'] AS_BASE ALSO_METRICS
include : new-glyph : glyph-proc
include : refer-glyph "tildeAboveOverlay"
include : Upright
include : Translate (SB * 1.5 + Stroke * HVContrast / 2 - markMiddle) (CAP * 0.525 - [mix aboveMarkBot aboveMarkTop 0.5])
include : Italify
create-glyph 'Ldot' 0x13F : glyph-proc
include [refer-glyph 'L'] AS_BASE
include : Ring ([mix Stroke CAP 0.5] + DotRadius) ([mix Stroke CAP 0.5] - DotRadius) ([mix SB RightSB 0.65] - DotRadius) ([mix SB RightSB 0.65] + DotRadius)
create-glyph 'Lbar' 0x23D : glyph-proc
include [refer-glyph 'L'] AS_BASE
include : HOverlayBar (SB * 0.3) [mix (SB + Stroke) (RightSB - Stroke) 0.55] (CAP * OverlayPos)
create-glyph 'smcpL' 0x29F : glyph-proc
include : MarkSet.e
include : LShape XH
glyph-block Letter-Latin-Lower-L : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Marks : markMiddle aboveMarkBot aboveMarkTop
glyph-block-import Letter-Latin-Lower-I : IotaShape TailedIShape
glyph-block-import Letter-Shared : CreateCommaCaronComposition
glyph-block-import Letter-Shared-Shapes : CurlyTail
create-glyph 'l.hooky' : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include : df.markSet.b
local balance : LBalance2 * df.div * df.div
local middle : df.middle + balance
set-base-anchor 'above' middle CAP
set-base-anchor 'below' middle 0
set-base-anchor 'overlay' middle (CAP * OverlayPos)
set-base-anchor 'topright' (df.middle + RightSB - Middle) CAP
include : VBar (df.middle + balance) 0 (CAP - Stroke)
include : LeftwardTopSerif (df.middle + balance) CAP (LongJut * df.div)
create-glyph 'l.zshaped' : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include : df.markSet.b
include : VBar (df.middle) 0 (CAP - Stroke)
include : tagged 'serifLT' : LeftwardTopSerif (df.middle) CAP (LongJut * df.div)
include : tagged 'serifRB' : RightwardBottomSerif (df.middle) 0 (LongJut * df.div)
set-base-anchor 'topright' (df.middle + RightSB - Middle) CAP
create-glyph 'l.line' : glyph-proc
local df : DivFrame para.diversityII
set-width df.width
include : df.markSet.b
include : VBar (df.middle) 0 (CAP * 0.6)
include : VBar (df.middle) (CAP * 0.4) CAP
set-base-anchor 'topright' (df.middle + RightSB - Middle) CAP
set currentGlyph.autoRefPriority (-2)
create-glyph 'l.serifed' : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include : df.markSet.b
local balance : LBalance * df.div * df.div
include : VBar (df.middle + balance) 0 CAP
include : LeftwardTopSerif (df.middle + balance) CAP ((LongJut * df.div) - balance)
include : CenterBottomSerif df.middle 0 (LongJut * df.div)
set-base-anchor 'overlay' (df.middle + balance / 2) (CAP * OverlayPos)
set-base-anchor 'topright' (df.middle + RightSB - Middle) CAP
create-glyph 'l.serifedAsymmetric' : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include : df.markSet.b
local balance : LBalance * df.div * df.div
include : VBar (df.middle + balance) 0 CAP
include : LeftwardTopSerif (df.middle + balance) CAP
mix Jut ((LongJut * df.div) - balance) 0.5
include : CenterBottomSerif df.middle 0 (LongJut * df.div)
set-base-anchor 'overlay' (df.middle + balance / 2) (CAP * OverlayPos)
set-base-anchor 'topright' (df.middle + RightSB - Middle) CAP
create-glyph 'l.italic' : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include : df.markSet.b
if para.isItalic
: then : begin
local shift : (1 - df.div) * 0.4
local left : mix SB df.rightSB (0.3 - shift)
local right : mix SB df.rightSB (1.1 - shift)
local rightTerm : Math.max right (left + HookX + Stroke)
local middle : mix left right (0.54 * df.div)
include : dispiro
widths.lhs
flat left CAP [heading Downward]
curl left (SmallSmoothB * 0.85)
hookend O
g4 rightTerm (Hook * [StrokeWidthBlend 0.85 1] * df.div)
include : tagged 'serifLT': dispiro
flat (left - (LongJut * df.div) + HalfStroke * HVContrast) CAP [widths 0 Stroke]
curl left CAP
set-base-anchor 'above' (left + HalfStroke) CAP
set-base-anchor 'below' middle 0
set-base-anchor 'overlay' (left + HalfStroke) (CAP * OverlayPos)
set-base-anchor 'topright' (left + HalfStroke + RightSB - Middle) CAP
: else : begin
include : IotaShape CAP
set-base-anchor 'topright' (df.middle + RightSB - Middle) CAP
create-glyph 'l.phoneticLeft' : glyph-proc
local df : DivFrame 1
set-width df.width
include : df.markSet.b
define middle : SB + Stroke * HVContrast
include : dispiro
widths.center
flat middle CAP [heading Downward]
curl middle Hook
arcvh
flat (middle + Hook - HalfStroke) HalfStroke
curl [Math.max RightSB (middle + [Math.max HookX (LongJut * 1.05 * df.div)])] HalfStroke [heading Rightward]
set-base-anchor 'topright' (df.middle + RightSB - Middle) CAP
create-glyph 'l.tailed' : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include : df.markSet.b
include : TailedIShape df CAP
create-glyph 'l.hookybottom' : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include : df.markSet.b
local middle : df.middle - LBalance2
set-base-anchor 'above' middle CAP
set-base-anchor 'below' middle 0
set-base-anchor 'overlay' middle (CAP * OverlayPos)
set-base-anchor 'topright' (middle + RightSB - Middle) CAP
include : VBar middle 0 CAP
include : RightwardBottomSerif middle 0 (LongJut * df.div)
select-variant 'l' 'l'
alias 'cyrl/palochka' 0x4CF 'l'
turned 'turnl' 0xA781 'l' Middle (XH / 2) [MarkSet.p]
glyph-block-import Letter-Blackboard : BBS BBD BBBarCenter
create-glyph 'mathbb/l' 0x1D55D : glyph-proc
include : MarkSet.b
include : BBBarCenter Middle 0 CAP
include : HBarTop (Middle - BBD / 2 - Jut) Middle CAP BBS
include : HBarBottom (Middle - BBD / 2 - Jut) (Middle + BBD / 2 + Jut) 0 BBS
CreateCommaCaronComposition 'l' 'lcaron' 0x13E
with-related-glyphs 'l' 'lSlash' 0x142 : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
local anchor currentGlyph.baseAnchors.overlay
local stretch : Math.sqrt (currentGlyph.advanceWidth / UPM * 2)
include : FlatSlashShape anchor.x anchor.y (0.5 * OverlayStroke) (0.8 * stretch) (0.4 * stretch)
local LDotOptions : list
list 'hooky' 0
list 'zshaped' Stroke
list 'serifed' Stroke
list 'italic' Stroke
list 'line' 0
list 'tailed' Stroke
list 'hookybottom' Stroke
list 'serifedAsymmetric' Stroke
foreach {suffix y0} [items-of LDotOptions] : if [query-glyph ('l.' + suffix)]
create-glyph ('ldot.' + suffix) : glyph-proc
local df : DivFrame para.diversityI
set-width df.width
include [refer-glyph ('l.' + suffix)] AS_BASE
include : Translate (df.width / 2 - [query-glyph ('l.' + suffix)].advanceWidth / 2) 0
include : Translate (-DotRadius / 2) 0
include : RingAt [Math.max (df.middle + HalfStroke + DotRadius) (df.rightSB - DotRadius)] [mix y0 CAP 0.5] DotRadius
select-variant 'ldot' 0x140 (follow -- 'l')
create-glyph 'lrtail' 0x26D : glyph-proc
local df : DivFrame para.diversityI
include : refer-glyph "rtailBR"
include : Translate (df.middle + LBalance2 + HalfStroke * HVContrast) 0
include : refer-glyph "l.hooky"
include : df.markSet.if
create-glyph 'lcurlytail' 0x234 : glyph-proc
include : MarkSet.b
local fine : adviceBlackness 3.5
local rinner : LongJut / 2 - fine / 2
local m1 : Middle + HalfStroke * HVContrast
local x2 : mix SB m1 0.25
local y2 : - fine
include : LeftwardTopSerif Middle CAP LongJut
include : dispiro
widths.rhs
flat m1 CAP [heading Downward]
curl m1 (fine + rinner * 2)
CurlyTail fine rinner m1 0 (m1 + LongJut) x2 y2
create-glyph 'ltildeover' 0x26B : glyph-proc
local df : DivFrame para.diversityI
include [refer-glyph 'l.serifed'] AS_BASE ALSO_METRICS
include : new-glyph : glyph-proc
include : refer-glyph "tildeAboveOverlay"
include : Upright
include : Translate (df.middle - markMiddle) (CAP * 0.525 - [mix aboveMarkBot aboveMarkTop 0.5])
include : Italify
define [Belt middle] : glyph-proc
local fine : adviceBlackness 4.5
local r : XH * 0.05
include : dispiro
widths.rhs fine
flat middle (CapMiddle + r) [heading Leftward]
curl (middle - HalfStroke - r * 1.5) (CapMiddle + r)
archv
g4.down.mid (middle - HalfStroke - r * 2.5) CapMiddle [heading Downward]
arcvh
flat (middle - HalfStroke - r * 1.5) (CapMiddle - r)
curl (middle + HalfStroke + r * 1.5 + fine) (CapMiddle - r)
create-glyph 'lbelt' 0x26C : glyph-proc
local df : DivFrame para.diversityI
include [refer-glyph 'l.serifed'] AS_BASE ALSO_METRICS
include : Belt (df.middle + LBalance * df.div * df.div)
create-glyph 'lbeltrtail' 0xA78E : glyph-proc
local df : DivFrame para.diversityI
include [refer-glyph 'lrtail'] AS_BASE ALSO_METRICS
include : Belt (df.middle + LBalance2 * df.div * df.div)
create-glyph 'looprevesh' 0x1AA : glyph-proc
include : MarkSet.if
local fine : adviceBlackness 4
include : dispiro
widths.center fine
g4.down.start Middle (CAP - fine * 1.5) [heading Downward]
arcvh
g4 (Middle - fine * 1) (CAP - fine * 2.5) [heading Leftward]
archv
g4 (Middle - fine * 2) (CAP - fine * 1.5) [heading Upward]
arcvh
g4 (Middle - fine * 1) (CAP - fine * 0.5) [heading Rightward]
archv
flat Middle (CAP - fine * 1.5) [widths.heading HalfStroke HalfStroke Downward]
curl Middle 0 [heading Downward]
arcvh
straight.right.end (Middle + HookX) (-Hook)
glyph-block Letter-Latin-V : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-export VShape VShapeOutline
glyph-block-import Letter-Blackboard : BBS BBD
define VCornerHalfWidth : HalfStroke * HVContrast * 1.15
define VCurviness 0.3
define VShapeFine : Math.max
Stroke * [if SLAB para.vtipfineSlab para.vtipfine]
VCornerHalfWidth * 1.2
define VShapeFineStraight : Stroke * CThin * 1.15
define pInktrap : 2 / 3
define VShapeMiddleWidth : Math.min [mix Stroke VShapeFineStraight pInktrap] [adviceBlackness 3]
define StraightSbShrink : mix 1 (designParameters.straightVShapeSbShrink * [StrokeWidthBlend 1 0.75]) : if SLAB 0.75 1
define [VShapeTopFlat top] : if SLAB [Math.min (top - Stroke) (top * 0.9)] (top * 0.9)
define [VShapeOutline] : params [df top [sw Stroke] barStraight] : glyph-proc
local fine : [if barStraight VShapeFineStraight VShapeFine] * sw / Stroke
local dgCor : DiagCor top (Width / 2) 0 (sw * 2)
local clearance : 0 - OX
if barStraight : begin
local vxStartL : df.leftSB * StraightSbShrink + clearance
local vxEndL : df.middle - VCornerHalfWidth + clearance
local vxStartR : df.width - df.leftSB * StraightSbShrink - clearance
local vxEndR : df.middle + VCornerHalfWidth - clearance
include : spiro-outline
flat [mix vxStartL vxEndL 0] [mix top 0 0]
curl [mix vxStartL vxEndL pInktrap] [mix top 0 pInktrap]
corner [mix vxStartL vxEndL 1] [mix top 0 1]
corner [mix vxStartR vxEndR 1] [mix top 0 1]
flat [mix vxStartR vxEndR pInktrap] [mix top 0 pInktrap]
curl [mix vxStartR vxEndR 0] [mix top 0 0]
: else : begin
local vxStartL : df.leftSB + clearance
local vxEndL : df.middle - VCornerHalfWidth + clearance
local vxStartR : df.width - df.leftSB - clearance
local vxEndR : df.middle + VCornerHalfWidth - clearance
include : spiro-outline
flat vxStartL top
curl vxStartL [VShapeTopFlat top]
quadcontrols 0 VCurviness 9 unimportant
corner vxEndL 0
corner vxEndR 0
quadcontrols 1 (1 - VCurviness) 9 unimportant
flat vxStartR [VShapeTopFlat top]
curl vxStartR top
define [VBottomCapShape df barStraight sw] : spiro-outline
corner (df.middle + VCornerHalfWidth) 0
corner (df.middle - VCornerHalfWidth) 0
corner df.middle [Math.min sw : if barStraight VShapeFineStraight VShapeFine]
define [VShape] : params [df top [sw Stroke] barStraight [slab SLAB]] : glyph-proc
local fine : Math.min sw : if barStraight VShapeFineStraight VShapeFine
local dgCor : DiagCor (2 * top) Width 0 (2 * sw)
if barStraight : begin
local vxStartL : df.leftSB * StraightSbShrink
local vxEndL : df.middle - VCornerHalfWidth
local vxStartR : df.width - df.leftSB * StraightSbShrink
local vxEndR : df.middle + VCornerHalfWidth
local midSW : dgCor * VShapeMiddleWidth / Stroke * sw
include : tagged 'strokeDown' : dispiro
widths.lhs (sw * dgCor)
flat [mix vxStartL vxEndL 0] [mix top 0 0] [heading Downward]
curl [mix vxStartL vxEndL pInktrap] [mix top 0 pInktrap] [widths.lhs.heading midSW Downward]
g4 [mix vxStartL vxEndL 1] [mix top 0 1] [widths.lhs.heading fine Downward]
include : tagged 'strokeUp' : dispiro
widths.rhs (sw * dgCor)
flat [mix vxStartR vxEndR 0] [mix top 0 0] [heading Downward]
curl [mix vxStartR vxEndR pInktrap] [mix top 0 pInktrap] [widths.rhs.heading midSW Downward]
g4 [mix vxStartR vxEndR 1] [mix top 0 1] [widths.rhs.heading fine Downward]
: else : begin
include : tagged 'strokeDown' : dispiro
widths.lhs sw
flat df.leftSB top [heading Downward]
curl df.leftSB [VShapeTopFlat top] [heading Downward]
quadcontrols 0 VCurviness 9 unimportant
g4 (df.middle - VCornerHalfWidth) 0 [widths.lhs fine]
include : tagged 'strokeUp' : dispiro
widths.rhs sw
flat df.rightSB top [heading Downward]
curl df.rightSB [VShapeTopFlat top] [heading Downward]
quadcontrols 0 VCurviness 9 unimportant
g4 (df.middle + VCornerHalfWidth) 0 [widths.rhs fine]
#bottom cap
include : VBottomCapShape df barStraight sw
if slab : include : AIVSerifs top
create-glyph : glyph-proc
set-width Width
include : MarkSet.capital
create-derived 'V.straight' : VShape [DivFrame 1] CAP Stroke true
create-derived 'V.curly' : VShape [DivFrame 1] CAP Stroke false
create-glyph : glyph-proc
include : MarkSet.e
create-derived 'v.straight' : VShape [DivFrame 1] XH Stroke true
create-derived 'v.curly' : VShape [DivFrame 1] XH Stroke false
define [VHooktopShape df barStraight top] : glyph-proc
include : VShape df top Stroke barStraight
eject-contour 'serifRT'
eject-contour 'strokeUp'
include : VBottomCapShape df barStraight Stroke
include : dispiro
widths.rhs
straight.left.start (RightSB + HookX / 3) (top - Stroke)
g4 (RightSB - HookX / 3) (top - HalfStroke - Hook)
quadcontrols 0.4 0.75 64 unimportant
g4 (Middle + VCornerHalfWidth) 0 [widths.rhs VShapeFine]
create-glyph : glyph-proc
include : MarkSet.e
create-derived 'vhooktop.straight' : VHooktopShape [DivFrame 1] true XH
create-derived 'vhooktop.curly' : VHooktopShape [DivFrame 1] false XH
create-glyph : glyph-proc
include : MarkSet.capital
create-derived 'cyrl/Izhitsa.straight' : VHooktopShape [DivFrame 1] true CAP
create-derived 'cyrl/Izhitsa.curly' : VHooktopShape [DivFrame 1] false CAP
select-variant 'V' 'V'
select-variant 'v' 'v'
select-variant 'vhooktop' 0x2C71 (follow -- 'v')
select-variant 'cyrl/Izhitsa' 0x474 (follow -- 'V')
alias 'cyrl/izhitsa' 0x475 'vhooktop'
turned 'turnv.straight' nothing 'v.straight' Middle (XH / 2)
turned 'turnv.curly' nothing 'v.curly' Middle (XH / 2)
select-variant 'turnv' 0x28C (follow -- 'grek/Lambda')
glyph-block-export BBVShape BBVInnerMaskShape BBVOuterMaskShape
define [BBVShape l r kd ks top] : glyph-proc
local m : mix l r 0.5
local bbd : BBD * kd
local bbs : BBS * ks
local kDiag : DiagCorDs top ((r - l) / 2) (bbd / 2)
include : intersection
Rect top 0 (-Width) (2 * Width)
union
ExtLineCenter 1 bbs l top (m - kDiag * bbd / 2) 0
ExtLineCenter 1 bbs (l + kDiag * bbd) top (m + kDiag * bbd / 2) 0
ExtLineCenter 1 bbs r top (m + kDiag * bbd / 2) 0
include : HBarTop l (l + kDiag * bbd) top bbs
include : HBarBottom (m - kDiag * bbd / 2) (m + kDiag * bbd / 2) 0 bbs
define [BBVInnerMaskShape l r kd ks top] : glyph-proc
local m : mix l r 0.5
local bbd : BBD * kd
local kDiag : DiagCorDs top ((r - l) / 2) (bbd / 2)
include : spiro-outline
corner (l + kDiag * bbd) top
corner r top
corner (m + kDiag * bbd / 2) 0
define [BBVOuterMaskShape l r kd ks top] : glyph-proc
local m : mix l r 0.5
local bbd : BBD * kd
local kDiag : DiagCorDs top ((r - l) / 2) (bbd / 2)
include : spiro-outline
corner l top
corner r top
corner (m + kDiag * bbd / 2) 0
corner (m - kDiag * bbd / 2) 0
create-glyph 'mathbb/V' 0x1D54D : composite-proc [MarkSet.capital] [BBVShape SB RightSB 1 1 CAP]
create-glyph 'mathbb/v' 0x1D567 : composite-proc [MarkSet.e] [BBVShape SB RightSB 1 1 XH]
glyph-block Letter-Latin-Upper-A : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Marks : markHalfStroke
glyph-block-import Letter-Latin-V : VShapeOutline VShape
glyph-block-export LambdaShape AMaskShape DeltaShape
define [AMaskShape df top sw barStraight] : new-glyph : glyph-proc
include : VShapeOutline df top sw barStraight
include : FlipAround ([DivFrame df.div].width / 2) (top / 2)
create-glyph : glyph-proc
set-width Width
include : MarkSet.capital
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
define ABarPosition : mix [if SLAB Stroke 0] CAP (XH / 2 / CAP)
create-derived 'A.straight' : glyph-proc
include : VShape [DivFrame 1] CAP Stroke true
include : FlipAround Middle (CAP / 2)
include : intersection
HBarTop 0 Width ABarPosition
AMaskShape [DivFrame 1] CAP Stroke true
create-derived 'A.curly' : glyph-proc
include : VShape [DivFrame 1] CAP Stroke false
include : FlipAround Middle (CAP / 2)
include : intersection
HBarTop 0 Width ABarPosition
AMaskShape [DivFrame 1] CAP Stroke false
select-variant 'A' 'A'
alias 'grek/Alpha' 0x391 'A'
alias 'cyrl/A' 0x410 'A'
turned 'turnA' 0x2C6F 'A' Middle (CAP / 2)
# Lambda
define [LambdaShape] : params [df top sw barStraight [slab SLAB]] : glyph-proc
include : VShape df top sw barStraight (slab -- false)
include : FlipAround df.middle (top / 2)
if slab : begin
include : tagged 'serif' : CenterBottomSerif (SB + sw / 2 * HVContrast) 0 Jut
include : tagged 'serif' : CenterBottomSerif (RightSB - sw / 2 * HVContrast) 0 Jut
create-glyph 'grek/Lambda.straight' : composite-proc [MarkSet.capital]
LambdaShape [DivFrame 1] CAP Stroke true
create-glyph 'grek/Lambda.curly' : composite-proc [MarkSet.capital]
LambdaShape [DivFrame 1] CAP Stroke false
select-variant 'grek/Lambda' 0x39B
alias 'latinLambda' 0x245 'grek/Lambda'
# Delta
define [DeltaShape df top sw barStraight] : union
LambdaShape df top sw barStraight (slab -- false)
intersection
HBarBottom 0 Width 0 sw
AMaskShape df top sw barStraight
if [not SLAB] [glyph-proc] : difference
union
LeftwardBottomSerif SB 0 SideJut
RightwardBottomSerif RightSB 0 SideJut
AMaskShape df top sw barStraight
create-glyph 'grek/Delta.straight' : composite-proc [MarkSet.capital]
DeltaShape [DivFrame 1] CAP Stroke true
create-glyph 'grek/Delta.curly' : composite-proc [MarkSet.capital]
DeltaShape [DivFrame 1] CAP Stroke false
select-variant 'grek/Delta' 0x394
glyph-block-import Letter-Blackboard : BBS BBD
glyph-block-import Letter-Latin-V : BBVShape BBVInnerMaskShape
create-glyph 'mathbb/A' 0x1D538 : glyph-proc
include : MarkSet.capital
include : union
BBVShape SB RightSB 1 1 CAP
intersection
BBVInnerMaskShape SB RightSB 1 1 CAP
HBarTop 0 Width (CAP - XH / 2) BBS
include : FlipAround Middle (CAP / 2)
glyph-block Letter-Latin-Lower-A : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Marks : markHalfStroke
glyph-block-import Letter-Shared-Shapes : RightwardTailedBar DToothlessRise DMBlend
define ADoubleStoreyStroke : adviceBlackness2 2 3 XH
define ADoubleStoreySmoothA : SmoothAOf (Smooth * [StrokeWidthBlend 0.9 0.81 ADoubleStoreyStroke]) Width
define ADoubleStoreySmoothB : SmoothBOf (Smooth * [StrokeWidthBlend 0.9 0.81 ADoubleStoreyStroke]) Width
define [ADoubleStoreyHookAndBarT sink y0 stroke] : glyph-proc
local isMask : sink == spiro-outline
include : sink
widths.lhs stroke
[if isMask corner flat] RightSB y0 [heading Upward]
curl RightSB (XH - ADoubleStoreySmoothB)
hookend (XH - O)
g4 SB (XH - AHook)
if [not isMask] {} {[corner SB y0]}
define [ADoubleStoreyHookAndBar y0 _stroke] : ADoubleStoreyHookAndBarT dispiro y0
fallback _stroke ADoubleStoreyStroke
define [ADoubleStoreyHookAndBarMask y0 _stroke] : ADoubleStoreyHookAndBarT spiro-outline y0
fallback _stroke ADoubleStoreyStroke
define [ADoubleStoreyArcT sink kind rise stroke] : glyph-proc
local isMask : sink == spiro-outline
local bartop (XH * OverlayPos * 1.02 + stroke * 0.425)
local bowlArcY1 : YSmoothMidL 0 bartop SmallSmoothA SmallSmoothB
local bowlArcY2 : YSmoothMidR 0 bartop SmallSmoothA SmallSmoothB
local lowSlope : shoulderMidSlope ShoulderFine nothing (-1)
local leftSlopeS : 0.1 * (Width / HalfUPM)
local leftSlope : leftSlopeS - TanSlope
local lowMiddle : mix (SB + OX) (RightSB - stroke / 2 * HVContrast) [linreg 72 0.51 126 0.58 stroke]
local barSmooth : mix SB RightSB 0.55
include : sink
widths.lhs stroke
[if isMask corner flat] (RightSB + O) bartop [heading Leftward]
curl barSmooth bartop
archv
g4 (SB + OX) (bowlArcY1 - Stroke * HVContrast * leftSlopeS) [heading {.x HVContrast .y leftSlope}]
arcvh
match kind
0 : list
g4 (lowMiddle + (-lowSlope) * stroke + CorrectionOMidX * stroke * 0.5) O [heading {.y 1 .x lowSlope}]
archv 16
straight.up.end (RightSB - stroke * HVContrast + ShoulderFine * HVContrast) (SmallSmoothB * 0.9) [widths.lhs ShoulderFine]
if [not isMask] {} {[ corner (RightSB - stroke * HVContrast + ShoulderFine * HVContrast) bartop ]}
1 : list
g4 (Middle + CorrectionOMidX * stroke) O
g4 RightSB rise
2 : list
g4 (Middle + CorrectionOMidX * stroke) O
archv
flat RightSB bowlArcY2
curl RightSB ([Math.max bowlArcY2 rise] + stroke * TanSlope + 1) [heading Upward]
define [ADoubleStoreyArc kind rise _sw] : ADoubleStoreyArcT dispiro kind rise
fallback _sw ADoubleStoreyStroke
define [ADoubleStoreyArcMask kind rise _sw] : ADoubleStoreyArcT spiro-outline kind rise
fallback _sw ADoubleStoreyStroke
create-glyph 'a.doubleStorey' : glyph-proc
set-width Width
include : MarkSet.e
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
include : union
ADoubleStoreyHookAndBar 0
ADoubleStoreyArc 0
if SLAB : begin
include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
glyph-block-import Letter-Blackboard : BBS BBD
create-glyph 'mathbb/a' 0x1D552 : glyph-proc
include : MarkSet.e
include : ADoubleStoreyHookAndBar 0 BBS
include : intersection
ADoubleStoreyHookAndBarMask 0
VBarRight (RightSB - BBD) 0 XH BBS
include : difference
union
ADoubleStoreyArc 0 0 BBS
intersection
ADoubleStoreyArcMask 0 0 BBS
VBarLeft (SB + OX + BBD) 0 XH BBS
Rect XH 0 (RightSB - BBD) Width
include : HBarBottom (RightSB - BBD) RightSB 0 BBS
create-glyph 'a.doubleStoreyTailed' : glyph-proc
set-width Width
include : MarkSet.e
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
include : union
ADoubleStoreyHookAndBar (XH - ADoubleStoreySmoothB + O)
ADoubleStoreyArc 0
RightwardTailedBar RightSB 0 (XH - ADoubleStoreySmoothB)
create-glyph 'a.doubleStoreyToothlessCorner' : glyph-proc
set-width Width
include : MarkSet.e
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
include : union
ADoubleStoreyHookAndBar (DToothlessRise * OverlayPos)
ADoubleStoreyArc 1 (DToothlessRise * OverlayPos)
create-glyph 'a.doubleStoreyToothlessRounded' : glyph-proc
set-width Width
include : MarkSet.e
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
include : union
ADoubleStoreyHookAndBar ADoubleStoreySmoothA
ADoubleStoreyArc 2 ADoubleStoreySmoothA
create-glyph 'a.singleStorey' : glyph-proc
set-width Width
include : MarkSet.e
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
include : OBarRightShape
if SLAB
: then : begin
include : VBarRight RightSB 0 XH
include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
: else : begin
include : dispiro
widths.rhs
flat RightSB XH [heading Downward]
curl RightSB SmoothA [heading Downward]
g4 [mix SB RightSB (1 + 0.4 * TanSlope)] 0 [heading Downward]
set-base-anchor 'bottomright' [mix SB RightSB 1.075] 0
create-glyph 'a.singleStoreyTailed' : glyph-proc
set-width Width
include : MarkSet.e
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
include : OBarRightShape
include : RightwardTailedBar RightSB 0 XH
create-glyph 'a.singleStoreyEarlessCorner' : glyph-proc
set-width Width
include : MarkSet.e
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
include : OBarLeftToothlessShape XH SB DToothlessRise DMBlend
include : FlipAround Middle (XH / 2)
include : VBarRight RightSB 0 (XH - DToothlessRise)
if SLAB : begin
include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
create-glyph 'a.singleStoreyEarlessCornerTailed' : glyph-proc
set-width Width
include : MarkSet.e
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
include : OBarLeftToothlessShape XH SB DToothlessRise DMBlend
include : FlipAround Middle (XH / 2)
include : RightwardTailedBar RightSB 0 (XH - DToothlessRise)
create-glyph 'a.singleStoreyEarlessRounded' : glyph-proc
set-width Width
include : MarkSet.e
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
include : OBarLeftRoundedShape XH SB XH
include : FlipAround Middle (XH / 2)
if SLAB : begin
include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
create-glyph 'a.singleStoreyEarlessRoundedTailed' : glyph-proc
set-width Width
include : MarkSet.e
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
include : OBarLeftRoundedShape XH SB (SmallSmoothB - O)
include : FlipAround Middle (XH / 2)
include : RightwardTailedBar RightSB 0 (XH - SmallSmoothB)
select-variant 'a' 'a'
alias 'cyrl/a' 0x430 'a'
create-glyph 'largescripta' 0x2C6D : glyph-proc
include : MarkSet.capital
include : union
OBarRightShape CAP
spiro-outline
corner RightSB 0
corner (RightSB - Stroke * HVContrast) 0
corner (RightSB - Stroke * HVContrast) (CAP - Stroke / 2)
corner RightSB (CAP - O)
create-glyph 'scripta' 0x0251 : glyph-proc
include : MarkSet.e
include : union
OBarRightShape
spiro-outline
corner RightSB 0
corner (RightSB - Stroke * HVContrast) 0
corner (RightSB - Stroke * HVContrast) (XH - Stroke / 2)
corner RightSB (XH - O)
if SLAB : include : tagged 'serifRB' RightwardBottomSerif RightSB 0 SideJut
turned 'turnlargescripta' 0x2C70 'largescripta' Middle (CAP / 2)
turned 'turnscripta' 0x252 'scripta' Middle (XH / 2)
create-glyph 'invLatinAlpha' 0xAB64 : glyph-proc
include : MarkSet.e
include : union
OBarRightShape
spiro-outline
corner RightSB XH
corner (RightSB - Stroke * HVContrast) XH
corner (RightSB - Stroke * HVContrast) (Stroke / 2)
corner RightSB O
if SLAB : include : tagged 'serifRT' : RightwardTopSerif RightSB XH SideJut
turned 'turna' 0x250 'a.doubleStorey' Middle (XH / 2)
create-glyph 'artail' 0x1D8F : glyph-proc
include [refer-glyph 'a.doubleStorey'] AS_BASE
eject-contour 'serifRB'
include : refer-glyph "rtailBR"
glyph-block Letter-Latin-W : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
### W and w
define [WShape top barStraight df] : glyph-proc
local fineOuter : if barStraight
adviceBlackness WShape.fineSOuter [Math.sqrt df.div]
adviceBlackness WShape.fineOuter df.div
local fineInner : if barStraight
adviceBlackness WShape.fineSInner [Math.sqrt df.div]
adviceBlackness WShape.fineInner df.div
local fineHeight : (fineOuter + fineInner) / 2
local hwCO : if barStraight
(1 / 2) * [adviceBlackness WShape.hwCOS df.div]
(1 / 2) * [adviceBlackness WShape.hwCO df.div]
local delimBias : hwCO * HVContrast
local fineOffsetOuter : hwCO * HVContrast
local fineOffsetInner : hwCO * HVContrast
local m1 : [mix (df.leftSB + delimBias) (df.rightSB - delimBias) : if barStraight WShape.m1S WShape.m1] + [if barStraight O 0]
local m2 : [mix (df.leftSB + delimBias) (df.rightSB - delimBias) : if barStraight WShape.m2S WShape.m2] - [if barStraight O 0]
local topWithoutSerif : if SLAB (top - Stroke) top
local wMidHeight : match barStraight
2 topWithoutSerif
1 (topWithoutSerif * [Math.min 1 ([Math.pow df.div 1.5] * 0.72)])
0 (top * 0.6)
if barStraight : begin
include : tagged 'strokeDown1' : dispiro
widths.lhs
flat (df.leftSB + O * 2) top [heading Downward]
g4 (m1 - fineOffsetOuter) 0 [widths.lhs fineOuter]
: else : begin
include : tagged 'strokeDown1' : dispiro
widths.lhs
flat df.leftSB top [heading Downward]
curl df.leftSB (top * 0.75) [heading Downward]
quadcontrols 0 0.3 6 unimportant
g4 (m1 - fineOffsetOuter) 0 [widths.lhs fineOuter]
# bottom cap 1
define [InnerShapes] : union
spiro-outline
corner (m1 + fineOffsetInner) 0
corner (m1 - fineOffsetOuter) 0
corner m1 fineHeight
spiro-outline
corner (df.middle + fineOffsetInner) wMidHeight
corner df.middle (wMidHeight - fineHeight)
corner (df.middle - fineOffsetInner) wMidHeight
spiro-outline
corner (m2 + fineOffsetOuter) 0
corner (m2 - fineOffsetInner) 0
corner m2 fineHeight
dispiro
widths.lhs fineInner
flat (df.middle - fineOffsetInner) wMidHeight
curl (m1 + fineOffsetInner) 0 [widths.rhs fineInner]
dispiro
widths.rhs fineInner
flat (df.middle + fineOffsetInner) wMidHeight
curl (m2 - fineOffsetInner) 0 [widths.lhs fineInner]
define [InnerStrokeMask] : union
spiro-outline
corner 0 0
corner df.width 0
corner df.width (-df.width)
corner 0 (-df.width)
spiro-outline
corner 0 wMidHeight
corner df.width wMidHeight
corner df.width (wMidHeight + df.width)
corner 0 (wMidHeight + df.width)
include : difference [InnerShapes] [InnerStrokeMask]
if barStraight : begin
include : tagged 'strokeUp2' : dispiro
widths.rhs
flat (df.rightSB - O * 2) top [heading Downward]
g4 (m2 + fineOffsetOuter) 0 [widths.rhs fineOuter]
: else : begin
include : tagged 'strokeUp2' : dispiro
widths.rhs
flat df.rightSB top [heading Downward]
curl df.rightSB (top * 0.75) [heading Downward]
quadcontrols 0 0.3 6 unimportant
g4 (m2 + fineOffsetOuter) 0 [widths.rhs fineOuter]
include : AIVSerifs top df.leftSB df.rightSB
set WShape.fineOuter 5
set WShape.fineInner 6
set WShape.fineSOuter 5.5
set WShape.fineSInner 5.5
set WShape.hwCO 5
set WShape.hwCOS 3.5
set WShape.m1 0.25
set WShape.m2 : 1 - WShape.m1
set WShape.m1S 0.235
set WShape.m2S : 1 - WShape.m1S
define [WonOverlay df] : glyph-proc
include : HOverlayBar [mix SB 0 0.7] [mix df.rightSB df.width 0.7] (CAP * 0.6)
include : HOverlayBar [mix SB 0 0.7] [mix df.rightSB df.width 0.7] (CAP * 0.35)
create-glyph : glyph-proc
local df : DivFrame para.diversityM 3
set-width df.width
include : df.markSet.capital
create-derived 'W.straightFlatTop' : WShape CAP 2 df
create-derived 'W.straight' : WShape CAP 1 df
create-derived 'W.curly' : WShape CAP 0 df
create-glyph : glyph-proc
local df : DivFrame para.diversityM 3
set-width df.width
include : df.markSet.e
create-derived 'w.straightFlatTop' : WShape XH 2 df
create-derived 'w.straight' : WShape XH 1 df
create-derived 'w.curly' : WShape XH 0 df
define [WHooktopShape top barStraight df] : glyph-proc
local fineOuter : if barStraight
adviceBlackness WShape.fineSOuter [Math.sqrt df.div]
adviceBlackness WShape.fineOuter df.div
local hwCO : if barStraight
(1 / 2) * [adviceBlackness WShape.hwCOS df.div]
(1 / 2) * [adviceBlackness WShape.hwCO df.div]
local delimBias : hwCO * HVContrast
local fineOffsetOuter : hwCO * HVContrast
local fineOffsetInner : hwCO * HVContrast
local m2 : [mix (df.leftSB + delimBias) (df.rightSB - delimBias) : if barStraight WShape.m2S WShape.m2] - [if barStraight O 0]
include : WShape top barStraight df
# Eject unnecessary contours
eject-contour 'strokeUp2'
if SLAB : eject-contour 'serifRT'
include : dispiro
widths.rhs
straight.down.start df.rightSB (top - Hook) [heading Downward]
quadcontrols 0 0.3 6 unimportant
g4 (m2 + fineOffsetOuter) 0 [widths.rhs fineOuter]
include : VerticalHook (df.rightSB - HalfStroke * HVContrast) (top - Hook) (HookX * 0.65) (-Hook + HalfStroke)
create-glyph : glyph-proc
local df : DivFrame para.diversityM 3
set-width df.width
include : df.markSet.capital
create-derived 'Whooktop.straightFlatTop' : WHooktopShape CAP 2 df
create-derived 'Whooktop.straight' : WHooktopShape CAP 1 df
create-derived 'Whooktop.curly' : WHooktopShape CAP 0 df
create-glyph : glyph-proc
local df : DivFrame para.diversityM 3
set-width df.width
include : df.markSet.e
create-derived 'whooktop.straightFlatTop' : WHooktopShape XH 2 df
create-derived 'whooktop.straight' : WHooktopShape XH 1 df
create-derived 'whooktop.curly' : WHooktopShape XH 0 df
define [LowerWWShape df straightBar] : glyph-proc
include : WShape (CAP / 2) straightBar df
include : Upright
include : Translate 0 (CAP / 2)
include : Italify
include : WShape (CAP / 2) straightBar df
create-glyph : glyph-proc
local df : DivFrame 1 3
set-width df.width
include : df.markSet.capital
create-derived 'ww.straightFlatTop' : LowerWWShape df 2
create-derived 'ww.straight' : LowerWWShape df 1
create-derived 'ww.curly' : LowerWWShape df 0
select-variant 'W' 'W'
select-variant 'Whooktop' 0x2C72 (follow -- 'W')
select-variant 'w' 'w'
select-variant 'ww' 0x2AC (follow -- 'w')
select-variant 'whooktop' 0x2C73 (follow -- 'w')
alias 'cyrl/We' 0x51C 'W'
alias 'cyrl/we' 0x51D 'w'
turned 'turnw' 0x28D 'w' (Middle * para.diversityM) (XH / 2)
with-related-glyphs 'W' 'symbols/currency/wonSign' 0x20A9 : lambda [src sel] : glyph-proc
local df : DivFrame para.diversityM 3
include [refer-glyph src] AS_BASE ALSO_METRICS
include [WonOverlay df]
glyph-block-import Letter-Blackboard : BBS BBD
glyph-block-import Letter-Latin-V : BBVShape BBVOuterMaskShape
define [BBWShape top] : begin
local offset : BBD * 2
local ksW : [adviceBlackness2 8 2 top] / BBS
local kdW : Math.min ksW (3 / 4)
return : union
difference
BBVShape SB (RightSB - offset) kdW ksW top
BBVOuterMaskShape (SB + offset) RightSB kdW ksW top
BBVShape (SB + offset) RightSB kdW ksW top
create-glyph 'mathbb/W' 0x1D54E : composite-proc [MarkSet.capital] [BBWShape CAP]
create-glyph 'mathbb/w' 0x1D568 : composite-proc [MarkSet.e] [BBWShape XH]
glyph-block Letter-Latin-X : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-export HalfXStrand XStrand
define [HalfXStrand stb slab _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 leftx : _leftx + ((HalfStroke * HVContrast + sbCor) * [if (rightx > _leftx) 1 (-1)])
local fine : (_fine || Stroke) * 0.5
if stb : begin
local hst : HalfStroke * [DiagCor (righty - lefty) (rightx - leftx) 0 0]
local hse : HalfStroke * [Math.min 0.97 ([adviceBlackness 3] / Stroke)]
include : dispiro
corner leftx lefty [widths.heading hst hst [if (lefty < righty) Upward Downward]]
corner rightx righty [widths hse hse]
: else : begin
local height : Math.abs (lefty - righty)
local slabClearance : if slab [adviceBlackness2 2 3 height] 0
local turnyleft : mix lefty righty [if slab [Math.max turn (slabClearance / height)] turn]
local cyleft : mix turnyleft righty tension
local straightxleft : mix leftx rightx pStraight
local straightyleft : mix cyleft righty pStraight
include : dispiro
widths.center
flat leftx lefty [heading [if (lefty < righty) Upward Downward]]
curl leftx turnyleft [heading [if (lefty < righty) Upward Downward]]
quadcontrols 0 ((cyleft - turnyleft) / (straightyleft - turnyleft)) 24
flat straightxleft straightyleft
curl rightx righty
define [XStrand stb slab _leftx lefty _rightx righty turn pStraight tension] : glyph-proc
local middlex : mix _leftx _rightx 0.5
local middley : mix lefty righty 0.5
include : HalfXStrand stb slab _leftx lefty middlex middley turn pStraight tension
include : HalfXStrand stb slab _rightx righty middlex middley turn pStraight tension
create-glyph 'X.straight' : glyph-proc
include : MarkSet.capital
include : WithAIHSerifsMask CAP 0 SB RightSB : union
XStrand true SLAB SB 0 RightSB CAP 0.1 0.4 0.28
XStrand true SLAB SB CAP RightSB 0 0.1 0.4 0.28
include : AIHSerifs CAP
create-glyph 'X.curly' : glyph-proc
include : MarkSet.capital
include : WithAIHSerifsMask CAP 0 SB RightSB : union
XStrand false SLAB SB 0 RightSB CAP 0.1 0.4 0.28
XStrand false SLAB SB CAP RightSB 0 0.1 0.4 0.28
include : AIHSerifs CAP
local LowerXTurn : if SLAB 0.1 0.1
local LowerXTension : if SLAB 0.24 0.24
create-glyph 'x.straight' : glyph-proc
include : MarkSet.e
include : WithAIHSerifsMask XH 0 SB RightSB : union
XStrand true SLAB SB 0 RightSB XH LowerXTurn 0.4 LowerXTension
XStrand true SLAB SB XH RightSB 0 LowerXTurn 0.4 LowerXTension
include : AIHSerifs XH
create-glyph 'x.curly' : glyph-proc
include : MarkSet.e
include : WithAIHSerifsMask XH 0 SB RightSB : union
XStrand false SLAB SB 0 RightSB XH LowerXTurn 0.4 LowerXTension
XStrand false SLAB SB XH RightSB 0 LowerXTurn 0.4 LowerXTension
include : AIHSerifs XH
create-glyph 'grek/chi.straight' : composite-proc [MarkSet.p] : union
XStrand true false SB Descender RightSB XH 0.05 0.4 0.11
XStrand true false SB XH RightSB Descender 0.05 0.4 0.11
create-glyph 'grek/chi.curly' : composite-proc [MarkSet.p] : union
XStrand false false SB Descender RightSB XH 0.05 0.4 0.11
XStrand false false SB XH RightSB Descender 0.05 0.4 0.11
select-variant 'X' 'X'
select-variant 'x' 'x'
select-variant 'grek/chi' 0x3C7 (follow -- 'x')
alias 'grek/Chi' 0x3A7 'X'
alias 'cyrl/Ha' 0x425 'X'
alias 'cyrl/ha' 0x445 'x'
alias 'latinchi' 0xAB53 'grek/chi'
with-related-glyphs 'X' 'cyrl/Hadescender' 0x4B2 : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
include : CyrDescender RightSB (connex -- 0.5)
with-related-glyphs 'x' 'cyrl/hadescender' 0x4B3 : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
include : CyrDescender RightSB (connex -- 0.5)
glyph-block-import Letter-Blackboard : BBS BBD
define [BBXShape l r top] : let [kDiag : DiagCorDs top (r - l) BBD] : union
intersection
Rect top 0 (-Width) (Width * 2)
union
ExtLineCenter 1 BBS l top (r - kDiag * BBD) 0
ExtLineCenter 1 BBS (l + kDiag * BBD) top r 0
HBarTop l (l + kDiag * BBD) top BBS
HBarBottom r (r - kDiag * BBD) 0 BBS
intersection
Rect top 0 (-Width) (Width * 2)
difference
ExtLineCenter 1 BBS l 0 r top
spiro-outline
corner l top
corner (l + kDiag * BBD) top
corner r 0
corner (r - kDiag * BBD) 0
create-glyph 'mathbb/X' 0x1D54F : composite-proc [MarkSet.capital] [BBXShape SB RightSB CAP]
create-glyph 'mathbb/x' 0x1D569 : composite-proc [MarkSet.e] [BBXShape SB RightSB XH]
glyph-block Letter-Latin-Upper-Y : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Latin-X : HalfXStrand
define [YShape straightBar top bot] : glyph-proc
local cross : mix [fallback bot 0] top 0.4
include : WithAIHSerifsMask CAP 0 SB RightSB
HalfXStrand straightBar SLAB SB top Middle cross 0.1 0.4 0.28
include : tagged 'strokeRT' : WithAIHSerifsMask CAP 0 SB RightSB
HalfXStrand straightBar SLAB RightSB top Middle cross 0.1 0.4 0.28
include : VBar Middle [fallback bot 0] (cross + HalfStroke)
set-base-anchor 'overlay' Middle cross
if SLAB : begin
include : AIVSerifs top
include : CenterBottomSerif Middle [fallback bot 0] MidJutSide
define [YOverlayShape] : glyph-proc
include : HOverlayBar SB RightSB (CAP * 0.45)
include : HOverlayBar SB RightSB (CAP * 0.25)
create-glyph : glyph-proc
include : MarkSet.capital
create-derived 'Y.straight' : YShape true CAP
create-derived 'Y.curly' : YShape false CAP
define [YHookTopShape straightBar] : glyph-proc
include : YShape straightBar CAP
eject-contour 'strokeRT'
eject-contour 'serifRT'
local cross (CAP * 0.4)
include : dispiro
widths.rhs
straight.left.start (RightSB + HookX / 3) (CAP - Stroke)
g4 (RightSB - HookX / 3) (CAP - Hook)
quadcontrols 0.55 0.7 32 unimportant
g4 (Middle + Stroke / 2 * HVContrast) cross
end [function : set this.loose true]
create-glyph : glyph-proc
include : MarkSet.capital
create-derived 'Yhooktop.straight' : YHookTopShape true
create-derived 'Yhooktop.curly' : YHookTopShape false
create-glyph : glyph-proc
include : MarkSet.p
create-derived 'cyrl/ue.straight' : YShape true XH Descender
create-derived 'cyrl/ue.curly' : YShape false XH Descender
create-glyph : glyph-proc
include : MarkSet.e
create-derived 'smcpY.straight' : YShape true XH
create-derived 'smcpY.curly' : YShape true XH
select-variant 'Y' 'Y'
select-variant 'Yhooktop' 0x1B3 (follow -- 'Y')
select-variant 'smcpY' 0x28F (follow -- 'Y')
select-variant 'cyrl/ue' 0x4AF (follow -- 'Y')
alias 'grek/Upsilon' 0x3A5 'Y'
alias 'cyrl/Ue' 0x4AE 'Y'
with-related-glyphs 'Y' 'symbol/currency/yenSign' 0xA5 : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
include : YOverlayShape
# Blackboard
glyph-block-import Letter-Blackboard : BBS BBD
create-glyph 'mathbb/Y' 0x1D550 : glyph-proc
local yCross : CAP * 0.4
include : MarkSet.capital
include : HBarTop SB (SB + BBD) CAP BBS
include : intersection
Rect CAP 0 (-Width) (2 * Width)
union
difference
ExtLineCenter 1 BBS SB CAP (Middle - BBD / 2) yCross
Rect CAP 0 (Middle - BBD / 2 + BBS / 2 * HVContrast) (Width * 2)
difference
ExtLineCenter 1 BBS (SB + BBD) CAP (Middle + BBD / 2) yCross
Rect CAP 0 (Middle + BBD / 2 + BBS / 2 * HVContrast) (Width * 2)
include : intersection
Rect CAP yCross (-Width) (2 * Width)
ExtLineCenter 1 BBS RightSB CAP (Middle + BBD / 2) yCross
include : HBarBottom (Middle - BBD / 2) (Middle + BBD / 2) 0 BBS
include : union
VBar (Middle - BBD / 2) 0 yCross BBS
VBar (Middle + BBD / 2) 0 yCross BBS
glyph-block Letter-Latin-Lower-Y : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : nShoulder
define [GenSmallYShape straightBar useTurnBottom serifless] : begin
local slab : if serifless false SLAB
local useStraightBottom : straightBar && !useTurnBottom
local slabCurly : slab && !straightBar
local px1 0.84
local py1 : [StrokeWidthBlend 0.8 0.76] * [if slabCurly [StrokeWidthBlend 1 0.9] 1]
local px2 0.95
local py20 : 0.88 * [if slabCurly [StrokeWidthBlend 1 0.9] 1]
local py2 : if (useStraightBottom || useTurnBottom) 0.97 py20
local pds 0.1
local pds2 0.01
local dpy1 : (1 - [linreg (1 - px2) (1 - py2) px1 py1 1]) / (1 - py1)
local dpy20 : (1 - [linreg (1 - px1) (1 - py1) px2 py20 1]) / (1 - py20)
local dpy2 : (1 - [linreg (1 - px1) (1 - py1) px2 py2 1]) / (1 - py2)
local yrstrokel0 : Middle - Width * 0.1
local yrstrokel : Middle - Width * 0.1 + (Stroke * HVContrast * [if (useStraightBottom || useTurnBottom) (2 / 3) (1 / 3)] * [if slabCurly [StrokeWidthBlend 0.95 0.97] 1])
local yrstroker : Width - SB * [if (straightBar && SLAB && !slab) 1.5 1] * [if straightBar designParameters.straightSmallYShapeSbShrink 1]
local yshrink : [StrokeWidthBlend 1 0.85] * [if straightBar ([adviceBlackness 3.25] / Stroke) 1]
local yBottomJut : Jut * 1.25
local slabysize : Jut * 1.0625 * (Width / UPM) + Stroke
local slabyvx 0.7
define [CalcDS top bottom] : begin
local ds0 : (top - bottom) * pds
local ds : if slabCurly [Math.max [adviceBlackness2 3 6 (top - bottom)] ds0] ds0
local ds2 : (top - bottom) * pds2 + [if (useStraightBottom || useTurnBottom) (slabysize * slabyvx) 0]
return {ds ds2}
define [yDiagCor dy] : DiagCor dy (yrstroker - yrstrokel) 0 0
define [yTopKnots x top bottom ds dir] : begin
local hs : HalfStroke * [if straightBar [yDiagCor (top - bottom)] 1]
local hl : hs - hs * dir
local hr : hs + hs * dir
if straightBar : return : list
flat x top [widths.heading hl hr Downward]
: else : return : list
flat x top [widths.heading hl hr Downward]
curl x (top - ds) [widths.heading hl hr Downward]
quadcontrols 0 dpy1 16
define [yBaseKnots top bottom shrink hooktop] : begin
local {ds ds2} : CalcDS top bottom
define joinX : mix yrstrokel yrstroker (1 - px2)
define joinY : mix (bottom + ds2) (top - ds) (1 - py2)
define [ConnectZ shrink] : curl joinX joinY [widths.rhs : Stroke * shrink]
return : list
if (straightBar && (! hooktop))
then : list
else : list
flat
mix yrstrokel yrstroker px1
mix (bottom + ds2) (top - ds) py1
piecewise
useStraightBottom : list
ConnectZ shrink
curl [mix yrstroker joinX ((top - bottom) / (top - joinY))] bottom [widths.heading 0 (Stroke * [yDiagCor (top - bottom)]) Downward]
useTurnBottom : list
ConnectZ shrink
flat (yrstrokel - slabysize) bottom [widths.rhs]
curl [Math.min (yrstrokel - slabysize - 0.1) (yrstrokel - Stroke - yBottomJut)] bottom
true : list
ConnectZ 1
quadcontrols 1 (1 - dpy2) 16
flat yrstrokel (bottom + ds2) [widths.heading 0 Stroke Downward]
curl yrstrokel bottom [widths.heading 0 Stroke Downward]
define [yBaseSerif top bottom] : glyph-proc
local {ds ds2} : CalcDS top bottom
define joinX : mix yrstrokel yrstroker (1 - px2)
define joinY : mix (bottom + ds2) (top - ds) (1 - py2)
if (!useTurnBottom) : begin
if (useStraightBottom) : begin
local xBaseKnot : mix yrstroker joinX ((top - bottom) / (top - joinY))
include : LeftwardBottomSerif (xBaseKnot - HalfStroke * HVContrast) bottom yBottomJut
: else : begin
include : LeftwardBottomSerif (yrstroker - HalfStroke * HVContrast) bottom yBottomJut
define [yJoinProportion hooktop x] : linreg
1 - px2
1 - py2
if (straightBar && !hooktop) 1 px1
if (straightBar && !hooktop) 1 py1
(x - yrstrokel) / (yrstroker - yrstrokel)
define [yJoinHeight ds ds2 top bottom hooktop] : begin
return : mix (bottom + ds2) (top - ds) [yJoinProportion hooktop Middle]
define [yJoinKnots ds ds2 top bottom hooktop] : begin
return : list
if straightBar : then : list
: else : list
flat
mix (Width - yrstrokel) (Width - yrstroker) px1
mix (bottom + ds2) (top - ds) py1
curl Middle
yJoinHeight ds ds2 top bottom hooktop
widths.lhs (Stroke * yshrink)
define [SmallYStrokeSplitMask top bottom hooktop dir elev] : begin
local {ds ds2} : CalcDS top bottom
local jp0 : yJoinProportion hooktop (Width / 2 - Width / 2 * dir)
local jp1 : yJoinProportion hooktop (Width / 2 + Width / 2 * dir)
local hs : 0.75 * Stroke
local yLeft : [mix (bottom + ds2) (top - ds) jp1] + hs - [fallback elev 0]
local yRight : [mix (bottom + ds2) (top - ds) jp0] + hs - [fallback elev 0]
local yMin : Math.min bottom yLeft yRight
return : spiro-outline
corner Width yMin
corner Width yRight
corner 0 yLeft
corner 0 yMin
define [SmallYShape top bottom] : glyph-proc
local {ds ds2} : CalcDS top bottom
include : intersection
SmallYStrokeSplitMask top bottom false 1
dispiro
yTopKnots yrstroker top bottom ds 1
yBaseKnots top bottom 1
include : difference
dispiro
yTopKnots yrstroker top bottom ds 1
yBaseKnots top bottom yshrink
SmallYStrokeSplitMask top bottom false 1 1
include : difference
dispiro
yTopKnots (Width - yrstroker) top bottom ds (-1)
yJoinKnots ds ds2 top bottom
SmallYStrokeSplitMask top bottom false (-1)
Rect (bottom + HalfStroke) (bottom - top) 0 Width
if slab : begin
include : AIVSerifs top
include : yBaseSerif top bottom
define [SmallYHookTopShape top bottom] : glyph-proc
local ds : (top - bottom) * pds
local ds2 : (top - bottom) * pds2 + [if (useStraightBottom || useTurnBottom) (slabysize * slabyvx) 0]
local joinHeight : yJoinHeight ds ds2 top bottom true
include : intersection
SmallYStrokeSplitMask top bottom true 1
dispiro
widths.rhs
straight.left.start ([mix yrstrokel yrstroker px1] - HalfStroke + HookX) (XH - Stroke)
yBaseKnots top bottom 1 true
include : difference
dispiro
widths.rhs
straight.left.start ([mix yrstrokel yrstroker px1] - HalfStroke + HookX) (XH - Stroke)
yBaseKnots top bottom yshrink true
SmallYStrokeSplitMask top bottom true 1 1
include : difference
dispiro
widths.center
yTopKnots (Width - yrstroker) top bottom ds (-1)
yJoinKnots ds ds2 top bottom true
SmallYStrokeSplitMask top bottom true (-1)
if slab : begin
include : AIVSerifs top
eject-contour 'serifRT'
include : yBaseSerif top bottom
define [SmallLambdaShape top bottom] : ReverseContours : glyph-proc
set currentGlyph.gizmo : Italify (-para.slopeAngle)
include : SmallYShape top bottom
set currentGlyph.gizmo : Italify (+para.slopeAngle)
# include : Upright
include : Translate 0 (-[mix bottom top 0.5])
include : Scale 1 (-1)
include : Translate 0 (+[mix bottom top 0.5])
# include : Italify
return : object SmallYShape SmallYHookTopShape SmallLambdaShape
create-glyph : glyph-proc
include : MarkSet.p
create-derived 'y.straight' : glyph-proc
include : [GenSmallYShape true false].SmallYShape XH Descender
set-base-anchor 'overlay' Middle (XH / 2)
create-derived 'y.straightTurn' : glyph-proc
include : [GenSmallYShape true true].SmallYShape XH Descender
set-base-anchor 'overlay' Middle (XH / 2)
create-derived 'y.curly' : glyph-proc
include : [GenSmallYShape false SLAB].SmallYShape XH Descender
set-base-anchor 'overlay' Middle (XH / 2)
create-glyph 'y.cursive' : glyph-proc
include : MarkSet.p
include : nShoulder
left -- (SB + Stroke * HVContrast)
right -- RightSB
fine -- ShoulderFine
include : FlipAround Middle (XH / 2)
include : dispiro
widths.rhs
flat RightSB XH [heading Downward]
curl RightSB (Descender + SmallSmoothA)
hookend (Descender + O)
g4 SB (Descender + SHook)
if SLAB : begin
include : LeftwardTopSerif SB XH SideJut
set-base-anchor 'overlay' Middle (XH / 2)
select-variant 'y' 'y'
alias 'cyrl/u' 0x443 'y'
create-glyph : glyph-proc
include : MarkSet.p
create-derived 'yhooktop.straight' : glyph-proc
include : [GenSmallYShape true false].SmallYHookTopShape XH Descender
set-base-anchor 'overlay' Middle (XH / 2)
create-derived 'yhooktop.straightTurn' : glyph-proc
include : [GenSmallYShape true true].SmallYHookTopShape XH Descender
set-base-anchor 'overlay' Middle (XH / 2)
create-derived 'yhooktop.curly' : glyph-proc
include : [GenSmallYShape false SLAB].SmallYHookTopShape XH Descender
set-base-anchor 'overlay' Middle (XH / 2)
create-glyph 'yhooktop.cursive' : glyph-proc
include : MarkSet.p
include : nShoulder
left -- (SB + Stroke * HVContrast)
right -- RightSB
fine -- ShoulderFine
include : FlipAround Middle (XH / 2)
include : dispiro
widths.rhs
flat RightSB (XH - Hook - HalfStroke) [heading Downward]
curl RightSB (Descender + SmallSmoothA)
hookend (Descender + O)
g4 SB (Descender + SHook)
include : VerticalHook (RightSB - HalfStroke * HVContrast) (XH - Hook - HalfStroke) HookX (-Hook)
if SLAB : begin
include : LeftwardTopSerif SB XH SideJut
set-base-anchor 'overlay' Middle (XH / 2)
create-glyph : glyph-proc
include : MarkSet.capital
create-derived 'cyrl/U.straight' : glyph-proc
include : [GenSmallYShape true false].SmallYShape CAP 0
set-base-anchor 'overlay' Middle (XH / 2 - Descender)
create-derived 'cyrl/U.straightTurn' : glyph-proc
include : [GenSmallYShape true true].SmallYShape CAP 0
set-base-anchor 'overlay' Middle (XH / 2 - Descender)
create-derived 'cyrl/U.curly' : glyph-proc
include : [GenSmallYShape false SLAB].SmallYShape CAP 0
set-base-anchor 'overlay' Middle (XH / 2 - Descender)
select-variant 'yhooktop' 0x1B4 (follow -- 'y')
select-variant 'cyrl/U' 0x423
turned 'turny' 0x28E 'y' Middle (XH / 2) [MarkSet.b]
define [LambdaBarOverlayShape] : FlatSlashShape [mix SB RightSB 0.45] [mix 0 CAP 0.8] (OverlayStroke / 2)
create-glyph 'grek/lambda.straight' : glyph-proc
include : MarkSet.b
include : [GenSmallYShape true false true].SmallLambdaShape CAP 0
set-base-anchor 'overlay' Middle (XH / 2)
create-derived 'lambdaSlash.straight' : LambdaBarOverlayShape
create-glyph 'grek/lambda.curly' : glyph-proc
include : MarkSet.b
include : [GenSmallYShape false false true].SmallLambdaShape CAP 0
set-base-anchor 'overlay' Middle (XH / 2)
create-derived 'lambdaSlash.curly' : LambdaBarOverlayShape
select-variant 'grek/lambda' 0x3BB
select-variant 'lambdaSlash' 0x19B (follow -- 'grek/lambda')
# Blackboard
glyph-block-import Letter-Blackboard : BBS BBD
create-glyph 'mathbb/y' 0x1D56A : glyph-proc
local yCross : CAP * 0.4
local kDiag : DiagCorDs XH ((RightSB - SB) / 2) (BBD * 0.25)
include : MarkSet.p
include : HBarTop SB (SB + kDiag * BBD) XH BBS
include : intersection
spiro-outline
corner [mix RightSB Middle (-1)] [mix XH 0 (-1)]
corner [mix RightSB Middle (2)] [mix XH 0 (2)]
corner (-Width * 2) [mix XH 0 (2)]
corner (-Width * 2) [mix XH 0 (-1)]
Rect XH Descender (-Width) (2 * Width)
union
ExtLineCenter 1 BBS SB XH (Middle - 0.25 * kDiag * BBD) 0
ExtLineCenter 1 BBS (SB + kDiag * BBD) XH (Middle + 0.75 * kDiag * BBD) 0
include : intersection
Rect XH Descender (-Width) (2 * Width)
ExtLineCenter 1 BBS RightSB XH Middle 0
glyph-block Letter-Latin-K : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
local [KBalance straightBar] : if SLAB (Width / 16) : if straightBar (Width / 32) 0
local [KBalanceRight straightBar] : if SLAB (-Width / 32) : if straightBar (Width / 32) 0
local [KBalanceRightCursive straightBar] : if SLAB (Width / 32) : if straightBar (Width / 32) 0
local [KO straightBar top stroke] : if straightBar (([if SLAB (0) (-4)] * OX - stroke / 3) * (XH / top)) 0
define [KLegShape left right top straightBar _stroke] : glyph-proc
local stroke : fallback _stroke Stroke
local turn (top * 0.99)
local fine : adviceBlackness 3.5
local Ok : KO straightBar top stroke
local kshLeft : left + [KBalance straightBar]
local kshRight : right + [KBalanceRight straightBar]
if straightBar : do
local attach (top * 0.42 - stroke)
local attach2 (top * 0.72 + stroke)
include : intersection
Rect top 0 0 UPM
dispiro
widths.rhs stroke
flat (kshRight - Ok) top
curl (kshLeft + stroke) attach [widths 0 fine]
include : intersection
spiro-outline
corner (kshLeft + stroke) 0
corner (kshLeft + stroke) (attach + 1)
corner (kshRight - Ok - 1) top
corner (kshRight - Ok) top
corner (kshRight - Ok) 0
dispiro
widths.lhs stroke
flat (kshRight - Ok) 0
curl (kshLeft + stroke) attach2
: else : do
local attach (top * [if SLAB 0.325 0.375])
local attach2 [if SLAB [mix kshLeft kshRight 0.48] Middle]
include : dispiro
g4.down.start (kshRight) top [widths.heading 0 (stroke * [if SLAB 1.15 1.05] * (Width * 2 / UPM)) Downward]
bezcontrols 0 0.2 0.5 0.65 8
g4 (kshLeft + stroke) attach [widths 0 fine]
include : difference
dispiro
widths.center
g4.up.start (kshRight - O - stroke / 2 * HVContrast) 0 [heading Upward]
quadcontrols 0 0.25 8
g4 attach2 (top * 0.61) [widths.center fine]
spiro-outline
corner.down.start kshRight top
bezcontrols 0 0.2 0.5 0.65 8
corner (kshLeft + stroke) attach
corner kshLeft 0
corner kshLeft top
if SLAB : do
local topSerifX : kshRight - (stroke * [if SLAB 1.15 1.05] * (Width * 2 / UPM) / 2 - stroke / 2) * HVContrast * [if para.isItalic 1 0] - stroke / 2 * 0.5 * HVContrast
local bottomSerifX : kshRight - O * [if para.isItalic 1 0]
include : RightwardTopSerif topSerifX top (SideJut + stroke / 2 * 0.5 * HVContrast)
include : RightwardBottomSerif bottomSerifX 0 SideJut
define [KCursiveLoopAndLegDimen top straightBar] : begin
define kshLeft : SB + [KBalance straightBar]
define kshRight : RightSB + [KBalanceRightCursive straightBar] + 0.2 * Stroke
define arcFine : Stroke * CThin
define arcStroke : adviceBlackness2 2 3 top
define arcTerminalFine : adviceBlackness2 3 4 top
define expansion : Width / (UPM / 2) - 1
define pArcStartY : 0.46 + 0.1 * (arcStroke / Width)
define pArcTopX : 0.625 - 0.05 * (arcStroke / Width) - 0 * expansion * (arcStroke / UPM)
define pArcRightX : 0.95 - TanSlope * 0.25 + ([if SLAB 0 0.05] + 0.75 * TanSlope) * (arcStroke / Width)
define pArcRightY : 0.575 - 0.625 * (arcStroke / Width) - 0.5 * expansion * (arcStroke / UPM)
define pArcTerminalX : 0.15 - 0.5 * (arcStroke / Width)
define pArcBottomX : 0.15 + 0.5 * (arcStroke / Width)
define pArcBottomY : 0.45 + 0.5 * (arcStroke / Width)
define arcRightSlope : 0.05 + 0.2 * (arcStroke / Width) + 1 * expansion * (arcStroke / UPM)
define arcTopSlope : shoulderMidSlope arcFine arcStroke 1
define arcStartX : kshLeft + HVContrast * (Stroke - arcFine)
define arcStartY : top * pArcStartY
define arcTerminalX : mix arcStartX kshRight pArcTerminalX
define arcBottomX : mix arcStartX kshRight pArcBottomX
define arcBottomY : mix 0 top pArcBottomY
define arcTerminalY : arcBottomY + arcStroke * 0.125 - O
define arcRightX : kshRight * pArcRightX
define arcRightY : mix arcBottomY top pArcRightY
define arcTopX : mix arcStartX arcRightX pArcTopX
define arcTopY : top - O
return : object arcStartX arcStartY arcFine arcRightX arcRightY arcRightSlope arcTopX arcTopY arcStroke arcTopSlope arcBottomX arcBottomY arcTerminalX arcTerminalY arcTerminalFine kshRight
define [KCursiveLoopAndLegShape top straightBar] : glyph-proc
define dim : KCursiveLoopAndLegDimen top straightBar
include : dispiro
g4.up.start dim.arcStartX dim.arcStartY [widths.heading 0 dim.arcFine Upward]
arcvh 8 2.0
g4.right.mid dim.arcTopX dim.arcTopY
widths.rhs.heading dim.arcStroke {.y (+1) .x dim.arcTopSlope}
archv
g4.down.mid dim.arcRightX (dim.arcRightY - 0.5 * dim.arcRightSlope * dim.arcStroke * HVContrast)
heading {.y dim.arcRightSlope .x HVContrast}
arcvh
g4 dim.arcBottomX (dim.arcBottomY - dim.arcStroke) [widths.rhs.heading dim.arcTerminalFine Leftward]
g4 dim.arcStartX (dim.arcTerminalY - dim.arcStroke) [widths.rhs.heading dim.arcStroke Leftward]
define slabStartX : dim.kshRight - (Stroke * 0.325 - TanSlope) * HVContrast
include : difference
intersection
Rect XH 0 0 [if SLAB (slabStartX + SideJut) (Width * 2)]
dispiro
flat dim.arcTerminalX dim.arcTerminalY [widths.lhs]
curl dim.kshRight 0 [widths.rhs]
spiro-outline
g4.up.start (dim.arcStartX - O) dim.arcStartY
arcvh 4 2.1
g4.right.mid dim.arcTopX (dim.arcTopY + O)
archv 4 2.2
g4.down.mid (dim.arcRightX + O) (dim.arcRightY - 0.5 * dim.arcRightSlope * dim.arcStroke * HVContrast)
arcvh
g4 dim.arcBottomX (dim.arcBottomY - dim.arcStroke - O)
g4 dim.arcStartX (dim.arcTerminalY - dim.arcStroke - O)
if SLAB : do
include : RightwardBottomSerif slabStartX 0 SideJut
define [KShape straightBar] : glyph-proc
include : VBarLeft (SB + [KBalance straightBar]) 0 CAP
include : KLegShape SB RightSB CAP straightBar
if SLAB : begin
include : CenterTopSerif (SB + [KBalance straightBar] + HalfStroke * HVContrast) CAP Jut
include : CenterBottomSerif (SB + [KBalance straightBar] + HalfStroke * HVContrast) 0 Jut
create-glyph 'K.straight' : glyph-proc
set-width Width
include : MarkSet.capital
include : KShape true
create-derived 'cyrl/KaDescender.straight'
CyrDescender (RightSB + [KBalanceRight true] - [KO true CAP Stroke]) (connex -- 1)
create-glyph 'K.curly' : glyph-proc
set-width Width
include : MarkSet.capital
include : KShape false
create-derived 'cyrl/KaDescender.curly'
CyrDescender (RightSB + [KBalanceRight false] - [KO false CAP Stroke])
select-variant 'K' 'K'
alias 'grek/Kappa' 0x39A 'K'
alias 'cyrl/Ka' 0x41A 'K'
alias 'letterLike/kelvinSign' 0x212A 'K'
select-variant 'cyrl/KaDescender' 0x49A (follow -- 'K')
define [LowerKShape straightBar] : glyph-proc
include : VBarLeft (SB + [KBalance straightBar]) 0 CAP
include : KLegShape SB RightSB XH straightBar
if SLAB : begin
include : LeftwardTopSerif (SB + [KBalance straightBar]) CAP SideJut
if (!para.isItalic) : begin
include : tagged 'serifLB'
CenterBottomSerif (SB + [KBalance straightBar] + HalfStroke * HVContrast) 0 Jut
define [LowerKCursiveShape straightBar] : glyph-proc
include : VBarLeft (SB + [KBalance straightBar]) 0 CAP
include : KCursiveLoopAndLegShape XH straightBar
if SLAB : begin
include : LeftwardTopSerif (SB + [KBalance straightBar]) CAP SideJut
if (!para.isItalic) : begin
include : tagged 'serifLB'
CenterBottomSerif (SB + [KBalance straightBar] + HalfStroke * HVContrast) 0 Jut
create-glyph 'k.straight' : glyph-proc
set-width Width
include : MarkSet.b
include : LowerKShape true
create-glyph 'k.curly' : glyph-proc
set-width Width
include : MarkSet.b
include : LowerKShape false
create-glyph 'k.cursive' : glyph-proc
set-width Width
include : MarkSet.b
include : LowerKCursiveShape true
select-variant 'k' 'k'
alias 'cyrl/ka.BGR' null 'k'
glyph-block-import Letter-Blackboard : BBS BBD BBBarLeft
define [BBKLegShape top left right] : begin
local kDiag : DiagCorDs (top / 2) (right - left) BBD
return : union
HBarBottom (right - kDiag * BBD) right 0 BBS
intersection
Rect top 0 left (2 * Width)
ExtLineCenter 2 BBS right top left (top / 2)
intersection
spiro-outline
corner right top
corner left (top / 2)
corner left 0
corner (Width * 2) 0
corner (Width * 2) top
union
ExtLineCenter 2 BBS right 0 (left + kDiag * BBD) (top / 2)
ExtLineCenter 2 BBS (right - kDiag * BBD) 0 left (top / 2)
create-glyph 'mathbb/K' 0x1D542 : glyph-proc
include : MarkSet.capital
include : BBBarLeft SB 0 CAP
include : BBKLegShape CAP (SB + BBD + HVContrast * BBS) RightSB
create-glyph 'mathbb/k' 0x1D55C : glyph-proc
include : MarkSet.b
include : BBBarLeft SB 0 CAP
include : BBKLegShape XH (SB + BBD + HVContrast * BBS) RightSB
define [LowerKappaShape straightBar] : glyph-proc
include : VBarLeft (SB + [KBalance straightBar]) 0 XH
include : KLegShape SB RightSB XH straightBar
if SLAB : begin
include : LeftwardTopSerif (SB + [KBalance straightBar]) XH SideJut
create-glyph 'grek/kappa.straight' : glyph-proc
set-width Width
include : MarkSet.e
include : LowerKappaShape true
create-glyph 'grek/kappa.curly' : glyph-proc
set-width Width
include : MarkSet.e
include : LowerKappaShape false
select-variant 'grek/kappa' 0x3BA (follow -- 'K')
define [LowerCyrKaShape straightBar] : glyph-proc
include : VBarLeft (SB + [KBalance straightBar]) 0 XH
include : KLegShape SB RightSB XH straightBar
if SLAB : begin
include : CenterBottomSerif (SB + [KBalance straightBar] + HalfStroke * HVContrast) 0 Jut
include : CenterTopSerif (SB + [KBalance straightBar] + HalfStroke * HVContrast) XH Jut
create-glyph 'cyrl/ka.straight' : glyph-proc
set-width Width
include : MarkSet.e
include : LowerCyrKaShape true
create-derived 'cyrl/kaDescender.straight'
CyrDescender (RightSB + [KBalanceRight true] - [KO true XH Stroke]) (connex -- 1)
create-glyph 'cyrl/ka.curly' : glyph-proc
set-width Width
include : MarkSet.e
include : LowerCyrKaShape false
create-derived 'cyrl/kaDescender.curly'
CyrDescender (RightSB + [KBalanceRight false] - [KO false XH Stroke])
select-variant 'cyrl/ka' 0x43A (follow -- 'K')
alias 'latinkappa' 0x138 'cyrl/ka'
select-variant 'cyrl/kaDescender' 0x49B (follow -- 'K')
define [KHookTopShape straightBar] : glyph-proc
include : KLegShape SB RightSB CAP straightBar
include : VBarLeft (SB + [KBalance straightBar]) 0 (CAP - Hook - HalfStroke)
include : VerticalHook (SB + [KBalance straightBar] + HalfStroke * HVContrast) (CAP - Hook - HalfStroke) HookX (-Hook)
if SLAB : begin
include : CenterBottomSerif (SB + [KBalance straightBar] + HalfStroke * HVContrast) 0 Jut
create-glyph 'Khooktop.straight' : glyph-proc
include : MarkSet.capital
include : KHookTopShape true
create-glyph 'Khooktop.curly' : glyph-proc
include : MarkSet.capital
include : KHookTopShape false
select-variant 'Khooktop' 0x198 (follow -- 'K')
define [LowerKHookTopShape straightBar] : glyph-proc
include : KLegShape SB RightSB XH straightBar
include : VBarLeft (SB + [KBalance straightBar]) 0 (CAP - Hook - HalfStroke)
include : VerticalHook (SB + [KBalance straightBar] + HalfStroke * HVContrast) (CAP - Hook - HalfStroke) HookX (-Hook)
if (SLAB && !para.isItalic) : begin
include : tagged 'serifLB'
CenterBottomSerif (SB + [KBalance straightBar] + HalfStroke * HVContrast) 0 Jut
create-glyph 'khooktop.straight' : glyph-proc
include : MarkSet.b
include : LowerKHookTopShape true
create-glyph 'khooktop.curly' : glyph-proc
include : MarkSet.b
include : LowerKHookTopShape false
select-variant 'khooktop' 0x199 (follow -- 'K')
turned 'turnK.straight' nothing 'K.straight' Middle (CAP / 2)
turned 'turnK.curly' nothing 'K.curly' Middle (CAP / 2)
select-variant 'turnK' 0xA7B0 (follow -- 'K')
turned 'turnk.straight' nothing 'k.straight' Middle (XH / 2) [MarkSet.p]
turned 'turnk.curly' nothing 'k.curly' Middle (XH / 2) [MarkSet.p]
turned 'turnk.cursive' nothing 'k.cursive' Middle (XH / 2) [MarkSet.p]
select-variant 'turnk' 0x29E (follow -- 'k')
define [BashkirKaShape top straightBar] : glyph-proc
local left : if SLAB ([mix SB RightSB 0.35] - MVertStroke / 2 * HVContrast) [mix SB RightSB 0.2]
local leftNB : left - [KBalance straightBar]
local barleft : mix 0 SB [if SLAB 0.25 0.375]
local sw : adviceBlackness 3
include : HBarTop barleft (Stroke * 0.1 + left) top
include : VBarLeft left 0 top sw
include : KLegShape leftNB RightSB top straightBar sw
if SLAB : begin
include : CenterBottomSerif (left + HalfStroke * HVContrast) 0 Jut
include : DownwardLeftSerif barleft top VJut (MVertStroke / HVContrast)
create-glyph 'cyrl/BashkirUpperKa.straight' : glyph-proc
include : MarkSet.capital
include : BashkirKaShape CAP true
create-glyph 'cyrl/BashkirUpperKa.curly' : glyph-proc
include : MarkSet.capital
include : BashkirKaShape CAP false
create-glyph 'cyrl/BashkirKa.straight' : glyph-proc
include : MarkSet.e
include : BashkirKaShape XH true
create-glyph 'cyrl/BashkirKa.curly' : glyph-proc
include : MarkSet.e
include : BashkirKaShape XH false
select-variant 'cyrl/BashkirUpperKa' 0x4A0 (follow -- 'K')
select-variant 'cyrl/BashkirKa' 0x4A1 (follow -- 'K')
glyph-block Letter-Latin-Upper-B : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Metrics : BowlXDepth
glyph-block-import Letter-Blackboard : BBS BBD
define BArcMix 0.93
define BBarPos 0.52
define [BShapeArcsT] : params [sink top stroke offset barPos topArcShift topArcInnerShift] : glyph-proc
local bowl : top * barPos + stroke * (1 - barPos)
local barleft SB
local mockBowlDepth : BowlXDepth top (bowl - stroke) barleft RightSB stroke
local curvleft : RightSB - SB * 0.5 - mockBowlDepth + topArcInnerShift
local curvleftTop : Math.min curvleft (RightSB - SB * 0.5 - OX - stroke * 1.375 + topArcInnerShift)
local xTopArcRight : [mix SB RightSB BArcMix] - OX * 2 + topArcShift
local fine : stroke * CThin
local sma : SmoothAOf (Smooth * 0.9) Width
local smb : SmoothBOf (Smooth * 0.9) Width
local smaTop : SmoothAOf (Smooth * 0.9 - (curvleft - curvleftTop)) Width
local smbTop : SmoothBOf (Smooth * 0.9 - (curvleft - curvleftTop)) Width
include : sink
widths.rhs stroke
flat (barleft - O) (top - offset) [heading Rightward]
curl (curvleftTop - CorrectionOMidX * stroke) (top - offset)
archv
g4 (xTopArcRight - offset) [YSmoothMidR top (bowl - stroke) smaTop smbTop]
arcvh
flat (curvleftTop + CorrectionOMidX * stroke) (bowl - fine + offset) [widths.rhs fine]
curl (barleft - O) (bowl - fine + offset) [heading Leftward]
include : sink
widths.rhs fine
flat (barleft - O) (bowl - stroke + fine - offset) [heading Rightward]
curl (curvleft - CorrectionOMidX * stroke) (bowl - stroke + fine - offset)
archv
g4 (RightSB - OX * 2 - offset) [YSmoothMidR bowl 0 sma smb] [widths.rhs stroke]
arcvh
flat (curvleft + CorrectionOMidX * stroke) offset
curl (barleft - O) offset [heading Leftward]
define [BShape] : params [top [stroke : adviceBlackness2 2 3 top] [barPos BBarPos] [topArcShift 0] [topArcInnerShift 0] [noSerif false]] : glyph-proc
include : BShapeArcsT dispiro top
offset -- 0
stroke -- stroke
barPos -- barPos
topArcShift -- topArcShift
topArcInnerShift -- topArcInnerShift
include : VBarLeft SB 0 top stroke
if (!noSerif && SLAB) : begin
include : tagged 'serifLT' : LeftwardTopSerif SB top SideJut
include : tagged 'serifLB' : LeftwardBottomSerif SB 0 SideJut
define [BShapeOutline] : params [top [stroke : adviceBlackness2 2 3 top] [barPos BBarPos] [topArcShift 0] [topArcInnerShift 0]] : glyph-proc
include : BShapeArcsT spiro-outline top
offset -- 1
stroke -- stroke
barPos -- barPos
topArcShift -- topArcShift
topArcInnerShift -- topArcInnerShift
create-glyph 'B.standard' : glyph-proc
set-width Width
include : MarkSet.capital
include : BShape CAP
create-glyph 'B.moreAsymmetric' : glyph-proc
set-width Width
include : MarkSet.capital
include : BShape CAP (barPos -- 0.6) (topArcShift -- -(RightSB - SB) * 0.05) (topArcInnerShift -- -(RightSB - SB) * 0.1)
select-variant 'B' 'B'
alias 'grek/Beta' 0x392 'B'
alias 'cyrl/Ve' 0x412 'B'
create-glyph 'mathbb/B' 0x1D539 : glyph-proc
include : MarkSet.capital
include : union
BShape CAP (stroke -- BBS) (noSerif -- true)
intersection
BShapeOutline CAP (stroke -- BBS)
union
VBarRight (RightSB - BBD - OX * 2) 0 (CAP * BBarPos) BBS
VBarRight ([mix SB RightSB BArcMix] - BBD - OX * 2) (CAP * BBarPos) CAP BBS
VBarLeft (SB + BBD) 0 CAP BBS
with-related-glyphs 'B' 'Bhookleft' 0x181 : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
eject-contour "serifLT"
include : LeftHook SB CAP
define [ItalicCyrveShape top] : glyph-proc
local stroke : adviceBlackness2 2 3 top
local mid : mix RightSB SB 0.65
local midy : top * HBarPos
local smb : top - [mix (midy + stroke / 2) (top - O - stroke) (SmoothA / (SmoothA + SmoothB))] + TanSlope * HVContrast * stroke
local sma : [mix (stroke + O) (midy - stroke / 2) (SmoothA / (SmoothA + SmoothB))] - TanSlope * HVContrast * stroke
local fine : stroke * CThin
include : dispiro
widths.lhs fine
flat mid (midy - (fine - stroke / 2)) [heading Rightward]
curl Middle (midy - (fine - stroke / 2)) [heading Rightward]
archv
g4 (RightSB - (OX - O)) (top - smb) [widths.lhs stroke]
arcvh
g4 (Middle + stroke * 0.06 - CorrectionOMidS) (top - O)
archv
flat (SB + O) (top - SmallSmoothA)
curl (SB + O) SmallSmoothB
arcvh
g4 (Middle + stroke * 0.06 + CorrectionOMidS) O
archv
g4 (RightSB - (OX - O) - O * 2) (sma)
arcvh
flat Middle (midy + (fine - stroke / 2)) [widths.heading fine 0 Leftward]
curl mid (midy + (fine - stroke / 2)) [widths.heading fine 0 Leftward]
define [ClosedEpsilonShape top] : glyph-proc
local stroke : adviceBlackness2 2 3 top
local mid : mix SB RightSB 0.65
local midy : top * HBarPos
local sma : top - [mix (midy + stroke / 2) (top - O - stroke) (SmoothB / (SmoothA + SmoothB))] - TanSlope * HVContrast * stroke
local smb : [mix (stroke + O) (midy - stroke / 2) (SmoothB / (SmoothA + SmoothB))] + TanSlope * HVContrast * stroke
local fine : stroke * CThin
include : dispiro
widths.rhs fine
flat mid (midy - (fine - stroke / 2)) [heading Leftward]
curl Middle (midy - (fine - stroke / 2)) [heading Leftward]
archv
g4 (SB + (OX - O)) (top - sma) [widths.rhs stroke]
arcvh
g4 (Middle - stroke * 0.06 - CorrectionOMidS) (top - O)
archv
flat (RightSB - O) (top - SmallSmoothB)
curl (RightSB - O) SmallSmoothA
arcvh
g4 (Middle - stroke * 0.06 + CorrectionOMidS) O
archv
g4 (SB + (OX - O) + O * 2) (smb)
arcvh
flat Middle (midy + (fine - stroke / 2)) [widths.heading 0 fine Rightward]
curl mid (midy + (fine - stroke / 2)) [widths.heading 0 fine Rightward]
create-glyph 'cyrl/ve.italic' : glyph-proc
include : MarkSet.e
include : ItalicCyrveShape XH
create-glyph 'cyrl/ve.BGR' : glyph-proc
include : MarkSet.e
include : ItalicCyrveShape CAP
create-glyph 'cyrl/ve.upright' : glyph-proc
include : MarkSet.e
include : BShape XH
italic-variant 'cyrl/ve' 0x432
alias 'smcpB' 0x299 'cyrl/ve.upright'
alias 'closeturnepsilon' 0x25E 'cyrl/ve.italic'
create-glyph 'closeepsilon' 0x29A : glyph-proc
include : MarkSet.e
include : ClosedEpsilonShape XH
create-glyph 'Bbar' 0x243 : glyph-proc
include [refer-glyph 'B'] AS_BASE
local stroke : adviceBlackness2 2 3 CAP
include : HOverlayBar
mix SB 0 0.7
mix SB RightSB 0.5
mix 0 (CAP * 0.52 + stroke / 2) 0.5
Math.min ((CAP - Stroke * 3) / 4) OverlayStroke
create-glyph 'grek/beta' 0x3B2 : glyph-proc
include : MarkSet.if
local ymiddle : [mix 0 CAP 0.55] - HalfStroke
local fine : Stroke * CThin
include : dispiro
widths.rhs
flat SB Descender [heading Upward]
curl SB (CAP - SmallSmoothA)
arcvh
g4 ([mix SB (RightSB - OX + O * 3) 0.5] - CorrectionOMidS) (CAP - O)
archv
g4 (RightSB - OX + O * 3) [mix CAP ymiddle 0.5]
arcvh
flat [mix SB (RightSB - OX + O * 3) 0.5] (ymiddle + Stroke - fine) [widths.rhs fine]
curl [mix SB RightSB 0.3] (ymiddle + Stroke - fine)
include : dispiro
widths.rhs fine
flat ([mix SB RightSB 0.3] - (2 * fine - Stroke) * TanSlope) (ymiddle + fine)
curl (RightSB - ymiddle / 2 - HalfStroke) (ymiddle + fine)
archv
g4 (RightSB - OX) [mix 0 (ymiddle + Stroke) 0.5] [widths.rhs]
arcvh
flat (RightSB - ymiddle / 2 - HalfStroke) 0
curl (SB + HalfStroke) 0 [heading Leftward]
glyph-block Letter-Latin-Lower-B : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : DToothlessRise DMBlend
create-glyph 'b.toothed' : glyph-proc
set-width Width
include : MarkSet.b
include : OBarLeftShape
include : VBarLeft SB 0 CAP
if SLAB : begin
include : tagged 'serifLT' : LeftwardTopSerif SB CAP SideJut
include : tagged 'serifLB' : LeftwardBottomSerif SB 0 SideJut
create-glyph 'b.toothlessCorner' : glyph-proc
set-width Width
include : MarkSet.b
include : OBarLeftToothlessShape XH SB DToothlessRise DMBlend
include : VBarLeft SB DToothlessRise CAP
if SLAB : begin
include : tagged 'serifLT' : LeftwardTopSerif SB CAP SideJut
create-glyph 'b.toothlessRounded' : glyph-proc
set-width Width
include : MarkSet.b
include : OBarLeftRoundedShape XH SB CAP
if SLAB : begin
include : tagged 'serifLT' : LeftwardTopSerif SB CAP SideJut
select-variant 'b' 'b'
create-glyph 'bhooktop.toothed' : glyph-proc
include : MarkSet.b
include : OBarLeftShape
include : HooktopLeftBar
if SLAB : begin
include : tagged 'serifLB' : LeftwardBottomSerif SB 0 SideJut
create-glyph 'bhooktop.toothlessCorner' : glyph-proc
include : MarkSet.b
include : OBarLeftToothlessShape XH SB DToothlessRise DMBlend
include : HooktopLeftBar (bottom -- DToothlessRise)
create-glyph 'bhooktop.toothlessRounded' : glyph-proc
include : MarkSet.b
include : OBarLeftRoundedShape XH SB XH
include : HooktopLeftBar (bottom -- SmallSmoothB)
select-variant 'bhooktop' 0x253 (follow -- 'b')
with-related-glyphs 'b' 'bbar' 0x180 : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE
include : HOverlayBar [mix SB 0 0.7] [mix SB RightSB 0.5] [mix XH CAP 0.45]
with-related-glyphs 'b' 'bdot' 0x1E03 : lambda [src sel] : glyph-proc
include : refer-glyph "dotAbove"
include : Translate (Width + HalfStroke) 0
include [refer-glyph src] AS_BASE
with-related-glyphs 'b' 'latinbe' 0x183 : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE
include : HBarTop (SB - O) [mix SB RightSB 0.9] CAP
if SLAB : begin
include : DownwardRightSerif [mix SB RightSB 0.9] CAP VJut
with-related-glyphs 'b' 'zhuangtonesix' 0x185 : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE
eject-contour 'serifLT'
local s : Math.max (XH * 0.1) Stroke
include : ReverseContours : spiro-outline
corner (SB - O) CAP
corner SB CAP
corner (SB - s) (CAP - s)
corner SB (CAP - s * 2)
corner (SB - O) (CAP - s * 2)
glyph-block-import Letter-Blackboard : BBS BBD BBBarLeft
create-glyph 'mathbb/b' 0x1D553 : glyph-proc
include : MarkSet.b
include : BBBarLeft SB 0 CAP
include : intersection
OShapeOutline.NoOvershoot XH 0 (SB + BBD + BBS * HVContrast) RightSB
VBarRight (RightSB - BBD - OX) 0 XH BBS
include : OBarLeftShape
left -- SB + BBD
top -- XH
stroke -- BBS
glyph-block Letter-Latin-Upper-D : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
define [DArcShapeT sink offset sw fRound] : glyph-proc
local barleft SB
local dsmooth : Math.min (CAP * 0.499) (Smooth * 1.1)
local bsmooth : Math.min (Width - SB * 2 - sw) (Smooth * 1.1)
local bsmoothRd : Math.min (Width - SB * 2 - sw) (Smooth * 1.25)
local sma : SmoothAOf dsmooth Width
local smb : SmoothBOf dsmooth Width
if (fRound) : include : sink
widths.rhs sw
[if offset corner flat] (barleft - O) (CAP - offset) [heading Rightward]
curl (RightSB - bsmoothRd - CorrectionOMidS) (CAP - offset)
archv
g4 (RightSB - OX - offset) [YSmoothMidR CAP 0 sma smb]
arcvh
flat (RightSB - bsmoothRd + CorrectionOMidS) offset
[if offset corner curl] (barleft - O) offset [heading Leftward]
: else : include : sink
widths.rhs sw
[if offset corner flat] (barleft - O) (CAP - offset) [heading Rightward]
curl (RightSB - bsmooth - CorrectionOMidS) (CAP - offset)
archv
flat (RightSB - OX - offset) (CAP - smb)
curl (RightSB - OX - offset) (0 + sma)
arcvh
flat (RightSB - bsmooth + CorrectionOMidS) offset
[if offset corner curl] (barleft - O) offset [heading Leftward]
define [DShape fRound] : glyph-proc
local barleft SB
include : VBarLeft barleft 0 CAP
include : DArcShapeT dispiro 0 Stroke fRound
if SLAB : begin
include : tagged 'serifLT' : LeftwardTopSerif barleft CAP SideJut
include : tagged 'serifLB' : LeftwardBottomSerif barleft 0 SideJut
create-glyph 'D.standard' : glyph-proc
set-width Width
include : MarkSet.capital
include : DShape false
create-glyph 'D.moreRounded' : glyph-proc
set-width Width
include : MarkSet.capital
include : DShape true
select-variant 'D' 'D'
with-related-glyphs 'D' 'Eth' 0xD0 : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
include : HOverlayBar (SB * 0.3) [mix (SB + Stroke) (RightSB - Stroke) 0.55] (CAP * OverlayPos)
alias 'Dcroat' 0x110 'Eth'
alias 'arficanD' 0x189 'Eth'
with-related-glyphs 'D' 'Dhookleft' 0x18a : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
eject-contour 'serifLT'
include : LeftHook SB CAP
glyph-block-import Letter-Blackboard : BBS BBD
create-glyph 'mathbb/D' 0x1D53B : glyph-proc
include : MarkSet.capital
include : VBarLeft SB 0 CAP BBS
include : DArcShapeT dispiro 0 BBS false
include : intersection
DArcShapeT spiro-outline 1 BBS false
union
VBarLeft (SB + BBD) 0 CAP BBS
VBarRight (RightSB - BBD - OX) 0 CAP BBS
glyph-block Letter-Latin-Lower-D : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Marks : markExtend
glyph-block-import Letter-Shared-Shapes : RightwardTailedBar DToothlessRise DMBlend
glyph-block-import Recursive-Build : Widen
glyph-block-import Letter-Shared-Shapes : CurlyTail
create-glyph 'd.toothed' : glyph-proc
include : MarkSet.b
include : OBarRightShape
include : VBarRight RightSB 0 CAP
if SLAB : begin
include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
include : LeftwardTopSerif (RightSB - Stroke * HVContrast) CAP SideJut
create-glyph 'd.tailed' : glyph-proc
include : MarkSet.b
include : OBarRightShape
include : RightwardTailedBar RightSB 0 CAP
if SLAB : begin
include : LeftwardTopSerif (RightSB - Stroke * HVContrast) CAP SideJut
create-glyph 'd.toothlessCorner' : glyph-proc
include : MarkSet.b
include : OBarRightToothlessShape XH RightSB DToothlessRise DMBlend
include : VBarRight RightSB DToothlessRise CAP
if SLAB : begin
include : LeftwardTopSerif (RightSB - Stroke * HVContrast) CAP SideJut
create-glyph 'd.toothlessRounded' : glyph-proc
include : MarkSet.b
include : OBarRightRoundedShape XH RightSB CAP
if SLAB : begin
include : LeftwardTopSerif (RightSB - Stroke * HVContrast) CAP SideJut
select-variant 'd' 'd'
with-related-glyphs 'd' 'dcroat' 0x111 : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE
include : HBar [mix (SB + Stroke) (RightSB - Stroke) 0.5] [mix RightSB Width 0.7] [mix XH CAP 0.45] OverlayStroke
with-related-glyphs 'd' 'dcaron' 0x10f : lambda [src sel] : glyph-proc
include : refer-glyph "commaAbove"
include : Translate (Width + (RightSB - SB) / 2 + markExtend / 2) 0
local f : Widen {src} 0.95 1
include : f.queryByName src
include : MarkSet.b
create-glyph 'dcurlytail' 0x221 : glyph-proc
local fine : adviceBlackness 4
local rinner : clamp (Width * 0.065) (XH * 0.05) (fine * 0.35)
local wide Stroke
local m1 : Math.min RightSB (Width - rinner * 2 - fine - OX)
local x2 : mix SB m1 0.5
local y2 : 0 - fine - rinner * 1.25
include : MarkSet.e
include : OBarRightShape XH m1
include : dispiro
widths.rhs
flat m1 CAP [heading Downward]
curl m1 (rinner * 2 + fine)
CurlyTail fine rinner m1 0 (m1 + rinner * 2 + fine) x2 y2
if SLAB : begin
include : LeftwardTopSerif (m1 - Stroke * HVContrast) CAP SideJut
define yDHookTopConnect : CAP - Hook - HalfStroke
create-glyph 'dhooktop.toothed' : glyph-proc
include : MarkSet.b
include : OBarRightShape
include : VBarRight RightSB 0 yDHookTopConnect
include : VerticalHook (RightSB - HalfStroke * HVContrast) yDHookTopConnect HookX (-Hook)
if SLAB : include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
create-glyph 'dhooktop.tailed' : glyph-proc
include : MarkSet.b
include : OBarRightShape
include : dispiro
flat RightSB yDHookTopConnect [widths.rhs.heading Stroke Downward]
curl RightSB (Hook * 0.5 + Stroke + O * 2)
g4 (RightSB + Hook * 0.25) (Stroke * 0.75 + O * 2)
include : VerticalHook (RightSB - HalfStroke * HVContrast) yDHookTopConnect HookX (-Hook)
if SLAB : include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
create-glyph 'dhooktop.toothlessCorner' : glyph-proc
include : MarkSet.b
include : OBarRightToothlessShape XH RightSB DToothlessRise DMBlend
include : VBarRight RightSB DToothlessRise yDHookTopConnect
include : VerticalHook (RightSB - HalfStroke * HVContrast) yDHookTopConnect HookX (-Hook)
if SLAB : include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
create-glyph 'dhooktop.toothlessRounded' : glyph-proc
include : MarkSet.b
include : OBarRightRoundedShape XH RightSB yDHookTopConnect
include : VerticalHook (RightSB - HalfStroke * HVContrast) yDHookTopConnect HookX (-Hook)
if SLAB : include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
select-variant 'dhooktop' 0x257 (follow -- 'd')
create-glyph 'dHookBottom' 0x256 : composite-proc
refer-glyph 'd.toothed'
refer-glyph 'rtailBR'
create-glyph 'dHookTopBottom' 0x1D91 : composite-proc
refer-glyph 'dhooktop.toothed'
refer-glyph 'rtailBR'
with-related-glyphs 'd' 'ddot' 0x1E0B : lambda [src sel] : glyph-proc
include : refer-glyph "dotAbove"
include : Translate (Width - HalfStroke) 0
include [refer-glyph src] AS_BASE
with-related-glyphs 'd' 'latinde' 0x18C : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE
include : HBarTop [mix RightSB SB 0.9] (RightSB + O) CAP
if SLAB : begin
include : DownwardLeftSerif [mix RightSB SB 0.9] CAP VJut
glyph-block-import Letter-Blackboard : BBS BBD BBBarRight
create-glyph 'mathbb/d' 0x1D555 : glyph-proc
include : MarkSet.b
include : BBBarRight RightSB 0 CAP
include : intersection
OShapeOutline.NoOvershoot XH 0 SB (RightSB - BBD - BBS * HVContrast)
VBarLeft (SB + BBD + OX) 0 XH BBS
include : OBarRightShape
right -- RightSB - BBD
top -- XH
stroke -- BBS
glyph-block Letter-Latin-Upper-P : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Metrics : BowlXDepth
glyph-block-import Letter-Blackboard : BBS BBD
glyph-block-export PShape PShapeOutline RevPShape PBarPosY PRotundaShape BBPShape
define [PBarPosY top sw bp] : (top - sw) * bp - sw * PShape.SwBelowBar
define [PRotundaOutlineKnots top mul bp overshoot sw offset endX hook] : begin
local bowlTop (top * 1 - offset)
local bowlBottom : [PBarPosY top sw bp] + offset
local turnRadius : BowlXDepth bowlTop bowlBottom SB RightSB sw
local sma : SmoothAOf (Smooth * 0.9) Width
local smb : SmoothBOf (Smooth * 0.9) Width
local right : RightSB - offset
local turn : YSmoothMidR bowlTop bowlBottom sma smb
return : list
g4 (SB * mul - O) (bowlTop - hook)
hookstart (bowlTop - O)
g4 (right - overshoot) turn
arcvh
flat ([Math.max (endX + 0.01 + sw / 2 * TanSlope) Middle] + CorrectionOMidX * sw * 0.5) bowlBottom
curl endX bowlBottom [heading Leftward]
define [PShapeOutlineKnots top mul bp overshoot sw offset] : begin
local bowlTop (top * 1 - offset)
local bowlBottom : [PBarPosY top sw bp] + offset
local turnRadius : BowlXDepth bowlTop bowlBottom SB RightSB sw
local sma : SmoothAOf (Smooth * 0.9) Width
local smb : SmoothBOf (Smooth * 0.9) Width
local right : RightSB - offset
local turn : YSmoothMidR bowlTop bowlBottom sma smb
return : list
flat (SB * mul - O) bowlTop [heading Rightward]
curl (right - turnRadius - CorrectionOMidX * sw) bowlTop
archv
g4 (right - overshoot) turn
arcvh
flat (right - turnRadius + CorrectionOMidX * sw) bowlBottom
curl (SB * mul - O) bowlBottom [heading Leftward]
define [RevPshapeOutlineKnots top mul bp overshoot sw offset] : begin
local bowlTop (top * 1 - offset)
local bowlBottom ((top - sw) * bp - sw * PShape.SwBelowBar + offset)
local turnRadius : BowlXDepth bowlTop bowlBottom SB RightSB sw
local sma : SmoothAOf (Smooth * 0.9) Width
local smb : SmoothBOf (Smooth * 0.9) Width
local left : SB + offset
local turn : YSmoothMidL bowlTop bowlBottom sma smb
return : list
flat (Width - SB * mul + O) bowlTop [heading Leftward]
curl (left + turnRadius - CorrectionOMidX * sw) bowlTop
archv
g4 (left + overshoot) turn
arcvh
flat (left + turnRadius + CorrectionOMidX * sw) bowlBottom
curl (Width - SB * mul + O) bowlBottom [heading Rightward]
define [PShapeOutline] : params [top [mul PShape.defaultMul] [bp PShape.BarPos] [overshoot PShape.defaultOvershoot] [sw Stroke] [offset 0]] : glyph-proc
include : spiro-outline
PShapeOutlineKnots top mul bp overshoot sw offset
define [PShape] : params [top [mul PShape.defaultMul] [bp PShape.BarPos] [overshoot PShape.defaultOvershoot] [sw Stroke] [slab SLAB] [withBar true]] : glyph-proc
include : dispiro
widths.rhs sw
PShapeOutlineKnots top mul bp overshoot sw 0
if withBar : begin
include : tagged 'strokeL' : VBarLeft (SB * mul) 0 top sw
if slab : begin
include : tagged 'serifLT' : LeftwardTopSerif (SB * mul) top SideJut sw
include : CenterBottomSerif (SB * mul + HalfStroke * HVContrast) 0 Jut sw
define [PRotundaShape] : params [top [mul PShape.defaultMul] [bp PShape.BarPos] [overshoot PShape.defaultOvershoot] [sw Stroke] [slab SLAB] [endX SB] [hook Hook]] : glyph-proc
include : dispiro
widths.rhs sw
PRotundaOutlineKnots top mul bp overshoot sw 0 endX hook
define [RevPShape] : params [top [mul PShape.defaultMul] [bp PShape.BarPos] [overshoot PShape.defaultOvershoot] [sw Stroke] [slab SLAB]] : glyph-proc
include : tagged 'bowl' : dispiro
widths.lhs sw
RevPshapeOutlineKnots top mul bp overshoot sw 0
include : tagged 'strokeR' : VBarRight (Width - SB * mul) 0 top sw
if slab : begin
include : tagged 'serifRT'
RightwardTopSerif (Width - SB * mul) top SideJut sw
include : tagged 'serifRB'
CenterBottomSerif (Width - SB * mul - HalfStroke * HVContrast) 0 Jut sw
set PShape.defaultMul 1.25
set PShape.defaultOvershoot (OX * 2)
set PShape.BarPos (1 - HBarPos)
set PShape.SwBelowBar 0.25
create-glyph 'P' 'P' : glyph-proc
set-width Width
include : MarkSet.capital
include : PShape CAP
if SLAB : begin
include : RightwardBottomSerif (SB * PShape.defaultMul + HalfStroke * HVContrast) 0 MidJutSide
alias 'grek/Rho' 0x3A1 'P'
alias 'cyrl/Er' 0x420 'P'
create-glyph 'Phookleft' 0x1A4 : glyph-proc
include [refer-glyph 'P'] AS_BASE
eject-contour "serifLT"
include : LeftHook (SB * 1.25) CAP
create-glyph 'symbol/currency/pesetaSign' 0x20A7 : glyph-proc
set-width Width
include : MarkSet.capital
include : PShape CAP (mul -- 2) (overshoot -- 0)
if SLAB : include : RightwardBottomSerif (SB * 2 + HalfStroke * HVContrast) 0 MidJutSide
include : Translate (-SB * 0.5) 0
define sw : adviceBlackness2 2 4 CAP
include : HBar [mix 0 SB 0.5] [mix Width RightSB 0.5] [mix CAP [PBarPosY CAP Stroke PShape.BarPos] 0.5] sw
create-glyph 'symbol/currency/rubleSign' 0x20BD : glyph-proc
include [refer-glyph 'P'] AS_BASE ALSO_METRICS
define bar1pos : [PBarPosY CAP Stroke PShape.BarPos] + HalfStroke
include : HOverlayBar [mix SB 0 0.7] (SB + HalfStroke * HVContrast) bar1pos
include : HOverlayBar [mix SB 0 0.7] [mix SB RightSB 0.8] [mix 0 (bar1pos - Stroke) (3 / 4)]
define [BBPShape] : params [[mul PShape.defaultMul] [overshoot PShape.defaultOvershoot]] : glyph-proc
define sb : SB * mul
include : difference
PShape CAP (sw -- BBS) (mul -- mul) (overshoot -- overshoot) (slab -- false)
Rect (CAP - BBS) 0 (sb + HVContrast * BBS / 2) (sb + BBD)
include : VBarLeft sb 0 CAP BBS
include : VBarLeft (sb + BBD) 0 CAP BBS
include : HBarBottom sb (sb + BBD) 0 BBS
include : intersection
PShapeOutline CAP (sw -- BBS) (mul -- mul) (overshoot -- overshoot) (offset -- 1)
VBarRight (RightSB - overshoot - BBD) 0 CAP BBS
create-glyph 'mathbb/P' 0x2119 : composite-proc [MarkSet.capital] [BBPShape]
glyph-block Letter-Latin-Lower-P : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : DToothlessRise DMBlend
create-glyph 'p.eared' : glyph-proc
include : MarkSet.p
include : tagged 'bowl' : OBarLeftShape
include : VBarLeft SB Descender XH
if SLAB : begin
include : tagged 'serifLT' : LeftwardTopSerif SB XH SideJut
include : tagged 'serifLB' : union
LeftwardBottomSerif (SB + HalfStroke * HVContrast) Descender Jut
RightwardBottomSerif (SB + HalfStroke * HVContrast) Descender MidJutSide
set-base-anchor 'overlay' Middle (XH / 2)
create-glyph 'p.motionSerifed' : glyph-proc
include : MarkSet.p
include : tagged 'bowl' : OBarLeftShape
include : VBarLeft SB Descender XH
include : tagged 'serifLT' : LeftwardTopSerif SB XH SideJut
set-base-anchor 'overlay' Middle (XH / 2)
create-glyph 'p.earlessCorner' : glyph-proc
include : MarkSet.p
include : tagged 'bowl' : OBarRightToothlessShape XH RightSB DToothlessRise DMBlend
include : FlipAround Middle (XH / 2)
include : VBarLeft SB Descender (XH - DToothlessRise)
if SLAB : begin
include : tagged 'serifLB' : union
LeftwardBottomSerif (SB + HalfStroke * HVContrast) Descender Jut
RightwardBottomSerif (SB + HalfStroke * HVContrast) Descender MidJutSide
set-base-anchor 'overlay' Middle (XH / 2)
create-glyph 'p.earlessRounded' : glyph-proc
include : MarkSet.p
include : tagged 'bowl' : OBarRightRoundedShape XH RightSB CAP
include : FlipAround Middle (XH / 2)
if SLAB : begin
include : tagged 'serifLB' : union
LeftwardBottomSerif (SB + HalfStroke * HVContrast) Descender Jut
RightwardBottomSerif (SB + HalfStroke * HVContrast) Descender MidJutSide
set-base-anchor 'overlay' Middle (XH / 2)
select-variant 'p' 'p'
alias 'cyrl.er' 0x440 'p'
alias 'grek/rho' 0x3C1 'p.earlessRounded'
glyph-block-import Letter-Blackboard : BBS BBD BBBarLeft
create-glyph 'mathbb/p' 0x1D561 : glyph-proc
include : MarkSet.p
include : BBBarLeft SB Descender XH
include : intersection
OShapeOutline.NoOvershoot XH 0 (SB + BBD + BBS * HVContrast) RightSB
VBarRight (RightSB - BBD - OX) 0 XH BBS
include : OBarLeftShape
left -- SB + BBD
top -- XH
stroke -- BBS
create-glyph 'phooktop' 0x1A5 : glyph-proc
include : MarkSet.if
include : OBarLeftShape
include : HooktopLeftBar nothing Descender
if SLAB : begin
include : tagged 'serifLB' : CenterBottomSerif (SB + HalfStroke * HVContrast) Descender Jut
glyph-block Letter-Latin-Upper-R : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Latin-Upper-P : PShape RevPShape PBarPosY PRotundaShape BBPShape PShapeOutline
glyph-block-import Letter-Blackboard : BBS BBD
### R and CyrYa
glyph-block-export RLegShape RLegTerminalX
define [RLegTerminalX straight right sw] : right - [if straight (OX * 2) 0] - sw / 2 * HVContrast
define [RSlabExtraShift slab sw] : if slab (-Jut / 2 + 0.25 * sw * HVContrast) 0
define [RLegDiagCor top bottom left right extraShift sw] : DiagCor (top - bottom) (right - left - extraShift) 0 sw
define [RLegShape] : params [top bottom left right charTop slab straight sw extraShift] : glyph-proc
local xRightBottom : RLegTerminalX straight right sw
if straight : do
local shift : RSlabExtraShift slab sw
include : dispiro
widths.center (sw * [RLegDiagCor top bottom left right extraShift sw])
corner (left + extraShift + shift / 2) top [heading Downward]
corner (xRightBottom + shift) bottom [heading Downward]
if slab : begin
include : RightwardBottomSerif (xRightBottom + shift + 0.25 * sw * HVContrast) bottom (SideJut + Jut / 8)
: else : begin
include : intersection
Rect top bottom (-Width) (2 * Width)
dispiro
widths.center sw
g4.up.start xRightBottom bottom [heading Upward]
quadcontrols 0 0.4 8
g4 left top
if slab : begin
include : RightwardBottomSerif right bottom (SideJut + Jut / 8)
define [RevRLegTerminalX straight left sw] : left + [if straight (OX * 2) 0] + sw / 2 * HVContrast
define [RevRLegShape] : params [top bottom left right charTop slab straight sw extraShift] : glyph-proc
local xLeftBottom : RevRLegTerminalX straight left sw
if straight : do
local shift : RSlabExtraShift slab sw
include : dispiro
widths.center (sw * [RLegDiagCor top bottom left right extraShift sw])
corner (right + extraShift + shift / 2) top [heading Downward]
corner (xLeftBottom + shift) bottom [heading Downward]
if slab : begin
include : LeftwardBottomSerif (xLeftBottom + shift - 0.25 * sw * HVContrast) bottom (SideJut + Jut / 8)
: else : begin
include : intersection
Rect top 0 (-Width) (2 * Width)
dispiro
widths.center sw
g4.up.start xLeftBottom bottom [heading Upward]
quadcontrols 0 0.4 8
g4 right top
if slab : begin
include : LeftwardBottomSerif left bottom (SideJut + Jut / 8)
define [RBarPos charTop slab] : if slab (0.5 + Stroke * PShape.SwBelowBar / charTop) PShape.BarPos
define [RBarTop p charTop stroke straightBar slab] : (charTop - Stroke) * [fallback p 1] * [RBarPos charTop slab] + [if straightBar 0 (Stroke / 2)]
define [RShape] : params [straightBar top [mul 1] [slab SLAB]] : glyph-proc
include : PShape top (mul -- mul) (bp -- [RBarPos top slab]) (overshoot -- O) (slab -- slab)
local right (RightSB - O - [if SLAB (Jut / 8) 0])
include : RLegShape [RBarTop 1 top Stroke straightBar slab] 0 Middle right top slab straightBar Stroke 0
define [RRotundaShape] : params [straightBar top [mul 1] [pmRotunda 0] [endX Middle] [hook Hook] [pBar 1]] : glyph-proc
local legTop : RBarTop pBar top Stroke straightBar SLAB
local right (RightSB - O - [if SLAB (Jut / 8) 0])
local cor : RLegDiagCor legTop 0 endX right 0 Stroke
local endX1 : endX - [if straightBar (HalfStroke * cor * HVContrast) HalfStroke] + [if straightBar [RSlabExtraShift SLAB Stroke] 0]
include : PRotundaShape top (mul -- mul) (bp -- (pBar * [RBarPos top false])) (overshoot -- O) (slab -- false) (endX -- endX1) (hook -- hook)
include : RLegShape legTop 0 endX right top SLAB straightBar Stroke 0
define [RevRShape] : params [straightBar top [mul 1] [slab SLAB]] : glyph-proc
include : RevPShape top (mul -- mul) (bp -- [RBarPos top slab]) (overshoot -- O) (slab -- slab)
local left (SB + O + [if SLAB (Jut / 8) 0])
include : RevRLegShape [RBarTop 1 top Stroke straightBar slab] 0 left Middle top slab straightBar Stroke 0
create-glyph : glyph-proc
include : MarkSet.capital
create-derived 'R.straight' : glyph-proc
include : RShape true CAP
set-base-anchor 'overlay'
SB + Stroke * HVContrast
PBarPosY CAP Stroke : RBarPos CAP SLAB
create-derived 'Rrotunda.straight' : glyph-proc
include : RRotundaShape true CAP (hook -- Hook) (pBar -- 0.9)
set-base-anchor 'overlay'
SB + Stroke * HVContrast
PBarPosY CAP Stroke : RBarPos CAP 0
create-derived 'R.curly' : glyph-proc
include : RShape false CAP
set-base-anchor 'overlay'
SB + Stroke * HVContrast
PBarPosY CAP Stroke : RBarPos CAP SLAB
create-derived 'Rrotunda.curly' : glyph-proc
include : RRotundaShape false CAP (hook -- Hook) (pBar -- 0.9)
set-base-anchor 'overlay'
SB + Stroke * HVContrast
PBarPosY CAP Stroke : RBarPos CAP 0
define [IndianRupeeShape suffix straightBar] : glyph-proc
define bp : RBarPos CAP 0
include : intersection
Rect CAP 0 SB Width
WithTransform [Translate (-Width / 8) 0]
PShape CAP (bp -- bp) (slab -- false) (withBar -- false)
local right : RightSB - O - [if straightBar 0 (Width / 16)]
include : RLegShape [RBarTop 1 CAP Stroke straightBar false] 0 (Width * 0.375) right CAP false straightBar Stroke 0
define sw : adviceBlackness2 2 4 CAP
include : HBarTop SB RightSB CAP sw
include : HBar SB RightSB [mix CAP [PBarPosY CAP Stroke bp] 0.5] sw
create-glyph 'symbol/currency/indianRupeeSign.straight' : IndianRupeeShape 'straight' true
create-glyph 'symbol/currency/indianRupeeSign.curly' : IndianRupeeShape 'curly' false
create-glyph : glyph-proc
include : MarkSet.e
create-derived 'smcpR.straight' : glyph-proc
include : RShape true XH
create-derived 'rrotunda.straight' : glyph-proc
include : RRotundaShape true XH (hook -- AHook) (endX -- [mix Middle RightSB 0.125])
create-derived 'smcpR.curly' : glyph-proc
include : RShape false XH
create-derived 'rrotunda.curly' : glyph-proc
include : RRotundaShape false XH (hook -- AHook) (endX -- [mix Middle RightSB 0.125])
select-variant 'R' 'R'
select-variant 'Rrotunda' 0xA75A (follow -- 'R')
select-variant 'symbol/currency/indianRupeeSign' 0x20B9 (follow -- 'R')
select-variant 'smcpR' 0x280 (follow -- 'R')
select-variant 'rrotunda' 0xA75B (follow -- 'R')
with-related-glyphs 'R' 'Rbar' 0x24C : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
include : HBar [mix 0 SB 0.3] (SB - O) ((CAP - Stroke) * [RBarPos CAP SLAB] + Stroke * 0.25)
with-related-glyphs 'smcpR' 'turnSmcpR' 0x1D1A : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
include : FlipAround Middle (XH / 2)
create-glyph : glyph-proc
include : MarkSet.if
local top : CAP * 0.85
local bp 0.45
include : PShape top (mul -- 1) (bp -- bp)
include : VBarLeft SB (top - 1) CAP
local right (RightSB - O - [if SLAB (Jut / 8) 0])
create-derived 'Yr.straight'
RLegShape ((top - Stroke) * bp) Descender Middle right (top - Descender) SLAB true Stroke 0
create-derived 'Yr.curly'
RLegShape ((top - Stroke) * bp) Descender Middle right (top - Descender) SLAB false Stroke 0
select-variant 'Yr' 0x1A6 (follow -- 'R')
create-glyph : glyph-proc
include : MarkSet.capital
create-derived 'cyrl/Ya.straight' : RevRShape true CAP
create-derived 'cyrl/Ya.curly' : RevRShape false CAP
create-glyph : glyph-proc
include : MarkSet.e
create-derived 'cyrl/ya.straight' : RevRShape true XH
create-derived 'cyrl/ya.curly' : RevRShape false XH
select-variant 'cyrl/Ya' 0x42F (follow -- 'R')
select-variant 'cyrl/ya' 0x44F (follow -- 'R')
turned 'invsmcpR.straight' nothing 'cyrl/ya.straight' Middle (XH / 2)
turned 'invsmcpR.curly' nothing 'cyrl/ya.curly' Middle (XH / 2)
select-variant 'invsmcpR' 0x281 (follow -- 'R')
create-glyph 'mathbb/R' 0x211D : glyph-proc
define [SingleLeg] : RLegShape ((CAP - BBS) * HBarPos) 0 Middle (RightSB - O) CAP false true BBS (BBD / 2)
define terminalX : RLegTerminalX true (RightSB - O) BBS
include : MarkSet.capital
include : BBPShape (mul -- 1) (overshoot -- O)
include : difference
union
SingleLeg
new-glyph : glyph-proc
include : SingleLeg
include : Translate (0 - BBD) 0
HBarBottom (terminalX - BBD) (terminalX - BBS / 2) 0 BBS
PShapeOutline CAP (sw -- BBS) (mul -- 1) (overshoot -- O) (offset -- 1)
glyph-block Letter-Latin-Lower-R : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : DToothlessRise DMBlend
local dfN : DivFrame 1
local dfR : DivFrame para.diversityF
local rStraight 0
local rSerifed 1
local rNarrow 2
local rEarless 3
define [RDim df mode _strokeBar _stroke] : begin
local strokeBar : fallback _strokeBar Stroke
local stroke : fallback _stroke Stroke
local strokeA : mix strokeBar stroke 0.5
local rBalanceMultiplier : match mode [0 1] [1 (4 / 3)] [2 (1 / 2)] [3 1]
local rHookMultiplier : match mode [0 1] [1 (2 / 3)] [2 1] [3 1]
local rHookSwMultiplier : match mode [0 0] [1 (1 / 4)] [2 0] [3 0]
local rSerifLeftExtender : match mode [0 0] [1 (1 / 3)] [2 0] [3 0]
local hookSuperness : match mode [0 2.35] [1 2.75] [2 2.35] [3 2.35]
local rbar : SB + RBalance * rBalanceMultiplier + strokeBar * HVContrast
local rSerifX : rbar - strokeBar / 2 * HVContrast
local rSerifLeftJut : SideJut + RBalance * (0.3 + rSerifLeftExtender)
local rSerifRightJut : rSerifLeftJut * 1.20
local [rBottomSerif y] : tagged 'serifLB' : union
LeftwardBottomSerif rSerifX y (rSerifLeftJut + (strokeBar / 2) * HVContrast)
RightwardBottomSerif rSerifX y (rSerifRightJut + (strokeBar / 2) * HVContrast)
local [rTopSerif y] : tagged 'serifLT'
LeftwardTopSerif rSerifX y (rSerifLeftJut + (strokeBar / 2) * HVContrast)
local fine : ShoulderFine * CThin
local rHookX : df.rightSB + RBalance2 * rBalanceMultiplier - (OX - O)
local rmiddle : match mode
0 : mix (rbar - fine) rHookX (0.54 + 2 * TanSlope * strokeBar / Width)
1 : mix (rbar - fine) rHookX (0.59 + 2 * TanSlope * strokeBar / Width)
2 : mix rHookX df.width (3 / 8)
3 : mix (rbar - strokeBar * HVContrast) rHookX 0.5
local mixpin : match mode
0 : 0.65 + 4 * TanSlope * strokeA / Width
1 : 0.65 + 0.25 * strokeA / Width + 4 * TanSlope * strokeA / Width
2 : 0.65 + 4 * TanSlope * strokeA / Width
3 : 0.65 + 4 * TanSlope * strokeA / Width
local rmiddlein : [mix rbar (rHookX - strokeA * HVContrast * 1.05) mixpin] - CorrectionOMidS
local skew : Math.max 0 : (rmiddle - rmiddlein) / stroke
local rHookY : RHook * rHookMultiplier + stroke * rHookSwMultiplier
return : object rbar rBottomSerif rTopSerif fine rmiddle skew rHookX rHookY hookSuperness
define [StandardLowerRShape df md doTopSerif doBottomSerif] : glyph-proc
define [object rbar rBottomSerif rTopSerif fine rmiddle skew rHookX rHookY hookSuperness] : RDim df md
include : dispiro
widths.lhs
g4.up.start rHookX (XH - rHookY - Stroke * 0.5) [heading Upward]
arcvh nothing hookSuperness
g4.left.mid (rmiddle - CorrectionOMidS * [linreg 72 0.75 108 1 Stroke]) (XH - O) [widths.heading Stroke 0 {.y (-1) .x (-skew)}]
archv
straight.down.end (rbar - fine * HVContrast) (XH * 0.53 + (SmallSmooth - SmallSmoothA)) [widths.heading fine 0 Downward]
include : VBarRight rbar 0 XH
set-base-anchor 'overlay' (rbar - Stroke * 0.25) (XH * 0.5)
if doBottomSerif : include : rBottomSerif 0
if doTopSerif : include : rTopSerif XH
define [NarrowLowerRshape df md doTopSerif doBottomSerif] : glyph-proc
define [object rbar fine rmiddle] : RDim df md
include : dispiro
widths.lhs
g4.left.mid (rmiddle - CorrectionOMidS * [linreg 72 0.75 108 1 Stroke]) (XH - O)
archv
straight.down.end (rbar - fine * HVContrast) (XH * 0.53 + (SmallSmooth - SmallSmoothA)) [widths.heading fine 0 Downward]
include : VBarRight rbar 0 XH
set-base-anchor 'overlay' (rbar - Stroke * 0.25) (XH * 0.5)
define [EarlessCornerLowerRShape df md doTopSerif doBottomSerif] : glyph-proc
define [object rbar rmiddle rHookX rHookY hookSuperness] : RDim df md
include : dispiro
widths.lhs
g4.up.start rHookX (XH - rHookY - Stroke * 0.5) [heading Upward]
arcvh nothing hookSuperness
g4.left.mid (rmiddle - CorrectionOMidS) (XH - O) [heading Leftward]
g4 (rbar - Stroke * HVContrast) (XH - DToothlessRise)
include : VBarRight rbar 0 (XH - DToothlessRise)
set-base-anchor 'overlay' (rbar - Stroke * 0.25) (XH * 0.5)
define [EarlessRoundedLowerRShape df md doTopSerif doBottomSerif] : glyph-proc
define [object rbar rmiddle rHookX rHookY hookSuperness] : RDim df md
local hx : Math.max rHookX (rbar + 1.25 * Stroke)
include : dispiro
widths.lhs
g4 hx (XH - rHookY)
hookstart (XH - O)
flat (rbar - Stroke * HVContrast) (XH - SmallSmoothA)
curl (rbar - Stroke * HVContrast) 0 [heading Downward]
set-base-anchor 'overlay' (rbar - Stroke * 0.25) (XH * 0.5)
create-glyph : glyph-proc
set-width dfR.width
include : dfR.markSet.e
create-derived "r.straight" : StandardLowerRShape dfN rStraight 0 0
create-derived "r.serifed" : StandardLowerRShape dfN rSerifed 1 1
create-derived "r.top-serifed" : StandardLowerRShape dfN rSerifed 1 0
create-derived "r.earlessCorner" : EarlessCornerLowerRShape dfN rEarless 0 0
create-derived "r.earlessRounded" : EarlessRoundedLowerRShape dfN rEarless 0 0
create-glyph 'r.narrow' : glyph-proc
set-width dfR.width
include : dfR.markSet.e
include : NarrowLowerRshape dfR rNarrow 0 0
select-variant 'r' 'r'
glyph-block-import Letter-Blackboard : BBS BBD BBBarRight
define [BBRShape df md doTopSerif doBottomSerif] : glyph-proc
define [object rbar fine rmiddle skew rHookX rHookY hookSuperness] : RDim df md BBD BBS
include : dispiro
widths.lhs BBS
g4.up.start rHookX (XH - rHookY - BBS * 0.5) [heading Upward]
arcvh nothing hookSuperness
g4.left.mid (rmiddle - CorrectionOMidS * [linreg 72 0.75 108 1 BBS]) (XH - O) [widths.heading BBS 0 {.y (-1) .x (-skew)}]
archv
straight.down.end (rbar - fine * HVContrast) (XH * 0.53 + (SmallSmooth - SmallSmoothA)) [widths.heading fine 0 Downward]
include : BBBarRight rbar 0 XH
set-base-anchor 'overlay' (rbar - HVContrast * (BBD + BBS * 2) * 0.25) (XH * 0.5)
create-glyph 'mathbb/r' 0x1D563 : glyph-proc
include : dfR.markSet.e
include : BBRShape dfN rStraight 0 0
define [HalfAdvance] : this.advanceWidth / 2
define [TurnRMarks k] : glyph-proc
local df : DivFrame (currentGlyph.advanceWidth / Width)
local mx : compositeBaseAnchors [df.markSet.(k)]
begin {.baseAnchors {.bottomright {.x (df.rightSB - RBalance) .y 0}}}
include mx
turned 'turnr' 0x279 'r' HalfAdvance (XH / 2) [TurnRMarks 'e']
do
define [SmallRLongLegShape F df mode doTopSerif] : glyph-proc
set-width df.width
include : df.markSet.p
define [object rbar rBottomSerif] : RDim df mode
include : F df mode doTopSerif 0
eject-contour 'serifLB'
include : VBarRight rbar Descender 0
if SLAB : include : rBottomSerif Descender
create-glyph 'rlongleg.straight'
SmallRLongLegShape StandardLowerRShape dfN rStraight 0
create-glyph 'rlongleg.serifed'
SmallRLongLegShape StandardLowerRShape dfN rSerifed 1
create-glyph 'rlongleg.top-serifed'
SmallRLongLegShape StandardLowerRShape dfN rSerifed 1
create-glyph 'rlongleg.earlessCorner'
SmallRLongLegShape EarlessCornerLowerRShape dfN rEarless 0
create-glyph 'rlongleg.earlessRounded'
SmallRLongLegShape EarlessRoundedLowerRShape dfN rEarless 0
create-glyph 'rlongleg.narrow'
SmallRLongLegShape NarrowLowerRshape dfR rNarrow 0
select-variant 'rlongleg' 0x27C (follow -- 'r')
turned 'turnrlongleg' 0x27A 'rlongleg' HalfAdvance (XH / 2) [TurnRMarks 'b']
do
define [SmallRRTailShape F df mode doTopSerif] : glyph-proc
set-width df.width
include : df.markSet.p
define [object rbar] : RDim df mode
include : F df mode doTopSerif 0
eject-contour 'serifLB'
include : new-glyph : glyph-proc
include : refer-glyph "rtailBR"
include : Upright
include : Translate rbar 0
include : Italify
create-glyph 'rrtail.straight'
SmallRRTailShape StandardLowerRShape dfN rStraight 0
create-glyph 'rrtail.serifed'
SmallRRTailShape StandardLowerRShape dfN rSerifed 1
create-glyph 'rrtail.top-serifed'
SmallRRTailShape StandardLowerRShape dfN rSerifed 1
create-glyph 'rrtail.earlessCorner'
SmallRRTailShape EarlessCornerLowerRShape dfN rEarless 0
create-glyph 'rrtail.earlessRounded'
SmallRRTailShape EarlessRoundedLowerRShape dfN rEarless 0
create-glyph 'rrtail.narrow'
SmallRRTailShape NarrowLowerRshape dfR rNarrow 0
select-variant 'rrtail' 0x27D (follow -- 'r')
turned 'smallLetterTurnedRWithTail' 0x2C79 'rrtail' HalfAdvance (XH / 2) : glyph-proc
local df : DivFrame (currentGlyph.advanceWidth / Width)
include : df.markSet.b
do
define [TurnRRTailShape F df mode doBottomSerif] : glyph-proc
set-width df.width
include : df.markSet.p
define [object rbar] : RDim df mode
include : F df mode 0 doBottomSerif
eject-contour 'serifLT'
include : FlipAround df.middle (XH / 2)
include : new-glyph : glyph-proc
include : refer-glyph "rtailBR"
include : Upright
include : Translate (df.rightSB - rbar + df.leftSB + Stroke * HVContrast) 0
include : Italify
create-glyph 'turnrrtail.straight'
TurnRRTailShape StandardLowerRShape dfN rStraight 0
create-glyph 'turnrrtail.serifed'
TurnRRTailShape StandardLowerRShape dfN rSerifed 1
create-glyph 'turnrrtail.top-serifed'
TurnRRTailShape StandardLowerRShape dfN rSerifed 0
create-glyph 'turnrrtail.narrow'
TurnRRTailShape NarrowLowerRshape dfR rNarrow 0
select-variant 'turnrrtail' 0x27B
create-glyph 'rflap.straight' : glyph-proc
set-width dfN.width
include : dfN.markSet.e
define [object rBottomSerif] : RDim dfN rEarless
include : EarlessRoundedLowerRShape dfN rEarless 0 0
create-derived 'rflap.serifed' : rBottomSerif 0
create-glyph 'rflap.narrow' : glyph-proc
set-width dfR.width
include : dfR.markSet.e
define [object rbar rBottomSerif rmiddle] : RDim dfR rNarrow
include : dispiro
widths.lhs
g4.left.start (rmiddle - CorrectionOMidS * [linreg 72 0.75 108 1 Stroke]) (XH - O)
archv
flat (rbar - Stroke * HVContrast) (XH - SmallSmoothA)
curl (rbar - Stroke * HVContrast) 0 [heading Downward]
if SLAB : include : rBottomSerif 0
select-variant 'rflap' 0x27E
glyph-block Letter-Latin-C : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : CurlyTail
glyph-block-import Letter-Blackboard : BBS BBD
define [CShapeT sink offset top bot sw] : sink
widths.lhs sw
g4 RightSB (top - Hook)
hookstart (top - O - offset)
flat (SB + OX + offset) (top - SmoothA)
curl (SB + OX + offset) (bot + SmoothB)
hookend (bot + O + offset)
g4 RightSB (bot + Hook)
glyph-block-export CShape
define [CShape top bot sw] : CShapeT dispiro 0 top bot sw
define [CShapeOutline top bot sw] : CShapeT spiro-outline 1 top bot sw
define [RevCShape top bot sw] : dispiro
widths.rhs sw
g4 SB (top - Hook)
hookstart (top - O)
flat (RightSB - OX) (top - SmoothA)
curl (RightSB - OX) (bot + SmoothB)
hookend (bot + O)
g4 SB (bot + Hook)
create-glyph 'C' 'C' : glyph-proc
set-width Width
include : MarkSet.capital
include : CShape CAP 0
create-glyph 'revC' 0x2183 : glyph-proc
include : MarkSet.capital
include : RevCShape CAP 0
alias 'cyrl/Es' 0x421 'C'
alias 'grek/lunateSigma' 0x3F9 'C'
create-glyph 'mathbb/C' 0x2102 : glyph-proc
include : MarkSet.capital
include : CShape CAP 0 BBS
include : intersection
CShapeOutline CAP 0 BBS
VBarLeft (SB + BBD) 0 CAP BBS
create-glyph 'symbol/currency/euroSign' 0x20AC : glyph-proc
include [refer-glyph "C"] AS_BASE ALSO_METRICS
include : HOverlayBar [mix SB 0 0.7] [mix SB RightSB 0.7] (CAP * 0.4)
include : HOverlayBar [mix SB 0 0.7] [mix SB RightSB 0.7] (CAP * 0.6)
define [SmallCShapeT sink offset top bot sw] : sink
widths.lhs sw
g4 (RightSB - offset) (top - Hook)
hookstart (top - O - offset)
flat (SB + OX + offset) (top - SmallSmoothA)
curl (SB + OX + offset) (bot + SmallSmoothB)
hookend (bot + O + offset)
g4 (RightSB - offset) (bot + Hook)
create-glyph 'c' 'c' : glyph-proc
set-width Width
include : MarkSet.e
include : SmallCShapeT dispiro 0 XH 0 Stroke
create-glyph 'mathbb/c' 0x1D554 : glyph-proc
include : MarkSet.capital
include : SmallCShapeT dispiro 0 XH 0 BBS
include : intersection
SmallCShapeT spiro-outline 1 XH 0 BBS
VBarLeft (SB + BBD + OX) 0 CAP BBS
create-glyph 'revSmallC' 0x2184 : glyph-proc
set-width Width
include : MarkSet.e
include : dispiro
widths.rhs
g4 SB (XH - Hook)
hookstart (XH - O)
flat (RightSB - OX) (XH - SmallSmoothA)
curl (RightSB - OX) (0 + SmallSmoothB)
hookend O
g4 SB Hook
alias 'cyrl/es' 0x441 'c'
alias 'grek/lunatesigma' 0x3F2 'c'
create-glyph 'symbol/currency/centSign' 0xA2 : glyph-proc
define fine : adviceBlackness 4
include [refer-glyph 'c'] AS_BASE ALSO_METRICS
include : dispiro
widths.center
flat Middle (XH - HalfStroke)
curl Middle (XH - Descender / 2) [heading Upward]
include : dispiro
widths.center
flat Middle (Descender / 2) [heading Upward]
curl Middle HalfStroke
include : VBar Middle (XH - HalfStroke) (0 + HalfStroke) fine
turned 'turnC' 0x186 'C' Middle (CAP / 2)
turned 'turnc' 0x254 'c' Middle (XH / 2)
create-glyph 0x37B : composite-proc [refer-glyph 'turnc']
create-glyph 0x3FD : composite-proc [refer-glyph 'turnC']
create-glyph 0x37C : composite-proc [refer-glyph 'c']
DotAt (Middle + HalfStroke / 4) (XH/2) DotRadius
create-glyph 0x37D : composite-proc [refer-glyph 'turnc']
DotAt (Middle - HalfStroke / 4) (XH/2) DotRadius
create-glyph 0x3FE : composite-proc [refer-glyph 'C']
DotAt (Middle + HalfStroke / 4) (CAP/2) DotRadius
create-glyph 0x3FF : composite-proc [refer-glyph 'turnC']
DotAt (Middle - HalfStroke / 4) (CAP/2) DotRadius
create-glyph 'strenchedC' 0x297 : glyph-proc
set-width Width
include : MarkSet.p
include : CShape XH Descender
create-glyph 'Chooktop' 0x187 : glyph-proc
include [refer-glyph 'C'] AS_BASE
include : VBarRight (RightSB - OXHook) (CAP - Hook) CAP
include : VerticalHook (RightSB - HalfStroke * HVContrast - OXHook) CAP HookX (-Hook)
create-glyph 'chooktop' 0x188 : glyph-proc
include [refer-glyph 'c'] AS_BASE
include : VBarRight (RightSB - OXHook) (XH - Hook) XH
include : VerticalHook (RightSB - HalfStroke * HVContrast - OXHook) XH HookX (-Hook)
create-glyph 'Cbar' 0xA792 : glyph-proc
include [refer-glyph 'C'] AS_BASE
include : HOverlayBar (SB * 0.3) [mix (SB + Stroke) (RightSB - Stroke) 0.55] (CAP * OverlayPos)
create-glyph 'cbar' 0xA793 : glyph-proc
include [refer-glyph 'c'] AS_BASE
include : HOverlayBar (SB * 0.3) [mix (SB + Stroke) (RightSB - Stroke) 0.55] (XH * OverlayPos)
create-glyph 'ccurlytail' 0x255 : glyph-proc
include : MarkSet.e
local stroke : adviceBlackness2 2 3 XH
local fine : adviceBlackness2 3 3 XH
local rinner : ((XH * 0.45) - fine * 1.5) / 2
local m1 : SB + O + stroke * HVContrast
local x2 : SB + stroke * 0.3
local y2 : -XH * 0.05
include : dispiro
widths.lhs stroke
g4 RightSB (XH - Hook)
hookstart XH
flat (SB + OX) (XH - SmallSmoothA)
curl (SB + OX) SmallSmoothB
arcvh
CurlyTail fine rinner m1 0 RightSB x2 y2
create-glyph 'cyrl/E' 0x42D : glyph-proc
include [refer-glyph "C"] AS_BASE
include : FlipAround Middle (CAP / 2)
include : HBar [mix SB RightSB 0.25] RightSB (CAP / 2)
create-glyph 'cyrl/e' 0x44D : glyph-proc
include [refer-glyph "c"] AS_BASE
include : FlipAround Middle (XH / 2)
include : HBar [mix SB RightSB 0.25] RightSB (XH / 2)
create-glyph 'cyrl/Ye' 0x404 : glyph-proc
include [refer-glyph "C"] AS_BASE
include : HBar SB [mix RightSB SB 0.25] (CAP / 2) [adviceBlackness2 2 4 CAP]
create-glyph 'cyrl/ye' 0x454 : glyph-proc
include [refer-glyph "c"] AS_BASE
include : HBar SB [mix RightSB SB 0.25] (XH / 2) [adviceBlackness2 2 4 XH]
create-glyph 'grek/sigma' 0x3C3 : glyph-proc
include : MarkSet.e
include : spiro-outline
corner (RightSB + 0.25 * SB) XH
corner (RightSB + 0.25 * SB) (XH - Stroke)
corner Middle (XH - Stroke - O * 1.5)
corner Middle (XH - O)
include : dispiro
widths.lhs
flat (Middle + 1) (XH - O)
curl Middle (XH - O)
archv
flat (SB + OX) (XH - SmallSmoothA)
curl (SB + OX) SmallSmoothB
arcvh
g4 (Middle + CorrectionOMidS) O
archv
flat (RightSB - OX * 0.5) SmallSmoothA
curl (RightSB - OX * 0.5) (XH - SmallSmoothB)
arcvh
flat Middle (XH - HalfStroke - O) [widths HalfStroke 0]
curl (Middle - 1) (XH - HalfStroke - O)
create-glyph 'grek/sigmaFinal' 0x3C2 : glyph-proc
include : MarkSet.p
include : dispiro
widths.lhs
g4 RightSB (XH - Hook)
hookstart XH
flat (SB + OX) (XH - SmallSmoothA)
curl (SB + OX) SmallSmoothB
arcvh
g4 (Middle + CorrectionOMidS) 0
alsoThru 0.5 0.1353
g4.down.mid (RightSB - Stroke * HVContrast + OX) [mix Descender Stroke : StrokeWidthBlend 0.5 0.49] [heading Downward]
arcvh
flat (RightSB - HookX + OX) (Descender + Stroke) [heading Leftward]
curl [Math.min (RightSB - Stroke * HVContrast * 1.5) (RightSB - HookX + OX - 1)] (Descender + Stroke) [heading Leftward]
glyph-block Letter-Latin-Upper-G : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
define [GShape fTooth top sma smb] : glyph-proc
local yBar : top * 0.52 + Stroke * 0.25
local fine ShoulderFine
local sb : shoulderMidSlope fine nothing (-1)
local knots : list
widths.lhs
g4 RightSB (top - Hook)
hookstart (top - O)
flat (SB + OX) (top - sma)
curl (SB + OX) smb
arcvh
if fTooth
: then : knots.push
g4.right.mid (Middle + (CorrectionOMidX - sb) * Stroke) O [widths.heading Stroke 0 {.y (1) .x (sb)}]
archv
straight.up.end (RightSB - (Stroke - fine) * HVContrast) sma [widths.heading fine 0 Upward]
: else : knots.push
g4 (Middle + CorrectionOMidS) O
flat RightSB sma
curl RightSB yBar [heading Upward]
include : union
dispiro.apply null knots
HBarTop Middle RightSB yBar
if fTooth
then : union
VBarRight RightSB (sma + O) yBar
VBarRight RightSB sma 0 [Math.max [adviceBlackness 5] (Stroke - fine / 2)]
else : glyph-proc
define [HookTopShapeOfG top] : union
VBarRight (RightSB - OXHook) (top - Hook) top
VerticalHook (RightSB - HalfStroke * HVContrast - OXHook) top HookX (-Hook) nothing O
define [OverlayBarOfG top] : HOverlayBar [mix SB RightSB 0.5] [mix RightSB Width 0.7] [mix 0 (top / 2) 0.55]
create-glyph : glyph-proc
include : MarkSet.capital
create-derived 'G.toothed' : glyph-proc
include : GShape true CAP SmoothA SmoothB
create-derived 'Ghooktop.toothed' : HookTopShapeOfG CAP
create-derived 'Gbar.toothed' : OverlayBarOfG CAP
create-derived 'G.toothless' : glyph-proc
include : GShape false CAP SmoothA SmoothB
create-derived 'Ghooktop.toothless' : HookTopShapeOfG CAP
create-derived 'Gbar.toothless' : OverlayBarOfG CAP
create-glyph : glyph-proc
include : MarkSet.e
create-derived 'smcpG.toothed' : glyph-proc
include : GShape true XH SmoothA SmoothB
create-derived 'smcpGhooktop.toothed' : HookTopShapeOfG XH
create-derived 'smcpG.toothless' : glyph-proc
include : GShape false XH SmoothA SmoothB
create-derived 'smcpGhooktop.toothless' : HookTopShapeOfG XH
select-variant 'G' 'G'
select-variant 'smcpG' 0x262 (follow -- 'G')
select-variant 'Ghooktop' 0x193 (follow -- 'G')
select-variant 'smcpGhooktop' 0x29B (follow -- 'G')
select-variant 'Gbar' 0x1E4 (follow -- 'G')
turned 'turnG' 0x2141 'G' Middle (CAP / 2)
glyph-block-import Letter-Blackboard : BBS BBD BBBarRight
define [BBGArcT sink offset top sma smb xTerm yTerm] : sink
widths.lhs BBS
g4 (RightSB - offset) (top - Hook)
hookstart (top - O - offset)
flat (SB + OX + offset) (top - sma)
curl (SB + OX + offset) smb
arcvh
g4 ([mix SB xTerm 0.5] + CorrectionOMidS) (O + offset)
archv
flat (xTerm - offset) sma
curl (xTerm - offset) yTerm [heading Upward]
create-glyph 'mathbb/G' 0x1D53E : glyph-proc
local yBar : CAP * 0.52 + BBS * 0.25
include : MarkSet.capital
include : BBGArcT dispiro 0 CAP SmoothA SmoothB (RightSB - BBD) yBar
include : intersection
BBGArcT spiro-outline 1 CAP SmoothA SmoothB (RightSB - BBD) yBar
VBarLeft (SB + OX + BBD) 0 CAP BBS
include : BBBarRight RightSB 0 yBar
glyph-block Letter-Latin-Lower-G : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : DToothlessRise DMBlend
create-glyph 'g.doubleStorey' : glyph-proc
include : MarkSet.p
local obot : XH * designParameters.gBarPos - O - Stroke * 0.4
include : OShape XH obot SB (RightSB - 0.3 * SB)
local gleftx ([mix 0 SB 0.85] + OX)
local grightx ([mix Width RightSB 0.825] - OX)
local groundy : Math.round : [mix Descender (XH * designParameters.gBarPos) 0.64] + HalfStroke
local gtipy : [mix groundy (obot + Stroke + O) 1.005] - Stroke * CThin
include : dispiro
g4.left.start [mix SB RightSB 0.4] gtipy [widths 0 (Stroke * CThin)]
g4 ([mix SB RightSB 0.0575] + Stroke * 0.85) [mix groundy gtipy 0.5] [widths.rhs (Stroke * [mix CThin 1 0.5])]
flat [mix SB RightSB 0.435] groundy [widths 0 Stroke]
curl [mix RightSB SB 0.435] groundy
archv 4
g4 grightx [mix (Descender + O) groundy (1.06 * SmallSmoothA / (SmallSmoothA + SmallSmoothB))]
arcvh
g4 (Middle + CorrectionOMidS) (Descender + O)
archv
g4 gleftx [mix (Descender + O) groundy (1.06 * SmallSmoothB / (SmallSmoothA + SmallSmoothB))]
arcvh
g4 [mix SB RightSB 0.435] groundy [heading Rightward]
local gm : mix SB (RightSB - 0.3 * SB) 0.5
include : spiro-outline
corner (RightSB + 0.25 * SB - OX) XH
corner (RightSB + 0.25 * SB - OX) (XH - Stroke)
corner gm (XH - Stroke - O)
corner gm XH
set-base-anchor 'overlay' Middle [mix (Descender + O) groundy 0.5]
create-glyph 'g.openDoubleStorey' : glyph-proc
include : MarkSet.p
local obot : XH * designParameters.gBarPos - O - Stroke * 0.4
include : OShape XH obot SB (RightSB - 0.3 * SB)
local gleftx ([mix 0 SB 0.85] + OX)
local grightx ([mix Width RightSB 0.825] - OX)
local groundy : Math.round : [mix Descender (XH * designParameters.gBarPos) 0.64] + HalfStroke
local gtipy : [mix groundy (obot + Stroke + O) 1.005] - Stroke * CThin
include : dispiro
g4.left.start [mix SB RightSB 0.4] gtipy [widths 0 (Stroke * CThin)]
g4 ([mix SB RightSB 0.0575] + Stroke * 0.85) [mix groundy gtipy 0.5] [widths.rhs (Stroke * [mix CThin 1 0.5])]
flat [mix SB RightSB 0.435] groundy [widths 0 Stroke]
curl [mix RightSB SB 0.435] groundy
archv 4
g4 grightx [mix (Descender + O) groundy (1.06 * SmallSmoothA / (SmallSmoothA + SmallSmoothB))]
hookend (Descender + O)
g4 gleftx [mix (Descender + O) groundy (1.06 * SmallSmoothB / (SmallSmoothA + SmallSmoothB))]
local gm : mix SB (RightSB - 0.3 * SB) 0.5
include : spiro-outline
corner (RightSB + 0.25 * SB - OX) XH
corner (RightSB + 0.25 * SB - OX) (XH - Stroke)
corner gm (XH - Stroke - O)
corner gm XH
set-base-anchor 'overlay' Middle [mix (Descender + O) groundy 0.5]
define [SmallGSingleStoreyShapeHookT sink offset sw] : sink
widths.rhs sw
[if (sink == spiro-outline) corner flat] (RightSB - offset) XH [heading Downward]
curl (RightSB - offset) (Descender + SmallSmoothA)
hookend (Descender + O + offset)
g4 (SB + offset) (Descender + SHook)
if (sink == spiro-outline) {[corner SB XH]} {}
create-glyph 'g.singleStorey' : glyph-proc
include : MarkSet.p
set-base-anchor 'overlay' Middle (XH / 2)
include : OBarRightShape
include : SmallGSingleStoreyShapeHookT dispiro 0 Stroke
if SLAB : begin
include : tagged 'serifRT' : RightwardTopSerif RightSB XH SideJut
alias 'scriptg' 0x261 'g.singleStorey'
alias 'cyrl/de.SRB' null 'g.singleStorey'
create-glyph 'g.singleStoreyEarlessCorner' : glyph-proc
set-width Width
include : MarkSet.p
set-base-anchor 'overlay' Middle (XH / 2)
include : OBarLeftToothlessShape XH SB DToothlessRise DMBlend
include : FlipAround Middle (XH / 2)
include : dispiro
widths.rhs
flat RightSB (XH - DToothlessRise) [heading Downward]
curl RightSB (Descender + SmallSmoothA)
hookend (Descender + O)
g4 SB (Descender + SHook)
create-glyph 'g.singleStoreyEarlessRounded' : glyph-proc
set-width Width
include : MarkSet.p
set-base-anchor 'overlay' Middle (XH / 2)
include : OBarLeftRoundedShape XH SB (SmallSmoothB - O)
include : FlipAround Middle (XH / 2)
include : dispiro
widths.rhs
flat RightSB (XH - SmallSmoothB) [heading Downward]
curl RightSB (Descender + SmallSmoothA)
hookend (Descender + O)
g4 SB (Descender + SHook)
select-variant 'g' 'g'
turned 'turng' 0x1D77 'g' Middle [mix Descender XH 0.5]
glyph-block-import Letter-Blackboard : BBS BBD BBBarRight
create-glyph 'mathbb/g' 0x1D558 : glyph-proc
include : MarkSet.p
include : intersection
OShapeOutline.NoOvershoot XH 0 SB (RightSB - BBD - BBS * HVContrast)
VBarLeft (SB + BBD + OX) 0 XH BBS
include : OBarRightShape
right -- RightSB - BBD
top -- XH
stroke -- BBS
include : SmallGSingleStoreyShapeHookT dispiro 0 BBS
include : HBarTop (RightSB - BBD) RightSB XH BBS
include : intersection
VBarRight (RightSB - BBD) Descender XH BBS
SmallGSingleStoreyShapeHookT spiro-outline 1 BBS
create-glyph 'scriptghooktop' 0x260 : glyph-proc
include [refer-glyph 'scriptg'] AS_BASE
eject-contour 'serifRT'
include : VerticalHook (RightSB - HalfStroke * HVContrast) XH HookX (-Hook) nothing O
do
define l : mix 0 SB 0.3
define r : mix Width RightSB 0.3
define bwDoubleStorey : Math.min [adviceBlackness 5] (0.5 / 3 * (CAP - Stroke * 4))
define bwSingleStorey : adviceBlackness2 2 4 XH
create-glyph 'gbar.doubleStorey' : glyph-proc
include [refer-glyph "g.doubleStorey"] AS_BASE
include : HBar l r [query-glyph "g.doubleStorey"].baseAnchors.overlay.y bwDoubleStorey
create-glyph 'gbar.openDoubleStorey' : glyph-proc
include [refer-glyph "g.openDoubleStorey"] AS_BASE
include : HBar l r [query-glyph "g.openDoubleStorey"].baseAnchors.overlay.y bwDoubleStorey
create-glyph 'gbar.singleStorey' : glyph-proc
include [refer-glyph "g.singleStorey"] AS_BASE
include : HBar l r [query-glyph "g.singleStorey"].baseAnchors.overlay.y bwSingleStorey
create-glyph 'gbar.singleStoreyEarlessCorner' : glyph-proc
include [refer-glyph "g.singleStoreyEarlessCorner"] AS_BASE
include : HBar l r [query-glyph "g.singleStoreyEarlessCorner"].baseAnchors.overlay.y bwSingleStorey
create-glyph 'gbar.singleStoreyEarlessRounded' : glyph-proc
include [refer-glyph "g.singleStoreyEarlessRounded"] AS_BASE
include : HBar l r [query-glyph "g.singleStoreyEarlessRounded"].baseAnchors.overlay.y bwSingleStorey
select-variant "gbar" 0x1E5 (follow -- 'g')
glyph-block Letter-Latin-O : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Marks : HornBaseAnchor markHalfStroke
glyph-block-import Letter-Blackboard : BBS BBD
create-glyph 'O' 'O' : glyph-proc
include : MarkSet.capital
include : OShape CAP 0 SB RightSB nothing SmoothA SmoothB
set-base-anchor 'trailing' Middle 0
create-glyph 'o' 'o' : glyph-proc
include : MarkSet.e
include : OShape XH 0 SB RightSB nothing nothing nothing
set-base-anchor 'trailing' Middle 0
alias 'grek/Omicron' 0x39F 'O'
alias 'cyrl/O' 0x41E 'O'
alias 'grek/omicron' 0x3BF 'o'
alias 'cyrl/o' 0x43e 'o'
create-glyph 'mathbb/O' 0x1D546 : glyph-proc
include : MarkSet.capital
include : OShape CAP 0 SB RightSB BBS SmoothA SmoothB
include : intersection
OShapeOutline.NoOvershoot CAP 0 SB RightSB BBS SmoothA SmoothB
union
VBarLeft (SB + OX + BBD) 0 CAP BBS
VBarRight (RightSB - OX - BBD) 0 CAP BBS
create-glyph 'mathbb/o' 0x1D560 : glyph-proc
include : MarkSet.e
include : OShape XH 0 SB RightSB BBS
include : intersection
OShapeOutline.NoOvershoot XH 0 SB RightSB BBS
union
VBarLeft (SB + OX + BBD) 0 XH BBS
VBarRight (RightSB - OX - BBD) 0 XH BBS
create-glyph 'OHorn' 0x01A0 : glyph-proc
include : MarkSet.capital
include : HornBaseAnchor RightSB CAP (Width / 2) (SmoothB) 0.5
include : difference
new-glyph : glyph-proc
include : MarkSet.capital
include [refer-glyph 'longHorn']
OShapeOutline.NoOvershoot CAP 0 SB RightSB nothing SmoothA SmoothB
include : refer-glyph "O"
create-glyph 'oHorn' 0x01A1 : glyph-proc
include : MarkSet.e
include : HornBaseAnchor RightSB XH (Width / 2) (SmoothB) 0.5
include : difference
new-glyph : glyph-proc
include : MarkSet.e
include [refer-glyph 'longHorn']
OShapeOutline.NoOvershoot XH 0 SB RightSB nothing nothing nothing
include : refer-glyph "o"
create-glyph 'Oslash' 0xD8 : glyph-proc
local fine : 0.5 * OverlayStroke
include [refer-glyph 'O'] AS_BASE
include : dispiro
flat (SB + O + fine) [mix CAP 0 1.05] [widths fine fine]
curl (RightSB - O - fine) [mix 0 CAP 1.05]
create-glyph 'oslash' 0xF8 : glyph-proc
local fine : 0.5 * OverlayStroke
include [refer-glyph 'o'] AS_BASE
include : dispiro
flat (SB + O + fine) [mix XH 0 1.05] [widths fine fine]
curl (RightSB - O - fine) [mix 0 XH 1.05]
create-glyph 'Obar' 0x19F : glyph-proc
include [refer-glyph 'O'] AS_BASE
include : HBar (SB + OX + 1) (RightSB - OX - 1) (CAP * 0.5) OverlayStroke
create-glyph 'obar' 0x275 : glyph-proc
include [refer-glyph 'o'] AS_BASE
include : HBar (SB + OX + 1) (RightSB - OX - 1) (XH * 0.5) OverlayStroke
create-glyph 'OVBar' 0x2180 : glyph-proc
define df : DivFrame para.diversityM 3
set-width df.width
include : df.markSet.capital
include : OShape CAP 0 df.leftSB df.rightSB df.mvs SmoothA SmoothB
include : VBar Middle (df.mvs / 2) (CAP - df.mvs / 2) df.mvs
set-base-anchor 'trailing' Middle 0
alias 'cyrl/Oe' 0x4E8 'Obar'
alias 'grek/capSymbolTheta' 0x3F4 'Obar'
alias 'cyrl/oe' 0x4E9 'obar'
create-glyph 'bulleye' 0x298 : glyph-proc
include [refer-glyph 'O'] AS_BASE
local halfDotWidth : Math.min DotRadius ((RightSB - SB - HVContrast * Stroke * 2) / 4)
local halfDotHeight : Math.min DotRadius (halfDotWidth * 1.5)
include : OShapeOutline.NoOvershoot
CAP / 2 + halfDotHeight
CAP / 2 - halfDotHeight
Middle + halfDotWidth
Middle - halfDotWidth
Stroke * halfDotWidth * 2 / Width
SmoothAOf halfDotWidth (halfDotWidth * 2)
SmoothBOf halfDotWidth (halfDotWidth * 2)
create-glyph 'oupperhalf' 0x1D16 : glyph-proc
include : MarkSet.e
include : dispiro
widths.rhs
flat (SB + OX) (XH / 2) [heading Upward]
curl (SB + OX) (XH - [Math.min (XH / 2 - 0.1) SmallSmoothA])
arcvh
g4 (Middle - CorrectionOMidS) (XH - O)
archv
flat (RightSB - OX) (XH - [Math.min (XH / 2 - 0.1) SmallSmoothB])
curl (RightSB - OX) (XH / 2) [heading Downward]
create-glyph 'olowerhalf' 0x1D17 : glyph-proc
include : MarkSet.e
include : dispiro
widths.lhs
flat (SB + OX) (XH / 2) [heading Downward]
curl (SB + OX) [Math.min (XH / 2 - 0.1) SmallSmoothB]
arcvh
g4 (Middle + CorrectionOMidS) O
archv
flat (RightSB - OX) [Math.min (XH / 2 - 0.1) SmallSmoothA]
curl (RightSB - OX) (XH / 2) [heading Upward]
create-glyph 'oWithLightCentralizationStroke' : glyph-proc
include : MarkSet.p
include : refer-glyph "o"
local fine : adviceBlackness 4
local outStand : SB * 0.75 + fine * 0.25
local outStandY : SmallSmoothB / 2 - Descender * 0.6
local yTurn : SmallSmoothB / 2
include : difference
dispiro
widths.lhs fine
corner Middle (yTurn + outStandY)
corner (SB - outStand) (yTurn - outStandY)
OShapeOutline.NoOvershoot XH 0 SB RightSB nothing nothing nothing
glyph-block Letter-Latin-Upper-Q : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Blackboard : BBS BBD
create-glyph 'Q.straight' : glyph-proc
set-width Width
include : MarkSet.if
include [refer-glyph 'O']
local shift : StrokeWidthBlend 0 0.25
include : dispiro
widths.rhs
flat (Middle + Width * 0.075 - Stroke * HVContrast * shift) (-CAP * 0.2) [heading Upward]
curl (Middle - Stroke * HVContrast * shift) 0
create-glyph 'Q.taily' : glyph-proc
set-width Width
include : MarkSet.if
include [refer-glyph 'O']
local shift : StrokeWidthBlend 0.5 0.6
local startx : Middle + (Stroke * shift) * HVContrast
local terminalx : Middle + HookX
include : dispiro
widths.rhs
flat startx HalfStroke [heading Downward]
curl startx 0 [heading Downward]
arcvh
flat [Math.min (terminalx - 1) (startx + Hook - Stroke)] (Stroke - Hook)
curl terminalx (Stroke - Hook)
create-glyph 'Q.crossing' : glyph-proc
set-width Width
include : MarkSet.capital
include : OShape CAP 0 SB RightSB [adviceBlackness 3] SmoothA SmoothB
define k 1.5
define cor : DiagCor (k * (RightSB - Middle)) (RightSB - Middle - OX)
include : dispiro
widths.center (cor * [adviceBlackness 4.25])
flat RightSB 0 [heading Upward]
curl (Middle + OX) (k * (RightSB - Middle)) [heading Upward]
select-variant 'Q' 'Q'
alias 'cyrl/Qa' 0x51A 'Q'
create-glyph 'mathbb/Q' 0x211A : glyph-proc
define [QInner] : OShapeOutline.NoOvershoot CAP 0 SB RightSB BBS SmoothA SmoothB
include : MarkSet.capital
include : OShape CAP 0 SB RightSB BBS SmoothA SmoothB
include : intersection
QInner
union
VBarLeft (SB + BBD) 0 CAP BBS
VBarRight (RightSB - BBD) 0 CAP BBS
define terminalX : Middle + HookX
define tailDeltaX : BBD / 2
define qTerminalY : BBS - Hook - BBD / 4
define [QTail x] : dispiro
widths.center BBS
flat (x) (CAP / 2)
curl (x) 0
arcvh
flat [Math.min (terminalX - 1) (x - qTerminalY)] qTerminalY
curl terminalX qTerminalY
include : difference
union
QTail (Middle - tailDeltaX)
QTail (Middle + tailDeltaX)
QInner
glyph-block Letter-Latin-Lower-Q : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Marks : markHalfStroke
glyph-block-import Letter-Latin-Lower-I : TailedIShape
glyph-block-import Letter-Shared-Shapes : RightwardTailedBar DToothlessRise DMBlend
create-glyph 'q.straight' : glyph-proc
set-width Width
include : MarkSet.p
set-base-anchor 'trailing' (RightSB - markHalfStroke) Descender
include : OBarRightShape
include : VBarRight RightSB Descender XH
if SLAB : begin
include : tagged 'serifRT' : RightwardTopSerif RightSB XH SideJut
include : LeftwardBottomSerif (RightSB - HalfStroke * HVContrast) Descender MidJutSide
include : RightwardBottomSerif (RightSB - HalfStroke * HVContrast) Descender Jut
create-glyph 'q.tailed' : glyph-proc
set-width Width
include : MarkSet.p
set-base-anchor 'trailing' (RightSB - markHalfStroke) Descender
include : OBarRightShape
include : RightwardTailedBar RightSB Descender XH
if SLAB : begin
include : tagged 'serifRT' : RightwardTopSerif RightSB XH SideJut
create-glyph 'q.earlessCorner' : glyph-proc
set-width Width
include : MarkSet.p
set-base-anchor 'trailing' (RightSB - markHalfStroke) Descender
include : OBarLeftToothlessShape XH SB DToothlessRise DMBlend
include : FlipAround Middle (XH / 2)
include : VBarRight RightSB Descender (XH - DToothlessRise)
if SLAB : begin
include : LeftwardBottomSerif (RightSB - HalfStroke * HVContrast) Descender MidJutSide
include : RightwardBottomSerif (RightSB - HalfStroke * HVContrast) Descender Jut
create-glyph 'q.earlessCornerTailed' : glyph-proc
set-width Width
include : MarkSet.p
set-base-anchor 'trailing' (RightSB - markHalfStroke) Descender
include : OBarLeftToothlessShape XH SB DToothlessRise DMBlend
include : FlipAround Middle (XH / 2)
include : RightwardTailedBar RightSB Descender (XH - DToothlessRise)
create-glyph 'q.earlessRounded' : glyph-proc
set-width Width
include : MarkSet.p
set-base-anchor 'trailing' (RightSB - markHalfStroke) Descender
include : OBarLeftRoundedShape XH SB CAP
include : FlipAround Middle (XH / 2)
if SLAB : begin
include : LeftwardBottomSerif (RightSB - HalfStroke * HVContrast) Descender MidJutSide
include : RightwardBottomSerif (RightSB - HalfStroke * HVContrast) Descender Jut
create-glyph 'q.earlessRoundedTailed' : glyph-proc
set-width Width
include : MarkSet.p
set-base-anchor 'trailing' (RightSB - markHalfStroke) Descender
include : OBarLeftRoundedShape XH SB (SmallSmoothB - O)
include : FlipAround Middle (XH / 2)
include : RightwardTailedBar RightSB Descender (XH - SmallSmoothB)
select-variant 'q' 'q'
alias 'cyrl/qa' 0x51B 'q'
glyph-block-import Letter-Blackboard : BBS BBD BBBarRight
create-glyph 'mathbb/q' 0x1D562 : glyph-proc
include : MarkSet.p
include : BBBarRight RightSB Descender XH
include : intersection
OShapeOutline.NoOvershoot XH 0 SB (RightSB - BBD - BBS * HVContrast)
VBarLeft (SB + BBD + OX) 0 XH BBS
include : OBarRightShape
right -- RightSB - BBD
top -- XH
stroke -- BBS
create-glyph 'Qrtail' 0x24A : glyph-proc
include : MarkSet.capital
include : OBarRightShape CAP
include : VBarRight RightSB 0 CAP
include : new-glyph : glyph-proc
include : refer-glyph "rtailBR"
include : Upright
include : Translate RightSB 0
include : Italify
if SLAB : begin
include : tagged 'serifRT' : RightwardTopSerif RightSB CAP SideJut
create-glyph 'qrtail' 0x24B : glyph-proc
include : MarkSet.e
include : OBarRightShape
include : VBarRight RightSB 0 XH
include : new-glyph : glyph-proc
include : refer-glyph "rtailBR"
include : Upright
include : Translate RightSB 0
include : Italify
if SLAB : begin
include : tagged 'serifRT' : RightwardTopSerif RightSB XH SideJut
create-glyph 'qhooktop' 0x2A0 : glyph-proc
include [refer-glyph "q.straight"] AS_BASE
eject-contour 'serifRT'
include : VerticalHook (RightSB - HalfStroke * HVContrast) XH HookX (-Hook)
glyph-block Letter-Latin-Upper-N : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Marks : markHalfStroke
glyph-block-export NShape
define [NShape top left right crowd diagcrowd xn] : glyph-proc
local topstroke : adviceBlackness [fallback diagcrowd 4]
local stroke : adviceBlackness [fallback crowd 1]
local halftopstroke : topstroke / 2
include : union
AINSerifs top left right stroke xn
dispiro
flat left 0 [widths.heading 0 stroke Upward]
curl left (top * 0.4) [heading Upward]
straight.up.end left top [widths.heading 0 topstroke Upward]
dispiro
flat right top [widths.heading 0 stroke Downward]
curl right (top * 0.6) [heading Downward]
straight.down.end right 0 [widths.heading 0 topstroke Downward]
dispiro
flat (left + halftopstroke) top [widths.heading topstroke 0 Downward]
curl (right - halftopstroke) 0 [widths.heading 0 topstroke Downward]
create-glyph 'N' 'N' : glyph-proc
set-width Width
include : MarkSet.capital
include : NShape CAP SB RightSB
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
alias 'grek/Nu' 0x39D 'N'
create-glyph 'smcpN' 0x274 : glyph-proc
include : MarkSet.e
include : NShape XH SB RightSB 3 3.5
create-glyph 'symbol/currency/nairaSign' 0x20A6 : glyph-proc
include : NShape CAP (SB * 1.25) (Width - SB * 1.25) 3.5 4
define sw : adviceBlackness2 2 4 CAP
define gap : Math.max (CAP / 6) sw
include : HBarBottom [mix 0 SB 0.5] [mix Width RightSB 0.5] (CAP / 2 + gap / 2) sw
include : HBarTop [mix 0 SB 0.5] [mix Width RightSB 0.5] (CAP / 2 - gap / 2) sw
create-glyph 'Nltail' 0x19D : glyph-proc
include [refer-glyph 'N'] AS_BASE
eject-contour 'serifLB'
include : VerticalHook (SB + HalfStroke * HVContrast) 0 (-HookX) Hook
glyph-block-import Letter-Blackboard : BBS BBD
create-glyph 'mathbb/N' 0x2115 : glyph-proc
include : MarkSet.capital
include : VBarLeft SB 0 CAP BBS
include : VBarRight RightSB 0 CAP BBS
include : intersection
Rect CAP 0 SB RightSB
union
dispiro
widths.center BBS
corner (SB + BBS * HVContrast) CAP
corner (RightSB - BBS * HVContrast / 2) (CAP / 5)
dispiro
widths.center BBS
corner (SB + BBS * HVContrast / 2) (CAP - (CAP / 5))
corner (RightSB - BBS * HVContrast) 0
glyph-block Letter-Latin-Lower-N : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Marks : markHalfStroke
glyph-block-import Letter-Shared-Shapes : RightwardTailedBar CurlyTail nShoulder nShoulderKnots nShoulderMask
glyph-block-import Letter-Shared-Shapes : DToothlessRise DMBlend
define [NTopLeftSerif] : tagged 'serifLT' : LeftwardTopSerif SB XH SideJut
define [NBottomLeftSerif] : if (!para.isItalic)
tagged 'serifLB' : CenterBottomSerif (SB + HalfStroke * HVContrast) 0 Jut
glyph-proc
define [NBottomRightSerif] : if (para.isItalic) [NBottomRightSerifItalic]
tagged 'serifRB' : CenterBottomSerif (RightSB - HalfStroke * HVContrast) 0 Jut
define [NBottomRightSerifItalic] : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
create-glyph 'n.straight' : glyph-proc
set-width Width
include : MarkSet.e
include : VBarLeft SB 0 XH
include : nShoulder
left -- (SB + Stroke * HVContrast)
right -- RightSB
fine -- ShoulderFine
if SLAB : begin
include : NTopLeftSerif
include : NBottomRightSerif
include : NBottomLeftSerif
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
create-glyph 'n.tailed' : glyph-proc
set-width Width
include : MarkSet.e
include : VBarLeft SB 0 XH
include : nShoulder
left -- (SB + Stroke * HVContrast)
right -- RightSB
bottom -- (XH - SmallSmoothB + O)
fine -- ShoulderFine
include : RightwardTailedBar RightSB 0 (XH - SmallSmoothB)
if SLAB : begin
include : NTopLeftSerif
include : NBottomLeftSerif
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
create-glyph 'n.motionSerifedStraight' : glyph-proc
set-width Width
include : MarkSet.e
include : VBarLeft SB 0 XH
include : nShoulder
left -- (SB + Stroke * HVContrast)
right -- RightSB
fine -- ShoulderFine
include : NTopLeftSerif
include : NBottomRightSerifItalic
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
create-glyph 'n.motionSerifedTailed' : glyph-proc
include : MarkSet.e
include : VBarLeft SB 0 XH
include : nShoulder
left -- (SB + Stroke * HVContrast)
right -- RightSB
bottom -- (XH - SmallSmoothB + O)
fine -- ShoulderFine
include : RightwardTailedBar RightSB 0 (XH - SmallSmoothB)
include : NTopLeftSerif
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
create-glyph 'n.earlessCornerStraight' : glyph-proc
set-width Width
include : MarkSet.e
include : VBarLeft SB 0 (XH - DToothlessRise)
include : dispiro
widths.rhs
g4 SB (XH - DToothlessRise)
g4 (Middle - CorrectionOMidS) (XH - O)
archv
flat RightSB (XH - SmallSmoothB)
curl RightSB 0 [heading Downward]
if SLAB : begin
include : NBottomRightSerif
include : NBottomLeftSerif
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
create-glyph 'n.earlessCornerTailed' : glyph-proc
set-width Width
include : MarkSet.e
include : VBarLeft SB 0 (XH - DToothlessRise)
include : dispiro
widths.rhs
g4 SB (XH - DToothlessRise)
g4 (Middle - CorrectionOMidS) (XH - O)
archv
flat RightSB (XH - SmallSmoothB)
curl RightSB (XH - SmallSmoothB + O) [heading Downward]
include : RightwardTailedBar RightSB 0 (XH - SmallSmoothB)
if SLAB : begin
include : NBottomLeftSerif
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
create-glyph 'n.earlessRoundedStraight' : glyph-proc
set-width Width
include : MarkSet.e
include : dispiro
widths.rhs
flat SB 0 [heading Upward]
curl SB (XH - SmallSmoothA)
arcvh
g4 (Middle - CorrectionOMidS) (XH - O)
archv
flat RightSB (XH - SmallSmoothB)
curl RightSB 0 [heading Downward]
if SLAB : begin
include : NBottomRightSerif
include : NBottomLeftSerif
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
create-glyph 'n.earlessRoundedTailed' : glyph-proc
set-width Width
include : MarkSet.e
include : dispiro
widths.rhs
flat SB 0 [heading Upward]
curl SB (XH - SmallSmoothA)
arcvh
g4 (Middle - CorrectionOMidS) (XH - O)
archv
flat RightSB (XH - SmallSmoothB)
curl RightSB (XH - SmallSmoothB + O) [heading Downward]
include : RightwardTailedBar RightSB 0 (XH - SmallSmoothB)
if SLAB : begin
include : NBottomLeftSerif
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
select-variant 'n' 'n'
alias 'cyrl/pe.italicStraight' null 'n.straight'
alias 'cyrl/pe.italicTailed' null 'n.tailed'
alias 'cyrl/pe.italicMotionSerifedStraight' null 'n.motionSerifedStraight'
alias 'cyrl/pe.italicMotionSerifedTailed' null 'n.motionSerifedTailed'
alias 'cyrl/pe.italicEarlessCornerStraight' null 'n.earlessCornerStraight'
alias 'cyrl/pe.italicEarlessCornerTailed' null 'n.earlessCornerTailed'
alias 'cyrl/pe.italicEarlessRoundedStraight' null 'n.earlessRoundedStraight'
alias 'cyrl/pe.italicEarlessRoundedTailed' null 'n.earlessRoundedTailed'
alias 'cyrl/pe.BGR' null 'n'
with-related-glyphs 'n' 'nApostrophe' 0x149 : lambda [src srl] : glyph-proc
include : refer-glyph "commaAbove"
include : Translate (Width + SB - Middle) 0
include [refer-glyph src] AS_BASE
# Eng
create-glyph 'eng.straight' : glyph-proc
include : MarkSet.p
include [refer-glyph 'n.straight'] false
eject-contour 'serifRB'
include : VerticalHook (RightSB - HalfStroke * HVContrast) 0 (-HookX) Hook
create-glyph 'eng.motionSerifedStraight' : glyph-proc
include : MarkSet.p
include [refer-glyph 'n.motionSerifedStraight'] false
eject-contour 'serifRB'
include : VerticalHook (RightSB - HalfStroke * HVContrast) 0 (-HookX) Hook
create-glyph 'eng.earlessCornerStraight' : glyph-proc
include : MarkSet.p
include [refer-glyph 'n.earlessCornerStraight'] false
eject-contour 'serifRB'
include : VerticalHook (RightSB - HalfStroke * HVContrast) 0 (-HookX) Hook
create-glyph 'eng.earlessRoundedStraight' : glyph-proc
include : MarkSet.p
include [refer-glyph 'n.earlessRoundedStraight'] false
eject-contour 'serifRB'
include : VerticalHook (RightSB - HalfStroke * HVContrast) 0 (-HookX) Hook
select-variant 'eng' 0x14B
create-glyph 'Eng' 0x14A : glyph-proc
include : MarkSet.capital
include : nShoulder
left -- (SB + Stroke)
right -- RightSB
top -- CAP
bottom -- (Hook + HalfStroke + O)
sma -- SmoothA
smb -- SmoothB
include : VerticalHook (RightSB - HalfStroke * HVContrast) (Hook + HalfStroke + O) [Math.max ((SB - RightSB) / 2 + HalfStroke) (-HookX)] Hook
include : VBar (SB + HalfStroke * HVContrast) 0 CAP
with-related-glyphs 'n' 'nltail' 0x272 : lambda [src srl] : glyph-proc
include [refer-glyph src] AS_BASE
eject-contour 'serifLB'
include : VerticalHook (SB + HalfStroke * HVContrast) 0 (-HookX) Hook
create-glyph 'nHookBottom.straight' : glyph-proc
include [refer-glyph 'n.straight'] AS_BASE ALSO_METRICS
eject-contour 'serifRB'
include : refer-glyph 'rtailBR'
create-glyph 'nHookBottom.motionSerifedStraight' : glyph-proc
include [refer-glyph 'n.motionSerifedStraight'] AS_BASE ALSO_METRICS
eject-contour 'serifRB'
include : refer-glyph 'rtailBR'
create-glyph 'nHookBottom.earlessCornerStraight' : glyph-proc
include [refer-glyph 'n.earlessCornerStraight'] AS_BASE ALSO_METRICS
eject-contour 'serifRB'
include : refer-glyph 'rtailBR'
create-glyph 'nHookBottom.earlessRoundedStraight' : glyph-proc
include [refer-glyph 'n.earlessRoundedStraight'] AS_BASE ALSO_METRICS
eject-contour 'serifRB'
include : refer-glyph 'rtailBR'
select-variant 'nHookBottom' 0x273 (follow -- 'eng')
create-glyph 'ncurlytail' 0x235 : glyph-proc
local fine : adviceBlackness 4
local rinner : clamp (Width * 0.065) (XH * 0.05) (fine * 0.35)
local wide : adviceBlackness 3
local m1 : Math.min RightSB (Width - rinner * 2 - fine - OX)
local x2 : mix SB m1 0.5
local y2 : -fine
include : MarkSet.e
include : VBarLeft SB 0 XH wide
include : dispiro
nShoulderKnots
left -- (SB + wide * HVContrast)
right -- m1
fine -- ShoulderFine
bottom -- (rinner * 2 + fine)
stroke -- wide
CurlyTail fine rinner m1 0 (m1 + rinner * 2 + fine) x2 y2
if SLAB : begin
include : tagged 'serifLT' : LeftwardTopSerif SB XH SideJut
if (!para.isItalic) : begin
include : tagged 'serifLB' : CenterBottomSerif (SB + HalfStroke * HVContrast) 0 Jut
# eta
create-glyph 'grek/eta' 0x3B7 : glyph-proc
include : MarkSet.p
set-base-anchor 'lf' (SB + HalfStroke) 0
include : nShoulder
left -- (SB + Stroke * HVContrast)
right -- RightSB
bottom -- Descender
include : VBarLeft SB 0 XH
if SLAB : begin
include : tagged 'serifLT' : LeftwardTopSerif SB XH SideJut
create-glyph 'latinEta' 0x220 : glyph-proc
include : MarkSet.if
set-base-anchor 'lf' (SB + HalfStroke) 0
include : nShoulder
left -- (SB + Stroke * HVContrast)
right -- RightSB
top -- CAP
bottom -- Descender
include : VBar (SB + HalfStroke * HVContrast) 0 CAP
if SLAB : begin
include : tagged 'serifLT' : LeftwardTopSerif SB CAP SideJut
if (para.isItalic)
: then : include : tagged 'serifRB' : RightwardBottomSerif RightSB Descender SideJut
: else : include : tagged 'serifRB' : CenterBottomSerif (RightSB - HalfStroke * HVContrast) Descender Jut
if (!para.isItalic) : begin
include : tagged 'serifLB' : CenterBottomSerif (SB + HalfStroke * HVContrast) 0 Jut
create-glyph 'latineta' 0x19E : glyph-proc
include : MarkSet.p
set-base-anchor 'lf' (SB + HalfStroke) 0
include : nShoulder
left -- (SB + Stroke * HVContrast)
right -- RightSB
bottom -- Descender
include : VBarLeft SB 0 XH
if SLAB : begin
include : tagged 'serifLT' : LeftwardTopSerif SB XH SideJut
if (para.isItalic)
: then : include : tagged 'serifRB' : RightwardBottomSerif RightSB Descender SideJut
: else : include : tagged 'serifRB' : CenterBottomSerif (RightSB - HalfStroke * HVContrast) Descender Jut
if (!para.isItalic) : begin
include : tagged 'serifLB' : CenterBottomSerif (SB + HalfStroke * HVContrast) 0 Jut
glyph-block-import Letter-Blackboard : BBS BBD BBBarLeft
create-glyph 'mathbb/n' 0x1D55F : glyph-proc
local df : DivFrame 1 2
local bbs BBS
local bbd BBD
set-width df.width
include : df.markSet.e
include : BBBarLeft df.leftSB 0 XH
include : HBarBottom (df.rightSB - bbd) df.rightSB 0 bbs
include : nShoulder
stroke -- bbs
left -- (df.leftSB + bbd + bbs * HVContrast)
right -- df.rightSB
fine -- ShoulderFine
include : intersection
VBarRight (df.rightSB - bbd) 0 XH bbs
nShoulderMask
stroke -- bbs
left -- (df.leftSB + bbd + bbs * HVContrast + 1)
right -- (df.rightSB - 1)
top -- (XH - 1)
fine -- ShoulderFine
glyph-block Letter-Latin-Upper-U : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Marks : markHalfStroke
glyph-block-export UShape
define [UArcT] : params [sink df top bottom [stroke Stroke] [sma SmoothA] [smb SmoothB] [offset 0]] : sink
widths.lhs stroke
[if (sink == spiro-outline) corner flat] (df.leftSB + offset) top [heading Downward]
curl (df.leftSB + offset) (bottom + smb + offset)
arcvh
g4 (df.middle + CorrectionOMidX * stroke) (bottom + O + offset)
archv
flat (df.rightSB - offset) (bottom + sma + offset)
[if (sink == spiro-outline) corner curl] (df.rightSB - offset) top [heading Upward]
define [UShape] : params [df top bottom [stroke Stroke] [sma SmoothA] [smb SmoothB] [offset 0] oper] : glyph-proc
include : UArcT dispiro
df -- df
top -- top
bottom -- bottom
stroke -- stroke
sma -- sma
smb -- smb
offset -- offset
if [not oper] : include : AIVSerifs top
create-glyph 'U' 'U' : glyph-proc
include : MarkSet.capital
include : UShape [DivFrame 1] CAP 0
set-base-anchor 'trailing' Middle 0
create-glyph 'smcpU' 0x1D1C : glyph-proc
include : MarkSet.e
include : UShape [DivFrame 1] XH 0
glyph-block-import Letter-Blackboard : BBS BBD BBBarRight
create-glyph 'mathbb/U' 0x1D54C : glyph-proc
include : MarkSet.capital
include : HBarTop SB (SB + BBD) CAP BBS
include : UShape [DivFrame 1] CAP 0
stroke -- BBS
oper -- true
include : intersection
VBarLeft (SB + BBD) 0 CAP BBS
UArcT spiro-outline [DivFrame 1] CAP 0
stroke -- BBS
oper -- true
offset -- 1
glyph-block Letter-Latin-Lower-U : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Marks : markHalfStroke
glyph-block-import Letter-Shared-Shapes : RightwardTailedBar nShoulder
define [UTopLeftSerif yTop] : tagged 'serifLT'
LeftwardTopSerif SB yTop SideJut
define [UTopRightSerif yTop] : tagged 'serifRT'
LeftwardTopSerif (RightSB - Stroke * HVContrast) yTop SideJut
define [UBottomRightSerif yTop] : tagged 'serifRB'
RightwardBottomSerif RightSB 0 SideJut
create-glyph : glyph-proc
set-width Width
include : MarkSet.e
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
include : nShoulder
left -- (SB + Stroke * HVContrast)
right -- RightSB
fine -- ShoulderFine
include : FlipAround Middle (XH / 2)
create-derived 'u.toothed' : glyph-proc
include : VBarRight RightSB 0 XH
if SLAB : begin
include : UTopLeftSerif XH
if [not para.isItalic] : include : UTopRightSerif XH
include : UBottomRightSerif XH
create-derived 'u.tailed' : glyph-proc
include : RightwardTailedBar RightSB 0 XH
if SLAB : begin
include : UTopLeftSerif XH
if [not para.isItalic] : include : UTopRightSerif XH
create-derived 'u.motionSerifed' : glyph-proc
include : VBarRight RightSB 0 XH
include : UTopLeftSerif XH
include : UBottomRightSerif XH
create-derived 'u.motionSerifedTailed' : glyph-proc
include : RightwardTailedBar RightSB 0 XH
include : UTopLeftSerif XH
create-glyph 'grek/upsilon' 0x3C5 : glyph-proc
include : MarkSet.e
set-base-anchor 'trailing' Middle 0
include : dispiro
widths.lhs
flat (SB + OX - O) XH [heading Downward]
curl (SB + OX - O) SmallSmoothB
arcvh
g4 (Middle + CorrectionOMidS) O
archv
flat (RightSB - OX + O) SmallSmoothA
curl (RightSB - OX + O) XH [heading Upward]
create-glyph 'u.toothlessCorner' : glyph-proc
include : MarkSet.e
set-base-anchor 'trailing' Middle 0
include [refer-glyph 'n.earlessCornerStraight']
eject-contour 'serifLT'
eject-contour 'serifLB'
eject-contour 'serifRB'
include : FlipAround Middle (XH / 2)
if SLAB : begin
include : UTopLeftSerif XH
include : UTopRightSerif XH
create-glyph 'u.toothlessRounded' : glyph-proc
include [refer-glyph 'grek/upsilon'] AS_BASE ALSO_METRICS
if SLAB : begin
include : UTopLeftSerif XH
include : UTopRightSerif XH
select-variant 'u' 'u'
create-glyph 'urtailBR' 0x1D99 : glyph-proc
include [refer-glyph 'u.toothed'] AS_BASE ALSO_METRICS
include [refer-glyph 'rtailBR']
define [LatinUpsilon2Shape top sma smb] : glyph-proc
include : dispiro
widths.lhs
flat SB top [heading Downward]
curl SB smb
arcvh
g4 (Middle + CorrectionOMidS) O
archv
flat RightSB sma
curl RightSB (top - Hook - HalfStroke) [heading Upward]
include : VerticalHook (RightSB - HalfStroke * HVContrast) (top - Hook - HalfStroke) (-(RightSB - HalfStroke * HVContrast - Middle)) (-Hook)
create-glyph 'latinUpsilon2' 0x1B2 : glyph-proc
include : MarkSet.e
include : LatinUpsilon2Shape CAP SmoothA SmoothB
create-glyph 'latinupsilon2' 0x28B : glyph-proc
include : MarkSet.e
include : LatinUpsilon2Shape XH SmallSmoothA SmallSmoothB
create-glyph 'uWithLightCentralizationStroke' : glyph-proc
include : MarkSet.p
include : refer-glyph "u.toothed"
local fine : adviceBlackness 4
local outStand : SB * 0.75 + fine * 0.25
local outStandY : SmallSmoothB / 2 - Descender * 0.6
local yTurn : SmallSmoothB / 2
include : difference
dispiro
widths.lhs fine
corner (SB + outStand) (yTurn + outStandY)
corner (SB - outStand) (yTurn - outStandY)
spiro-outline
corner (SB - O) XH
curl (SB - O) SmallSmoothB
arcvh
g4 (Middle + CorrectionOMidS) (-O)
archv
flat (RightSB + O) SmallSmoothA
corner (RightSB + O) XH
if SLAB : begin
include : LeftwardTopSerif SB XH SideJut
create-glyph 'mathbb/u' 0x1D566 : glyph-proc
local df : DivFrame 1 2
include : df.markSet.e
include [refer-glyph 'mathbb/n']
include : FlipAround Middle (XH / 2)
glyph-block Letter-Latin-Upper-M : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
define [MShape top df fHanging] : glyph-proc
local swSideBot : if fHanging Stroke : adviceBlackness 3.5 df.div
local swSideTop : adviceBlackness [if fHanging 5 4] df.div
local halfSwMiddle : swSideTop / 2
local middleY : if fHanging
top * 0.3 / df.div
if SLAB Stroke 0
include : dispiro
flat df.leftSB 0 [widths.heading 0 swSideBot Upward]
curl df.leftSB (top * 0.2) [heading Upward]
straight.up.end df.leftSB top [widths.heading 0 swSideTop Upward]
include : dispiro
flat df.rightSB 0 [widths.heading swSideBot 0 Upward]
curl df.rightSB (top * 0.2) [heading Upward]
straight.up.end df.rightSB top [widths.heading swSideTop 0 Upward]
include : dispiro
flat (df.leftSB + halfSwMiddle) top [widths.heading swSideTop 0 Downward]
curl df.middle middleY [widths.heading (swSideTop / 2) (swSideTop / 2) Downward]
include : dispiro
flat (df.rightSB - halfSwMiddle) top [widths.heading 0 swSideTop Downward]
curl df.middle middleY [widths.heading (swSideTop / 2) (swSideTop / 2) Downward]
include : AIMSerifs top df.leftSB df.rightSB
create-glyph : glyph-proc
local df : DivFrame para.diversityM 3
include : df.markSet.capital
set-width df.width
create-derived 'M.hanging' : MShape CAP df true
create-derived 'M.flatBottom' : MShape CAP df false
create-glyph : glyph-proc
local df : DivFrame para.diversityM 3
include : df.markSet.e
set-width df.width
create-derived 'smcpM.hanging' : MShape XH df true
create-derived 'smcpM.flatBottom' : MShape XH df false
select-variant 'M' 'M'
select-variant 'smcpM' 0x1D0D (follow -- 'M')
alias 'cyrl/em' 0x43C 'smcpM'
alias 'grek/Mu' 0x39C 'M'
alias 'cyrl/Em' 0x41C 'M'
glyph-block-import Letter-Blackboard : BBS BBD BBBarRight
create-glyph 'mathbb/M' 0x1D544 : glyph-proc
local df : DivFrame 1 3
local bbs : adviceBlackness 8
local bbd : BBD * [Math.min (3 / 4) (bbs / BBS)]
local kDiag : DiagCorDs CAP (df.rightSB - df.leftSB) bbd
local yTurnPos : CAP * 0.25
include : MarkSet.capital
include : VBarLeft df.leftSB 0 CAP bbs
include : BBBarRight df.rightSB 0 CAP (bbd -- bbd) (bbs -- bbs)
local xLeft : df.leftSB + 0.5 * bbs * HVContrast
local xRight : df.rightSB - bbd - 0.5 * bbs * HVContrast
local xMiddle : mix xLeft xRight 0.5
include : HBarTop xLeft (xLeft + kDiag * bbd) CAP bbs
include : intersection
Rect CAP yTurnPos xLeft xRight
ExtLineCenter 2 bbs xRight CAP xMiddle yTurnPos
include : difference
intersection
Rect CAP yTurnPos xLeft xRight
union
ExtLineCenter 2 bbs xLeft CAP xMiddle yTurnPos
ExtLineCenter 2 bbs (xLeft + kDiag * bbd) CAP (xMiddle + kDiag * bbd) yTurnPos
spiro-outline
corner (Width * 4) [mix CAP yTurnPos (-1)]
corner [mix xRight xMiddle (-1)] [mix CAP yTurnPos (-1)]
corner [mix xRight xMiddle (2)] [mix CAP yTurnPos (2)]
corner (Width * 4) [mix CAP yTurnPos (2)]
glyph-block Letter-Latin-Lower-M : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : RightwardTailedBar DToothlessRise DMBlend
glyph-block-import Letter-Shared-Shapes : nShoulder nShoulderMask
define [SmallMSmooth df] : df.div * (0.5 * SmallSmooth + 0.375 * Stroke)
define [SmallMShoulderSpiro] : params [left right top bottom width fine df coBottom] : glyph-proc
local fix : TanSlope * Stroke * HVContrast * width / Stroke
local sm : [SmallMSmooth df] + fix / 2
include : spiro-outline
corner (right - width * HVContrast) [Math.min (top - sm - 0.1) bottom]
curl (right - width * HVContrast) (top - sm + fix)
arcvh 8
g2 [mix left (right - width * HVContrast) 0.5] (top - O - width)
archv 8
flat left (top - sm - fix)
corner left (top - sm - fix - 1)
if (coBottom != nothing)
list [corner left coBottom] [corner (left - fine) coBottom]
list
corner (left - fine) (top - sm - 1)
curl (left - fine) (top - sm)
arcvh 8
g2 [mix (left - fine * HVContrast) right 0.5] (top - O)
archv 8
flat right (top - sm)
corner right [Math.min (top - sm - 0.1) bottom]
close
define [RevSmallMShoulderSpiro] : params [left right top bottom width fine df coBottom] : glyph-proc
local fix : TanSlope * Stroke * HVContrast * width / Stroke
local sm : [SmallMSmooth df] - fix / 2
include : spiro-outline
corner (left + width * HVContrast) [Math.min (top - sm - 0.1) bottom]
curl (left + width * HVContrast) (top - sm - fix)
arcvh 8
g2 [mix right (left + width * HVContrast) 0.5] (top - O - width)
archv 8
flat right (top - sm - fix)
corner right (top - sm - fix - 1)
if (coBottom != nothing)
list [corner right coBottom] [corner (right + fine) coBottom]
list
corner (right + fine) (top - sm - 1)
curl (right + fine) (top - sm)
arcvh 8
g2 [mix (right + fine * HVContrast) left 0.5] (top - O)
archv 8
flat left (top - sm)
corner left [Math.min (top - sm - 0.1) bottom]
close
define [SmallMTopLeftSerif df top lbot] : glyph-proc
if (df.width > para.refJut * 7) : begin
include : tagged 'serifLT' : intersection
CenterTopSerif (df.leftSB + 0.5 * df.mvs * HVContrast) top Jut df.mvs
Rect top lbot 0 (df.leftSB - O)
: else : begin
include : tagged 'serifLT' : LeftwardTopSerif df.leftSB top SideJut df.mvs
define [SmallMBottomLeftSerif df top lbot] : glyph-proc
if (df.width > para.refJut * 7) : begin
include : tagged 'serifLB' : begin
CenterBottomSerif (df.leftSB + 0.5 * df.mvs * HVContrast) lbot Jut df.mvs
: else : begin
include : tagged 'serifLB' : begin
LeftwardBottomSerif df.leftSB lbot SideJut df.mvs
define [SmallMBottomMiddleSerif df top mbot] : glyph-proc
if (df.width > para.refJut * 7) : begin
include : tagged 'serifMB' : begin
CenterBottomSerif df.middle mbot Jut df.mvs
define [SmallMBottomRightSerif df top rbot] : glyph-proc
if (df.width > para.refJut * 7) : begin
if para.isItalic : begin
include : tagged 'serifRB' : intersection
CenterBottomSerif (df.rightSB - 0.5 * df.mvs * HVContrast) rbot Jut df.mvs
Rect top rbot (df.rightSB + O) df.width
: else : begin
include : tagged 'serifRB' : begin
CenterBottomSerif (df.rightSB - 0.5 * df.mvs * HVContrast) rbot Jut df.mvs
: else : begin
include : tagged 'serifRB' : RightwardBottomSerif df.rightSB rbot SideJut df.mvs
define [SmallMBottomMotionRightSerif df top rbot] : glyph-proc
if (df.width > para.refJut * 7) : begin
include : tagged 'serifRB' : begin
CenterBottomSerif (df.rightSB - 0.5 * df.mvs * HVContrast) rbot Jut df.mvs
: else : begin
include : tagged 'serifRB' : RightwardBottomSerif df.rightSB rbot SideJut df.mvs
define [SmallMSerifs df top lbot mbot rbot tailed earless] : glyph-proc
if [not earless] : include : SmallMTopLeftSerif df top lbot
if [not para.isItalic] : include : SmallMBottomLeftSerif df top lbot
if [not para.isItalic] : include : SmallMBottomMiddleSerif df top mbot
if [not tailed] : include : SmallMBottomRightSerif df top rbot
define [dfM] : DivFrame para.diversityM 3
define [SmallMArches top lbot mbot rbot df tailed] : glyph-proc
include : SmallMShoulderSpiro
df -- df
left -- (df.leftSB + df.mvs * HVContrast)
right -- (df.middle + df.mvs / 2 * HVContrast)
top -- top
bottom -- mbot
width -- df.mvs
fine -- (df.mvs * ShoulderFine / Stroke)
include : SmallMShoulderSpiro
df -- df
left -- (df.middle + df.mvs * 0.5 * HVContrast)
right -- df.rightSB
top -- top
bottom -- rbot
width -- df.mvs
fine -- (df.mvs * ShoulderFine / Stroke)
include : tagged 'barL' : VBarLeft df.leftSB lbot top df.mvs
define [SmallMShape top lbot mbot rbot df tailed] : glyph-proc
include : SmallMArches top lbot mbot rbot df tailed
if SLAB : include : SmallMSerifs df top lbot mbot rbot tailed false
define [SmallMMotionSerifedShape top lbot mbot rbot df tailed] : glyph-proc
include : SmallMArches top lbot mbot rbot df tailed
include : SmallMTopLeftSerif df top lbot
if [not tailed] : include : SmallMBottomMotionRightSerif df top rbot
glyph-block-export SmallMSmoothHeight
define [SmallMShortLegHeight df] : (XH - df.mvs) * 0.45
define [SmallMSmoothHeight df] : XH - [SmallMSmooth df] - TanSlope * Stroke
create-glyph 'm.normal' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : SmallMShape XH 0 0 0 df
create-glyph 'm.tailed' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : SmallMShape XH 0 0 ([SmallMSmoothHeight df] + O) df true
include : RightwardTailedBar df.rightSB 0 [SmallMSmoothHeight df] (sw -- df.mvs)
create-glyph 'm.shortleg' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : SmallMShape XH 0 [SmallMShortLegHeight df] 0 df
eject-contour 'serifMB'
create-glyph 'm.shortlegTailed' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : SmallMShape XH 0 [SmallMShortLegHeight df] ([SmallMSmoothHeight df] + O) df true
include : RightwardTailedBar df.rightSB 0 [SmallMSmoothHeight df] (sw -- df.mvs)
create-glyph 'm.motionSerifed' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : SmallMMotionSerifedShape XH 0 0 0 df
create-glyph 'm.motionSerifedTailed' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : SmallMMotionSerifedShape XH 0 0 ([SmallMSmoothHeight df] + O) df true
include : RightwardTailedBar df.rightSB 0 [SmallMSmoothHeight df] (sw -- df.mvs)
create-glyph 'm.motionSerifedShortleg' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : SmallMMotionSerifedShape XH 0 [SmallMShortLegHeight df] 0 df
eject-contour 'serifMB'
create-glyph 'm.motionSerifedShortlegTailed' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : SmallMMotionSerifedShape XH 0 [SmallMShortLegHeight df] ([SmallMSmoothHeight df] + O) df true
include : RightwardTailedBar df.rightSB 0 [SmallMSmoothHeight df] (sw -- df.mvs)
define [EarlessCornerDoubleArchSmallMShape top lbot mbot rbot df tailed] : glyph-proc
include : dispiro
widths.rhs df.mvs
g4 df.leftSB (top - DToothlessRise)
g4.right.mid [mix df.leftSB (df.middle + df.mvs / 2 * HVContrast) 0.5] (top - O) [heading Rightward]
g4 (df.middle + df.mvs / 2 * HVContrast) (top - DToothlessRise)
include : dispiro
widths.rhs df.mvs
g4 (df.middle - df.mvs / 2 * HVContrast) (top - DToothlessRise)
g4.right.mid [mix df.rightSB (df.middle - df.mvs / 2 * HVContrast) 0.5] (top - O) [heading Rightward]
archv
flat df.rightSB (top - [SmallMSmooth df]) [heading Downward]
curl df.rightSB rbot [heading Downward]
include : tagged 'barL' : VBarLeft df.leftSB lbot (top - DToothlessRise) df.mvs
include : tagged 'barM' : VBar df.middle mbot (top - DToothlessRise) df.mvs
create-glyph 'm.earlessCornerDoubleArch' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : EarlessCornerDoubleArchSmallMShape XH 0 0 0 df
create-glyph 'm.earlessCornerDoubleArchShortleg' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : EarlessCornerDoubleArchSmallMShape XH 0 [SmallMShortLegHeight df] 0 df
create-glyph 'm.earlessCornerDoubleArchTailed' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : EarlessCornerDoubleArchSmallMShape XH 0 0 ([SmallMSmoothHeight df] + O) df true
include : RightwardTailedBar df.rightSB 0 [SmallMSmoothHeight df] (sw -- df.mvs)
create-glyph 'm.earlessCornerDoubleArchShortlegTailed' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : EarlessCornerDoubleArchSmallMShape XH 0 [SmallMShortLegHeight df] ([SmallMSmoothHeight df] + O) df true
include : RightwardTailedBar df.rightSB 0 [SmallMSmoothHeight df] (sw -- df.mvs)
define [EarlessRoundedDoubleArchSmallMShape top lbot mbot rbot df tailed] : glyph-proc
include : union
RevSmallMShoulderSpiro
df -- df
left -- df.leftSB
right -- (df.middle - df.mvs / 2 * HVContrast)
top -- top
bottom -- lbot
coBottom -- mbot
width -- df.mvs
fine -- (df.mvs * CThin)
SmallMShoulderSpiro
df -- df
left -- (df.middle + df.mvs * 0.5 * HVContrast)
right -- df.rightSB
top -- top
bottom -- rbot
coBottom -- mbot
width -- df.mvs
fine -- (df.mvs * CThin)
if SLAB : include : SmallMSerifs df top lbot mbot rbot tailed true
create-glyph 'm.earlessRoundedDoubleArch' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : EarlessRoundedDoubleArchSmallMShape XH 0 0 0 df
create-glyph 'm.earlessRoundedDoubleArchShortleg' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : EarlessRoundedDoubleArchSmallMShape XH 0 [SmallMShortLegHeight df] 0 df
create-glyph 'm.earlessRoundedDoubleArchTailed' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : EarlessRoundedDoubleArchSmallMShape XH 0 0 ([SmallMSmoothHeight df] + O) df true
include : RightwardTailedBar df.rightSB 0 [SmallMSmoothHeight df] (sw -- df.mvs)
create-glyph 'm.earlessRoundedDoubleArchShortlegTailed' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : EarlessRoundedDoubleArchSmallMShape XH 0 [SmallMShortLegHeight df] ([SmallMSmoothHeight df] + O) df true
include : RightwardTailedBar df.rightSB 0 [SmallMSmoothHeight df] (sw -- df.mvs)
define [EarlessSingleArchSmallMShape top lbot mbot rbot df tailed] : glyph-proc
include : tagged 'barL' : VBarLeft df.leftSB lbot (XH - DToothlessRise) df.mvs
include : tagged 'barM' : VBar df.middle mbot XH df.mvs
include : dispiro
widths.rhs df.mvs
g4 df.leftSB (XH - DToothlessRise)
g4 (df.middle - CorrectionOMidS) (XH - O)
archv
flat df.rightSB [Math.max (XH - [SmallMSmooth df]) (rbot + 0.1)]
curl df.rightSB rbot [heading Downward]
if SLAB : include : SmallMSerifs df top lbot mbot rbot tailed true
create-glyph 'm.earlessSingleArch' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : EarlessSingleArchSmallMShape XH 0 0 0 df
create-glyph 'm.earlessSingleArchShortleg' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : EarlessSingleArchSmallMShape XH 0 [SmallMShortLegHeight df] 0 df
create-glyph 'm.earlessSingleArchTailed' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : EarlessSingleArchSmallMShape XH 0 0 ([SmallMSmoothHeight df] + O) df true
include : RightwardTailedBar df.rightSB 0 [SmallMSmoothHeight df] (sw -- df.mvs)
create-glyph 'm.earlessSingleArchShortlegTailed' : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.e
include : EarlessSingleArchSmallMShape XH 0 [SmallMShortLegHeight df] ([SmallMSmoothHeight df] + O) df true
include : RightwardTailedBar df.rightSB 0 [SmallMSmoothHeight df] (sw -- df.mvs)
select-variant 'm' 'm'
alias 'cyrl/te.italicNormal' null 'm.normal'
alias 'cyrl/te.italicTailed' null 'm.tailed'
alias 'cyrl/te.italicMotionSerifed' null 'm.motionSerifed'
create-glyph 'cyrl/tedescender.italic' : composite-proc [MarkSet.e]
refer-glyph 'm.normal'
CyrDescender (Width * para.diversityM - SB)
alias 'cyrl/te.BGR.normal' null 'm.normal'
alias 'cyrl/te.BGR.tailed' null 'm.tailed'
alias 'cyrl/te.BGR.motionSerifed' null 'm.motionSerifed'
select-variant 'cyrl/te.BGR'
create-glyph 'mltail' 0x271 : glyph-proc
local df : dfM
include : df.markSet.p
include : refer-glyph "m.normal"
eject-contour 'serifRB'
include : VerticalHook (df.rightSB - df.mvs / 2 * HVContrast) 0 (-HookX) Hook df.mvs
turned 'turnm' 0x26F 'm.normal' [dfM].middle (XH / 2)
create-glyph 'capitalTurnm' 0x19C : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.capital
include : SmallMShape CAP 0 0 0 df
include : FlipAround df.middle (CAP / 2)
create-glyph 'turnmleg' 0x270 : glyph-proc
local df : dfM
set-width df.width
include : df.markSet.p
include : refer-glyph "m.normal"
eject-contour 'serifLT'
include : FlipAround df.middle (XH / 2)
include : VBarRight df.rightSB Descender 0 df.mvs
glyph-block-import Letter-Blackboard : BBS BBD BBBarLeft
create-glyph 'mathbb/m' 0x1D55E : glyph-proc
local df : DivFrame 1 3
local bbs : adviceBlackness 8
local bbd : BBD * [Math.min (3 / 4) (bbs / BBS)]
define xMid : mix (df.leftSB + bbd + bbs * HVContrast) df.rightSB 0.5
set-width df.width
include : df.markSet.e
include : BBBarLeft df.leftSB 0 XH (bbd -- bbd) (bbs -- bbs)
include : union
HBarBottom (xMid - bbd) xMid 0 bbs
nShoulder
stroke -- bbs
left -- (df.leftSB + bbd + bbs * HVContrast)
right -- xMid
fine -- ShoulderFine
intersection
VBarRight (xMid - bbd) 0 XH bbs
nShoulderMask
stroke -- bbs
left -- (df.leftSB + bbd + bbs * HVContrast + 1)
right -- (xMid - 1)
top -- (XH - 1)
fine -- ShoulderFine
include : union
HBarBottom (df.rightSB - bbd) df.rightSB 0 bbs
nShoulder
leftY0 -- 0
stroke -- bbs
left -- xMid
right -- df.rightSB
fine -- ShoulderFine
intersection
VBarRight (df.rightSB - bbd) 0 XH bbs
nShoulderMask
stroke -- bbs
left -- (xMid + 1)
right -- (df.rightSB - 1)
top -- (XH - 1)
fine -- ShoulderFine
glyph-block Letter-Latin-Upper-H : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Blackboard : BBS BBD
define [HShape top] : glyph-proc
include : tagged 'strokeL' : VBarLeft SB 0 top
include : tagged 'strokeR' : VBarRight RightSB 0 top
include : HBar (SB - O) (RightSB + O) (top * HBarPos)
include : AIHSerifs top
create-glyph 'H' 'H' : glyph-proc
include : MarkSet.capital
include : HShape CAP
create-glyph 'halfH' 0x2C75 : glyph-proc
include : MarkSet.capital
include : HShape CAP
eject-contour 'strokeR'
eject-contour 'serifRT'
eject-contour 'serifRB'
alias 'grek/Eta' 0x397 'H'
alias 'cyrl/En' 0x41D 'H'
create-glyph 'mathbb/H' 0x210D : glyph-proc
include : MarkSet.capital
include : VBarLeft SB 0 CAP BBS
include : VBarRight RightSB 0 CAP BBS
include : VBarLeft (SB + BBD) 0 CAP BBS
include : VBarRight (RightSB - BBD) 0 CAP BBS
include : HBar (SB + BBD) (RightSB - BBD) (CAP * HBarPos) BBS
include : HBarTop SB (SB + BBD) CAP BBS
include : HBarTop (RightSB - BBD) RightSB CAP BBS
include : HBarBottom SB (SB + BBD) 0 BBS
include : HBarBottom (RightSB - BBD) RightSB 0 BBS
create-glyph 'smcpH' 0x29C : glyph-proc
include : MarkSet.e
include : HShape XH
create-glyph 'halfSmcpH' 0x2C76 : glyph-proc
include : MarkSet.e
include : HShape XH
eject-contour 'strokeR'
eject-contour 'serifRT'
eject-contour 'serifRB'
alias 'cyrl/en' 0x43D 'smcpH'
create-glyph 0x4A2 : composite-proc [refer-glyph 'cyrl/En'] [CyrDescender RightSB]
create-glyph 0x4A3 : composite-proc [refer-glyph 'cyrl/en'] [CyrDescender RightSB]
define [EnGheShape top] : glyph-proc
local right : if SLAB ([mix RightSB SB 0.35] + MVertStroke / 2 * HVContrast) [mix RightSB SB 0.2]
local barRight : mix Width RightSB [if SLAB 0.25 0.375]
include : VBarLeft SB 0 top
include : VBarRight right 0 top
include : HBar (SB - O) (right + O) (top * HBarPos)
include : HBarTop (right - Stroke * 0.1) barRight top
if SLAB : begin
include : AIHSerifs top SB right
include : DownwardRightSerif barRight top VJut (MVertStroke / HVContrast)
create-glyph 'cyrl/EnGhe' 0x4A4 : glyph-proc
set-width Width
include : MarkSet.capital
include : EnGheShape CAP
create-glyph 'cyrl/enghe' 0x4A5 : glyph-proc
include : MarkSet.e
include : EnGheShape XH
create-glyph 'Hbar' 0x126 : glyph-proc
include [refer-glyph 'H'] AS_BASE
include : HOverlayBar [mix SB 0 0.7] [mix RightSB Width 0.7] [mix CapMiddle CAP 0.45]
create-glyph 'HCedilla' 0x1E28 : glyph-proc
include [refer-glyph 'cedillaBelow']
include : Translate (Width + SB - Middle + HalfStroke * HVContrast) 0
include [refer-glyph 'H']
include : MarkSet.if
create-glyph 'Heng' 0xA726 : glyph-proc
include : MarkSet.if
include : refer-glyph "H"
eject-contour 'serifRB'
include : VerticalHook (RightSB - HalfStroke * HVContrast) 0 (-HookX) Hook
create-glyph 'HengSmcp' : glyph-proc
include : MarkSet.if
include : refer-glyph "smcpH"
eject-contour 'serifRB'
include : VerticalHook (RightSB - HalfStroke * HVContrast) 0 (-HookX) Hook
alias 'cyrl/EnHook' 0x4C7 'Heng'
alias 'cyrl/enHook' 0x4C8 'HengSmcp'
glyph-block Letter-Latin-Lower-H : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : RightwardTailedBar nShoulder nShoulderMask
define [SmallHSerifs tailed hookTop] : glyph-proc
if [not hookTop] : include : LeftwardTopSerif SB CAP SideJut
if [not tailed]
if (para.isItalic)
: then : include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
: else : include : tagged 'serifRB' : CenterBottomSerif (RightSB - HalfStroke * HVContrast) 0 Jut
if (!para.isItalic) : begin
include : tagged 'serifLB' : CenterBottomSerif (SB + HalfStroke * HVContrast) 0 Jut
create-glyph 'h.straight' : glyph-proc
set-width Width
include : MarkSet.b
include : VBarLeft SB 0 CAP
include : nShoulder
left -- (SB + Stroke * HVContrast)
right -- RightSB
if SLAB : include [SmallHSerifs false]
create-glyph 'h.tailed' : glyph-proc
set-width Width
include : MarkSet.b
include : VBarLeft SB 0 CAP
include : nShoulder
left -- (SB + Stroke * HVContrast)
right -- RightSB
bottom -- (XH - SmallSmoothB + O)
include : RightwardTailedBar RightSB 0 (XH - SmallSmoothB)
if SLAB : include [SmallHSerifs true]
create-glyph 'h.motionSerifedStraight' : glyph-proc
set-width Width
include : MarkSet.b
include : VBarLeft SB 0 CAP
include : nShoulder
left -- (SB + Stroke * HVContrast)
right -- RightSB
include : LeftwardTopSerif SB CAP SideJut
include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
create-glyph 'h.motionSerifedTailed' : glyph-proc
set-width Width
include : MarkSet.b
include : VBarLeft SB 0 CAP
include : nShoulder
left -- (SB + Stroke * HVContrast)
right -- RightSB
bottom -- (XH - SmallSmoothB + O)
include : RightwardTailedBar RightSB 0 (XH - SmallSmoothB)
include : LeftwardTopSerif SB CAP SideJut
select-variant 'h' 'h'
alias 'cyrl/shha' 0x4BB 'h'
with-related-glyphs 'h' 'hCedilla' 0x1E29 : lambda [src sel] : glyph-proc
include [refer-glyph 'cedillaBelow']
include : Translate (Width + SB - Middle + HalfStroke * HVContrast) 0
include [refer-glyph src]
include : MarkSet.if
create-glyph 'hhooktop.straight' : glyph-proc
include : MarkSet.b
include : HooktopLeftBar
include : nShoulder
left -- (SB + Stroke * HVContrast)
right -- RightSB
if SLAB : include [SmallHSerifs false true]
create-glyph 'hhooktop.tailed' : glyph-proc
include : MarkSet.b
include : HooktopLeftBar
include : nShoulder
left -- (SB + Stroke * HVContrast)
right -- RightSB
bottom -- (XH - SmallSmoothB + O)
include : RightwardTailedBar RightSB 0 (XH - SmallSmoothB)
if SLAB : include [SmallHSerifs false true]
select-variant 'hhooktop' 0x266
create-glyph 'hhooktopltail' 0x267 : glyph-proc
include : MarkSet.if
include : refer-glyph "hhooktop.straight"
eject-contour 'serifRB'
include : VerticalHook (RightSB - HalfStroke * HVContrast) 0 (-HookX) Hook
create-glyph 'heng' 0xA727 : glyph-proc
include : MarkSet.if
include : refer-glyph "h.straight"
eject-contour 'serifRB'
include : VerticalHook (RightSB - HalfStroke * HVContrast) 0 (-HookX) Hook
turned 'turnh' 0x265 'h.straight' Middle (XH / 2) [MarkSet.p]
create-glyph 'hookturnh' 0x2AE : glyph-proc
include : nShoulder
left -- (SB + Stroke * HVContrast)
right -- RightSB
bottom -- (Hook + HalfStroke + 1)
include : VBarLeft SB 0 CAP
include : new-glyph : glyph-proc
include : refer-glyph "rtailBR"
include : Upright
include : Translate RightSB (Hook + HalfStroke)
include : Italify
include : FlipAround Middle (XH / 2)
include : MarkSet.p
if SLAB : begin
include : LeftwardTopSerif (RightSB - Stroke * HVContrast) XH SideJut
include : CenterBottomSerif (RightSB - HalfStroke * HVContrast) Descender Jut
create-glyph 'hookturnhrtail' 0x2AF : glyph-proc
include : nShoulder
left -- (SB + Stroke * HVContrast)
right -- RightSB
bottom -- (Hook + HalfStroke + 1)
include : VBarLeft SB 0 (XH - 1)
include : new-glyph : glyph-proc
include : refer-glyph "rtailBR"
include : Upright
include : Translate RightSB (Hook + HalfStroke)
include : Italify
include : FlipAround Middle (XH / 2)
include : new-glyph : glyph-proc
include : refer-glyph "rtailBR"
include : Upright
include : Translate RightSB 0
include : Italify
include : MarkSet.p
if SLAB : begin
include : LeftwardTopSerif (RightSB - Stroke * HVContrast) XH SideJut
with-related-glyphs 'h' 'hbar' 0x127 : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE
local barSpaceTop : CAP - [if SLAB Stroke 0]
local s : Math.min OverlayStroke (0.625 * (barSpaceTop - XH))
local xOverlayStart : mix SB 0 0.7
local xOverlayEnd : mix SB RightSB 0.5
local yOverlay : [mix XH barSpaceTop 0.45] - s / 2
include : dispiro
widths.lhs s
corner xOverlayStart yOverlay
corner (SB + HalfStroke * HVContrast) yOverlay
include : dispiro
widths.lhs OverlayStroke
corner (SB + HalfStroke * HVContrast) yOverlay
corner xOverlayEnd yOverlay
alias 'cyrl/tshe' 0x45B 'hbar'
glyph-block-import Letter-Blackboard : BBS BBD BBBarLeft
create-glyph 'mathbb/h' 0x1D559 : glyph-proc
local df : DivFrame 1 2
local bbs BBS
local bbd BBD
set-width df.width
include : df.markSet.e
include : BBBarLeft df.leftSB 0 CAP
include : union
HBarBottom (df.rightSB - bbd) df.rightSB 0 bbs
nShoulder
stroke -- bbs
left -- (df.leftSB + bbd + bbs * HVContrast)
right -- df.rightSB
fine -- ShoulderFine
intersection
VBarRight (df.rightSB - bbd) 0 XH bbs
nShoulderMask
stroke -- bbs
left -- (df.leftSB + bbd + bbs * HVContrast + 1)
right -- (df.rightSB - 1)
top -- (XH - 1)
fine -- ShoulderFine
glyph-block Letter-Latin-Upper-F : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-export FShape RevFShape EFVJutLength
define [xMidBarShrink] : [Math.max HalfStroke ((RightSB - SB) * 0.15)] + [if SLAB (Stroke * 0.25) 0]
define [yMidBar top y] : top * [fallback y : designParameters.upperEBarPos SLAB]
define [EFVJutLength top pyBar stroke] : begin
local jutTop : Math.min VJut
top - [mix (top - stroke) ([yMidBar top pyBar] + stroke / 2) 0.5]
local jutBot : Math.min VJut
mix stroke ([yMidBar top pyBar] - stroke / 2) 0.5
return { jutTop jutBot }
define xFBarLeft : SB * 1.5
define [FShape] : params [top pyBar noSerif _stroke] : glyph-proc
define stroke : fallback _stroke : adviceBlackness2 2 3 top
include : VBarLeft (xFBarLeft) 0 top stroke
include : HBarTop (xFBarLeft - O) RightSB top stroke
include : HBar (xFBarLeft - O) (RightSB - [xMidBarShrink]) [yMidBar top pyBar] stroke
if (SLAB && !noSerif) : begin
include : LeftwardTopSerif xFBarLeft top SideJut
include : tagged 'serifBottom' : LeftwardBottomSerif xFBarLeft 0 SideJut
include : tagged 'serifBottom' : RightwardBottomSerif (xFBarLeft + HalfStroke * HVContrast) 0 MidJutSide
local { jutTop jutBot } : EFVJutLength top pyBar stroke
include : DownwardRightSerif RightSB top jutTop
define [RevFShape] : params [top pyBar noSerif] : glyph-proc
define stroke : adviceBlackness2 2 3 CAP
define xFBarRight : Width - SB * 1.5
include : VBarRight (xFBarRight) 0 top stroke
include : HBarTop SB (xFBarRight + O) top stroke
include : HBar (SB + [xMidBarShrink]) (xFBarRight + O) [yMidBar top pyBar] stroke
if (SLAB && !noSerif) : begin
include : RightwardTopSerif xFBarRight top SideJut
include : tagged 'serifBottom' : RightwardBottomSerif xFBarRight 0 SideJut
include : tagged 'serifBottom' : LeftwardBottomSerif (xFBarRight - HalfStroke * HVContrast) 0 MidJutSide
local { jutTop jutBot } : EFVJutLength top pyBar stroke
include : DownwardLeftSerif SB top jutTop
create-glyph 'F' 'F' : glyph-proc
set-width Width
include : MarkSet.capital
include : FShape CAP
create-glyph 'smcpF' 0xA730 : glyph-proc
set-width Width
include : MarkSet.e
include : FShape XH
glyph-block-import Letter-Blackboard : BBS BBD
create-glyph 'mathbb/F' 0x1D53D : glyph-proc
include : MarkSet.capital
include : union
VBarLeft (xFBarLeft + BBD) 0 CAP BBS
HBarBottom xFBarLeft (xFBarLeft + BBD) 0 BBS
difference
FShape CAP (noSerif -- true) (_stroke -- BBS)
Rect (CAP - BBS) BBS (xFBarLeft + BBS * HVContrast) (xFBarLeft + BBD)
turned 'turnF' 0x2132 'F' Middle (CAP / 2)
turned 'turnSmcpF' 0x214E 'smcpF' Middle (XH / 2)
create-glyph 'symbol/currency/frenchFrancSign' 0x20A3 : glyph-proc
include : refer-glyph "F"
include : HOverlayBar (SB * 0.5) (SB * 3 + Stroke * HVContrast) [mix 0 XH 0.4]
create-glyph 'Fltail' 0x191 : glyph-proc
include [refer-glyph 'F'] AS_BASE
eject-contour 'serifBottom'
include : VerticalHook (SB * 1.5 + HalfStroke * HVContrast) 0 (-HookX) Hook
glyph-block Letter-Latin-Lower-F : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : CurlyTail
define fovershoot : fallback para.fovershoot (O * 6)
create-glyph 'longs.straight' : glyph-proc
set-width Width
include : MarkSet.b
include : dispiro
widths.center
flat (Middle - FBalance) 0 [heading Upward]
curl (Middle - FBalance) (CAP - FHook)
arcvh
straight.right.end (Middle - FBalance + HookX) (CAP - HalfStroke - fovershoot)
set-base-anchor 'overlay' (Middle - FBalance + Stroke * 0.5 * HVContrast) (CAP * OverlayPos)
if SLAB : begin
include : tagged 'serifMB' : CenterBottomSerif (Middle - FBalance) 0 Jut
create-glyph 'longs.upright' : glyph-proc
include : MarkSet.b
local m : Middle - JBalance - HalfStroke * HVContrast
local r : m + (Width * 0.5) + Stroke * HVContrast - OXHook
include : dispiro
widths.lhs
g4 r (CAP - Hook)
hookstart (CAP - O)
flat m (CAP - SmoothA)
curl m 0 [heading Downward]
set-base-anchor 'overlay' (m + Stroke * 0.65 * HVContrast) (CAP * OverlayPos)
if SLAB : begin
include : tagged 'serifLB' : CenterBottomSerif (m + HalfStroke * HVContrast + RBalance * 0.35) 0 (Jut + RBalance * 0.65)
create-derived 'longsbar.upright' : glyph-proc
include : HOverlayBar
m + HalfStroke * HVContrast - LongJut * 0.75
m + HalfStroke * HVContrast + LongJut * 0.75
[mix (XH - Stroke) CAP 0.5] - HalfStroke
glyph-block-export LongSShape
define [LongSShape top bottom hookx hooky fine] : glyph-proc
local w [fallback fine Stroke]
include : dispiro
widths.center w
straight.right.start (Middle - hookx) (bottom + w / 2 + fovershoot)
flat Middle (bottom + hooky)
curl Middle (top - hooky)
straight.right.end (Middle + hookx) (top - w / 2 - fovershoot)
create-glyph 'longs.italic' : glyph-proc
include : MarkSet.if
include : LongSShape CAP (-Hook) HookX Hook
create-derived 'longsbar.italic' : glyph-proc
include : HOverlayBar
Middle - LongJut * 0.75
Middle + LongJut * 0.75
[mix (XH - Stroke) CAP 0.5] - HalfStroke
create-derived 'eshbar' 0x284 : glyph-proc
include : HOverlayBar
Middle - LongJut * 0.75
Middle + LongJut * 0.75
[mix Stroke Descender 0.5] + HalfStroke
alias 'esh' 0x283 'longs.italic'
italic-variant 'longs' 0x17F
italic-variant 'longsbar' 0x1E9D
create-glyph 'eshcurlytail' 0x286 : glyph-proc
include : MarkSet.if
local fine : adviceBlackness 3.5
local rinner : LongJut / 2 - fine / 2
local m1 : Middle - HalfStroke * HVContrast - FBalance
local x2 : mix RightSB m1 0.25
local y2 : Descender + O
include [refer-glyph 'longs.straight'] false
eject-contour 'serifMB'
include : dispiro
widths.lhs
flat m1 XH [heading Downward]
curl m1 (Descender + fine + rinner * 2)
CurlyTail
fine -- fine
rinner -- rinner
xleft -- m1
bottom -- Descender
right -- (m1 - LongJut)
x2 -- x2
y2 -- y2
create-glyph 'ifishhook' 0x27F : glyph-proc
include : MarkSet.p
include : VBar Middle Descender (XH - Hook)
include : VerticalHook Middle (XH - Hook) (-LongJut + LBalance) (-Hook + HalfStroke)
include : Translate LBalance 0
if SLAB : begin
include : CenterBottomSerif Middle Descender Jut
create-glyph 'iviby' 0x285 : glyph-proc
include : MarkSet.p
include : VBar Middle 0 (XH - Hook - HalfStroke)
include : VerticalHook Middle (XH - Hook - HalfStroke) (-LongJut) (-Hook)
include : VerticalHook Middle 0 LongJut Hook
define fbar : XH * designParameters.fBarPosToXH + Stroke * designParameters.fbarStrokeAdj
define [SmallFBottomSerif] : dispiro
widths.lhs
flat ([mix SB RightSB 0.02] + HalfStroke * TanSlope) 0
curl ([mix SB RightSB 0.875] + HalfStroke * TanSlope) 0
define SmallFOvershoot2 (O * 2)
define [StdFShapeT sink offset barleft sw] : sink
widths.lhs sw
g4 (RightSB + RBalance2 - (OX - O) - offset) (CAP - Hook * 0.75 - SmallFOvershoot2)
hookstart (CAP - O - SmallFOvershoot2 - offset) (tight -- true)
flat (barleft + offset) (CAP - SmoothA * 0.8 - SmallFOvershoot2)
[if offset corner curl] (barleft + offset) 0 [heading Downward]
if offset {[corner (RightSB + RBalance2 - (OX - O) - offset) 0]} {}
create-glyph : glyph-proc
include : MarkSet.b
local barleft : [mix SB RightSB 0.35] - Stroke * 0.25 * HVContrast
include : StdFShapeT dispiro 0 barleft Stroke
create-derived 'f.straight' : glyph-proc
include : HBarTop SB [mix SB RightSB 0.95] fbar
create-derived 'fltail' 0x192
VerticalHook (barleft + HalfStroke * HVContrast) 0 (-HookX) Hook
create-derived 'f.serifed' : SmallFBottomSerif
create-derived 'f.straightTailed' : glyph-proc
include : MarkSet.if
include : VBarLeft barleft 0 (Descender * 0.9)
alias 'lenisf' 0xAB35 'f.straight'
create-derived 'f.phoneticLeft' : glyph-proc
include : HBarTop SB RightSB fbar
if SLAB : include : SmallFBottomSerif
glyph-block-import Letter-Blackboard : BBS BBD
create-glyph 'mathbb/f' 0x1D557 : glyph-proc
include : MarkSet.b
local barleft : [mix SB RightSB 0.35] - BBD * 0.25 * HVContrast
include : StdFShapeT dispiro 0 barleft BBS
include : intersection
VBarLeft (barleft + BBD) 0 CAP BBS
StdFShapeT spiro-outline 1 barleft BBS
include : difference
HBarTop SB [mix SB RightSB 0.95] fbar BBS
Rect CAP 0 barleft (barleft + BBD)
include : HBarBottom barleft (barleft + BBD) 0 BBS
define dfNarrowF : DivFrame para.diversityF
define [NarrowFShape df m bh counterHook] : glyph-proc
local crossLeft : mix 0 SB m
local crossRight : mix df.width df.rightSB m
local barLeft : [mix crossLeft crossRight 0.42] - Stroke * 0.375 * HVContrast + df.width / 32
local tTurn : Math.max (Hook * [Math.min 1 : Math.sqrt df.div]) (Stroke * 1.375) : Math.min Hook (Stroke * 1.75)
include : dispiro
widths.lhs
flat crossRight CAP
curl [Math.min (barLeft + tTurn) (crossRight - 0.1)] CAP
archv
flat barLeft [Math.max XH (CAP - tTurn)]
curl barLeft 0 [heading Downward]
include : HBarTop crossLeft crossRight bh
if (counterHook === 1) : begin
include : VerticalHook (barLeft + HalfStroke * HVContrast) 0 (-HookX) Hook
if (counterHook === 2) : begin
local barRight : barLeft + Stroke * HVContrast
local counterHookLeft : barRight - (crossRight - barLeft)
include : dispiro
widths.lhs
flat counterHookLeft Descender
curl [Math.max (barRight - tTurn) (counterHookLeft + 0.1)] Descender
archv
flat barRight [Math.min 0 (Descender + tTurn)]
curl barRight 0.1 [heading Upward]
create-glyph 'f.narrow' : glyph-proc
set-width dfNarrowF.width
include : dfNarrowF.markSet.b
include : NarrowFShape dfNarrowF 0.5 fbar
create-glyph 'f.flatHook' : glyph-proc
include : MarkSet.b
include : NarrowFShape [DivFrame 1] 1 fbar
create-glyph 'f.flatHookCrossbarAtXHeight' : glyph-proc
include : MarkSet.b
include : NarrowFShape [DivFrame 1] 1 XH
create-glyph 'f.flatHookSerifed' : glyph-proc
include : MarkSet.b
include : NarrowFShape [DivFrame 1] 1 fbar
include : WithTransform [Translate ((RightSB - SB) * 0.035) 0] : SmallFBottomSerif
create-glyph 'f.flatHookSerifedCrossbarAtXHeight' : glyph-proc
include : MarkSet.b
include : NarrowFShape [DivFrame 1] 1 XH
include : WithTransform [Translate ((RightSB - SB) * 0.035) 0] : SmallFBottomSerif
create-glyph 'f.flatHookRoundTailed' : glyph-proc
include : MarkSet.if
include : NarrowFShape [DivFrame 1] 1 fbar 1
create-glyph 'f.flatHookRoundTailedCrossbarAtXHeight' : glyph-proc
include : MarkSet.if
include : NarrowFShape [DivFrame 1] 1 XH 1
create-glyph 'f.flatHookFlatTailed' : glyph-proc
include : MarkSet.if
include : NarrowFShape [DivFrame 1] 1 fbar 2
create-glyph 'f.flatHookFlatTailedCrossbarAtXHeight' : glyph-proc
include : MarkSet.if
include : NarrowFShape [DivFrame 1] 1 XH 2
create-glyph 'f.tailed' : glyph-proc
include [refer-glyph 'longs.italic'] AS_BASE
include : HBarTop (Middle - LongJut) (Middle + LongJut) fbar
select-variant 'f' 'f'
turned 'turnf.straight' nothing 'f.straight' Middle (XH / 2) [MarkSet.p]
turned 'turnf.serifed' nothing 'f.serifed' Middle (XH / 2) [MarkSet.p]
turned 'turnf.straightTailed' nothing 'f.straightTailed' Middle (XH / 2) [MarkSet.if]
turned 'turnf.tailed' nothing 'f.tailed' Middle [mix Descender CAP 0.5] [MarkSet.if]
turned 'turnf.flatHook' nothing 'f.flatHook' Middle (XH / 2) [MarkSet.p]
turned 'turnf.flatHookCrossbarAtXHeight' nothing 'f.flatHookCrossbarAtXHeight' Middle (XH / 2) [MarkSet.p]
turned 'turnf.flatHookSerifed' nothing 'f.flatHookSerifed' Middle (XH / 2) [MarkSet.p]
turned 'turnf.flatHookSerifedCrossbarAtXHeight' nothing 'f.flatHookSerifedCrossbarAtXHeight' Middle (XH / 2) [MarkSet.p]
turned 'turnf.flatHookRoundTailed' nothing 'f.flatHookRoundTailed' Middle [mix Descender CAP 0.5] [MarkSet.if]
turned 'turnf.flatHookRoundTailedCrossbarAtXHeight' nothing 'f.flatHookRoundTailedCrossbarAtXHeight' Middle [mix Descender CAP 0.5] [MarkSet.if]
turned 'turnf.flatHookFlatTailed' nothing 'f.flatHookFlatTailed' Middle [mix Descender CAP 0.5] [MarkSet.if]
turned 'turnf.flatHookFlatTailedCrossbarAtXHeight' nothing 'f.flatHookFlatTailedCrossbarAtXHeight' Middle [mix Descender CAP 0.5] [MarkSet.if]
turned 'turnf.narrow' nothing 'f.narrow' dfNarrowF.middle (XH / 2) [dfNarrowF.markSet.p]
select-variant 'turnf' 0x25F (follow -- 'f')
do "f ligatures"
local shift (-(Width * 0.055 + SB * 0.5))
local barr RightSB
local hbarleft (SB + shift + Stroke * [if para.slopeAngle 0.5 0.25])
create-glyph 'f_i' 0xFB01 : glyph-proc
include : MarkSet.b
include : new-glyph : glyph-proc
include : refer-glyph "longs"
include : Translate shift 0
include : VBarRight barr 0 fbar
include : HBarTop hbarleft barr fbar
if SLAB : begin
if para.isItalic
: then : include : tagged 'serifRB' : RightwardBottomSerif barr 0 SideJut
: else : include : tagged 'serifRB' : CenterBottomSerif (barr - HalfStroke * HVContrast) 0 Jut
create-glyph 'f_l.upright' : glyph-proc
local m : Middle - JBalance - HalfStroke * HVContrast + shift
include : dispiro
widths.rhs
flat m 0 [heading Upward]
curl m (CAP - SmoothA)
hookend (CAP - O)
g4 (barr + OXHook) (CAP - Hook)
include : VBarRight barr 0 (CAP - Hook)
include : dispiro
widths.rhs
flat ([Math.min (m - Stroke * 0.3) hbarleft] - TanSlope * HalfStroke) fbar
curl ([mix SB barr 0.6] - TanSlope * HalfStroke) fbar
if SLAB : begin
include : tagged 'serifLB' : CenterBottomSerif (m + HalfStroke * HVContrast + RBalance * 0.35) 0 (Jut + RBalance * 0.65)
include : tagged 'serifRB' : CenterBottomSerif (barr - HalfStroke * HVContrast) 0 Jut
create-glyph 'f_l.italic' : glyph-proc
include : new-glyph : glyph-proc
include [refer-glyph 'longs.italic'] AS_BASE
include : Translate shift 0
include : VBarRight barr 0 CAP
include : HBarTop hbarleft [mix SB barr 0.65] fbar
if SLAB : include : tagged 'serifRB' : RightwardBottomSerif barr 0 SideJut
italic-variant 'f_l' 0xFB02
glyph-block Letter-Latin-Upper-E : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Marks : markHalfStroke
glyph-block-import Letter-Latin-Upper-F : FShape RevFShape EFVJutLength
glyph-block-export EShape
define xEBarLeft : SB * 1.5
define [EShape] : params [top pyBar noSerif] : glyph-proc
define stroke : adviceBlackness2 2 3 CAP
include : FShape top pyBar true
include : HBarBottom (xEBarLeft - O) RightSB 0 stroke
if (SLAB && !noSerif) : begin
include : LeftwardTopSerif xEBarLeft top SideJut
include : LeftwardBottomSerif xEBarLeft 0 SideJut
local { jutTop jutBot } : EFVJutLength top pyBar stroke
include : DownwardRightSerif RightSB top jutTop
include : UpwardRightSerif RightSB 0 jutBot
glyph-block-export RevEShape
define [RevEShape] : params [top pyBar noSerif] : glyph-proc
define stroke : adviceBlackness2 2 3 CAP
define xEBarRight : Width - SB * 1.5
include : RevFShape top pyBar true
include : HBarBottom SB (xEBarRight + O) 0 stroke
if (SLAB && !noSerif) : begin
include : RightwardTopSerif xEBarRight top SideJut
include : RightwardBottomSerif xEBarRight 0 SideJut
local { jutTop jutBot } : EFVJutLength top pyBar stroke
include : DownwardLeftSerif SB top jutTop
include : UpwardLeftSerif SB 0 jutBot
create-glyph 'E' 'E' : glyph-proc
set-width Width
include : MarkSet.capital
include : EShape CAP
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
alias 'grek/Epsilon' 0x395 'E'
alias 'cyrl/Ie' 0x415 'E'
create-glyph 'revE' 0x18E : glyph-proc
set-width Width
include : MarkSet.capital
include : RevEShape CAP
create-glyph 'smcpturnE' 0x2C7B : glyph-proc
include : MarkSet.e
include : EShape XH
include : FlipAround Middle (XH / 2)
glyph-block-import Letter-Blackboard : BBS BBD
create-glyph 'mathbb/E' 0x1D53C : glyph-proc
include : MarkSet.capital
include : union
VBarLeft (xEBarLeft + BBD) 0 CAP BBS
HBarBottom xEBarLeft (xEBarLeft + BBD) 0 BBS
difference
FShape CAP (noSerif -- true) (_stroke -- BBS)
Rect (CAP - BBS) BBS (xEBarLeft + BBS * HVContrast) (xEBarLeft + BBD)
HBarBottom (xEBarLeft - O) RightSB 0 BBS
glyph-block Letter-Latin-Lower-E : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-export SmallEShape RevSmallEShape
define [SmallEShape] : params [top stroke barpos curly [bbd 0]] : glyph-proc
local barbottom : top * [fallback barpos designParameters.eBarPos] - (stroke / 2)
local hookx (RightSB - OXHook + TailAdjX * TanSlope)
local hookmiddle : [mix (SB + O) hookx 0.55] + CorrectionOMidS
local hook : Math.min AHook : if para.isItalic top (stroke / 2 + (top - stroke * 3) / 4)
include : dispiro
widths.lhs stroke
flat (RightSB - OX) barbottom [heading Upward]
curl (RightSB - OX) (top - SmallSmoothB)
arcvh
g4 (Middle - CorrectionOMidS) (top - O)
archv
flat (SB + OX) (top - SmallSmoothA)
curl (SB + OX) (0 + SmallSmoothB)
hookend O (sw -- stroke)
g4 (RightSB - OX * [if para.isItalic 0 0.5]) hook
include : HBarBottom (SB + (stroke / 2) + OX + bbd) (RightSB - (stroke / 2) - OX) barbottom stroke
create-glyph 'e' 'e' : glyph-proc
include : MarkSet.e
include : SmallEShape XH [adviceBlackness2 2 3 XH]
glyph-block-import Letter-Blackboard : BBS BBD
create-glyph 'mathbb/e' 0x1D556 : glyph-proc
include : MarkSet.e
include : SmallEShape XH BBS (bbd -- BBD)
include : intersection
OShapeOutline.NoOvershoot XH 0 SB RightSB BBS
union
VBarLeft (SB + BBD + OX) 0 XH BBS
VBarRight (RightSB - BBD - OX) (XH * designParameters.eBarPos) XH BBS
create-glyph 'Schwa' 0x18F : glyph-proc
include : MarkSet.capital
include : SmallEShape CAP [adviceBlackness2 2 3 CAP]
include : FlipAround Middle (CAP / 2)
alias 'cyrl/ie' 0x435 'e'
turned 'turne' 0x1DD 'e' Middle (XH / 2)
alias 'schwa' 0x259 'turne'
alias 'cyrl/schwa' 0x4D9 'turne'
alias 'cyrl/Schwa' 0x4D8 'Schwa'
define [RevSmallEShape top stroke barpos] : glyph-proc
local barbottom (top * [fallback barpos designParameters.eBarPos] - HalfStroke)
local hookx SB
local hookmiddle : [mix (RightSB - O) hookx 0.55] + CorrectionOMidS
include : dispiro
widths.rhs stroke
flat (SB + OX) barbottom [heading Upward]
curl (SB + OX) (top - SmallSmoothA)
arcvh
g4 Middle (top - O)
archv
flat (RightSB - OX) (top - SmallSmoothB)
curl (RightSB - OX) SmallSmoothA
hookend O (sw -- stroke)
g4 (SB + O) AHook
include : HBarBottom (SB + (stroke / 2)) (RightSB - (stroke / 2)) barbottom stroke
create-glyph 'reve' 0x258 : glyph-proc
include : MarkSet.e
include : RevSmallEShape XH [adviceBlackness2 2 3 XH]
glyph-block Letter-Latin-Upper-T : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Blackboard : BBS BBD
define TLeftX : SB + OX * 1.5
define TRightX : RightSB - OX * 1.5
define [TShape top] : glyph-proc
include : VBar Middle 0 top
local l TLeftX
local r TRightX
include : tagged 'strokeLT' : HBarTop l Middle top
include : tagged 'strokeRT' : HBarTop Middle r top
if SLAB : begin
include : tagged 'serifRT' : DownwardRightSerif r top VJut MVertStroke
include : tagged 'serifLT' : DownwardLeftSerif l top VJut MVertStroke
include : tagged 'serifMB' : RightwardBottomSerif Middle 0 MidJutCenter
include : tagged 'serifMB' : LeftwardBottomSerif Middle 0 MidJutCenter
create-glyph 'T' 'T' : glyph-proc
include : MarkSet.capital
set-base-anchor 'bottomright' (Middle + HalfStroke * HVContrast) 0
include : TShape CAP
create-derived 'cyrl/Tedescender' 0x4AC : glyph-proc
include : CyrDescender (Middle + HalfStroke * HVContrast) (sideJut -- MidJutCenter - HalfStroke * HVContrast)
include : MarkSet.if
create-derived 'Tbar' 0x166
HOverlayBar [mix Middle SB 0.8] [mix Middle RightSB 0.8] [mix 0 CAP 0.45]
create-derived 'Thookleft' 0x1AC : glyph-proc
eject-contour 'serifLT'
eject-contour 'strokeLT'
include : LeftHook (SB + LeftHook.extension) CAP Middle
create-glyph 'mathbb/T' 0x1D54B : glyph-proc
include : MarkSet.capital
include : HBarTop TLeftX TRightX CAP BBS
include : VBar (Middle - BBD / 2) 0 CAP BBS
include : VBar (Middle + BBD / 2) 0 CAP BBS
include : HBarBottom (Middle - BBD / 2) (Middle + BBD / 2) 0 BBS
alias 'grek/Tau' 0x3A4 'T'
alias 'cyrl/Te' 0x422 'T'
turned 'turnT' 0xA7B1 'T' Middle (CAP / 2)
create-glyph 'cyrl/te.upright' : glyph-proc
include : MarkSet.e
include : TShape XH
create-derived 'cyrl/tedescender.upright' : glyph-proc
include : MarkSet.p
include : CyrDescender (Middle + HalfStroke * HVContrast) (sideJut -- MidJutCenter - HalfStroke * HVContrast)
italic-variant 'cyrl/tedescender' 0x4AD
create-glyph 'grek/tau' 0x3C4 : glyph-proc
include : MarkSet.e
include : HBar SB RightSB (XH - HalfStroke)
include : VBar Middle 0 XH
glyph-block Letter-Latin-Lower-T : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared : CreateCommaCaronComposition
glyph-block-import Letter-Shared-Shapes : CurlyTail
define xSmallTBarLeft : Middle - TBalance - Stroke * 0.5 * HVContrast
define [SmallTHookShapeT sink offset top bot sw] : begin
local hookx : xSmallTBarLeft + (Width - SB * 2) * 0.8 + Stroke * 0.25 * HVContrast
local turn : [mix xSmallTBarLeft hookx 0.5] + CorrectionOMidS
local smb : Math.max Hook ((turn - xSmallTBarLeft) * 1.2)
return : sink
widths.lhs sw
[if (sink == spiro-outline) corner flat] (offset + xSmallTBarLeft) top [heading Downward]
curl (offset + xSmallTBarLeft) (bot + smb)
hookend (bot + O + offset) (tight -- !para.isItalic)
g4 (hookx - offset) (bot + Hook)
if (sink == spiro-outline) {[corner (hookx - offset) top]} {}
define [SmallTShape top bot] : glyph-proc
local G : SmallTHookShapeT dispiro 0 top bot Stroke
local g : G.call currentGlyph # Not using include
set-base-anchor 'bottomright' g.knots.(g.knots.length - 1).x g.knots.(g.knots.length - 1).y
set-base-anchor 'below' [mix xSmallTBarLeft g.knots.(g.knots.length - 1).x : StrokeWidthBlend 0.375 0.5] bot
include : HBarTop
xSmallTBarLeft + HalfStroke - LongJut + TBalance2
xSmallTBarLeft + HalfStroke + LongJut + TBalance2
begin XH
create-glyph 't.standard' : glyph-proc
set-width Width
include : MarkSet.b
include : SmallTShape CAP 0
glyph-block-import Letter-Blackboard : BBS BBD
create-glyph 'mathbb/t' 0x1D565 : glyph-proc
include : HBarTop xSmallTBarLeft (xSmallTBarLeft + BBD) CAP BBS
include : SmallTHookShapeT dispiro 0 CAP 0 BBS
include : intersection
VBarLeft (xSmallTBarLeft + BBD) 0 CAP BBS
SmallTHookShapeT spiro-outline 1 CAP 0 BBS
include : difference
HBarTop
xSmallTBarLeft + (BBD / 2) - LongJut + TBalance2
xSmallTBarLeft + (BBD / 2) + LongJut + TBalance2
begin XH
begin BBS
Rect CAP 0 xSmallTBarLeft (xSmallTBarLeft + BBD)
define [TFlatShape df top m ext] : glyph-proc
local xCrossLeft : mix 0 SB m
local xCrossRight : mix df.width df.rightSB m
local xBarLeft : [mix xCrossLeft xCrossRight 0.42] - Stroke * 0.375 * HVContrast
local tTurn : Math.max (Hook * [Math.min 1 : Math.sqrt df.div]) (Stroke * 1.375) : Math.min Hook (Stroke * 1.75)
include : union
HBarTop xCrossLeft (xCrossRight + ext) XH
dispiro
widths.rhs
flat xCrossRight 0
curl [Math.min (xBarLeft + tTurn) (xCrossRight - 1)] 0
archv
flat xBarLeft tTurn
curl xBarLeft top [heading Upward]
set-base-anchor 'topright' xCrossRight CAP
create-glyph 't.flatHook' : glyph-proc
include : MarkSet.b
include : TFlatShape [DivFrame 1] CAP 1 0
create-glyph 't.flatHookShortNeck' : glyph-proc
include : MarkSet.b
include : TFlatShape [DivFrame 1] [Math.min CAP ([mix XH CAP 0.75] + Stroke * 0.25)] 1 0
create-glyph 't.flatHookShortNeck2' : glyph-proc
include : MarkSet.b
include : TFlatShape [DivFrame 1] [Math.min CAP ([mix XH CAP 0.625] + Stroke * 0.25)] 1 0
define dfNarrowT : DivFrame para.diversityF
create-glyph 't.narrow' : glyph-proc
set-width dfNarrowT.width
include : dfNarrowT.markSet.b
include : TFlatShape dfNarrowT CAP 0.5 0
create-glyph 't.phoneticLeft' : glyph-proc
local df : DivFrame 1
set-width df.width
include : df.markSet.b
include : TFlatShape df CAP 1 0
create-glyph 't.phoneticLeft.extended' : glyph-proc
local df : DivFrame 1
set-width df.width
include : df.markSet.b
include : intersection
TFlatShape df CAP 1 Width
Rect CAP 0 SB (Middle + Width)
create-glyph 't.cross' : glyph-proc
set-width Width
include : MarkSet.b
include : VBar Middle 0 CAP
include : HBarTop (Middle - LongJut) (Middle + LongJut) XH
create-glyph 't.hooklessAsymmetric' : glyph-proc
set-width Width
include : MarkSet.b
include : VBarLeft xSmallTBarLeft 0 CAP
include : HBarTop xSmallTBarLeft (Middle + LongJut) XH
select-variant 't' 't'
turned 'turnt.standard' nothing 't.standard' Middle (XH / 2) [MarkSet.p]
turned 'turnt.cross' nothing 't.cross' Middle (XH / 2) [MarkSet.p]
turned 'turnt.flatHook' nothing 't.flatHook' Middle (XH / 2) [MarkSet.p]
turned 'turnt.hooklessAsymmetric' nothing 't.hooklessAsymmetric' Middle (XH / 2) [MarkSet.p]
turned 'turnt.flatHookShortNeck' nothing 't.flatHookShortNeck' Middle (XH / 2) [MarkSet.p]
turned 'turnt.flatHookShortNeck2' nothing 't.flatHookShortNeck2' Middle (XH / 2) [MarkSet.p]
turned 'turnt.narrow' nothing 't.narrow' dfNarrowT.middle (XH / 2) [dfNarrowT.markSet.p]
select-variant 'turnt' 0x287 (follow -- 't')
CreateCommaCaronComposition 't' 'tcaron' 0x165
create-glyph 'tltail' 0x1AB : glyph-proc
include : MarkSet.if
include : refer-glyph 't.standard'
local attach : currentGlyph.gizmo.unapply [query-glyph 't.standard'].baseAnchors.bottomright
include : VBarRight attach.x 0 attach.y
include : VerticalHook (attach.x - HalfStroke * HVContrast) 0 (-HookX) Hook
create-glyph 'thooktop' 0x1AD : glyph-proc
include : MarkSet.e
include : SmallTShape (XH - HalfStroke) 0
include : VerticalHook (xSmallTBarLeft + HalfStroke * HVContrast) XH HookX (-Hook)
create-glyph 'trtail' 0x288 : glyph-proc
include : MarkSet.if
include : SmallTShape CAP Descender
create-glyph 'tcurlytail' 0x236 : glyph-proc
include : MarkSet.b
local fine : adviceBlackness 3.5
local rinner : LongJut / 2 - fine / 2
local x2 : mix SB xSmallTBarLeft 0.4
local y2 : -fine
include : HBarTop (xSmallTBarLeft + HalfStroke - LongJut + TBalance2) (xSmallTBarLeft + HalfStroke + LongJut + TBalance2) XH
include : dispiro
widths.lhs
flat xSmallTBarLeft CAP [heading Downward]
curl xSmallTBarLeft (fine + rinner * 2)
CurlyTail fine rinner (xSmallTBarLeft+ Stroke * HVContrast) 0 (xSmallTBarLeft + Stroke * HVContrast + LongJut) x2 y2
create-glyph 'tbar' 0x167 : glyph-proc
include [refer-glyph "t.standard"] AS_BASE
include : HOverlayBar ([mix Middle SB 0.7] - TBalance * 0.5 - Stroke * 0.25 * HVContrast) ([mix Middle RightSB 0.7] - TBalance * 0.5 - Stroke * 0.25 * HVContrast) [mix 0 XH 0.6]
glyph-block Letter-Latin-S : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Blackboard : BBS BBD
define SOBot OX
define [SmallSTensionCoeff stroke] : mix [StrokeWidthBlend 1 0.375 stroke] 1 : clamp 0 1 : Math.pow (Width / (UPM * 0.55)) 0.5
define [SmallSDistCoeff] : Math.min 0.25 (0.1 * [Math.max 1 (Width / HalfUPM)])
glyph-block-export SNeck
define [SNeck] : params [[stroke Stroke] [slantCoeff 0] [tensionCoeff 1] [dist 0.1]] : begin
define strokeCoeff : StrokeWidthBlend 0 1 stroke
define tension : tensionCoeff * (0.5 - 0.4 * dist - 0.005 * strokeCoeff + slantCoeff * TanSlope)
return : alsoThruThem {{(0.5 - dist) tension} {(0.5 + dist) (1 - tension)}} [widths.center stroke]
glyph-block-export SStroke
define [SStroke] : params [[stroke : adviceBlackness2 2 3 CAP] [refSwEss Ess]] : begin
local ess : refSwEss * stroke / Stroke
define smooth : adviceSSmooth CAP (-1) stroke
return : dispiro
widths.lhs stroke
g4 RightSB (CAP - Hook)
hookstart (CAP - O) (sw -- stroke) (swItalicAdj -- Stroke)
g4 SB (CAP - smooth)
alsoThru.g2 0.5 0.5 [widths.center ess]
g4 (RightSB - SOBot) smooth [widths 0 stroke]
hookend O (sw -- stroke) (swItalicAdj -- Stroke)
g4 (SB + SOBot) Hook
define [RevSStroke] : begin
local stroke : adviceBlackness2 2 3 CAP
local ess : Ess * stroke / Stroke
local smooth : adviceSSmooth CAP 0.5 stroke
return : dispiro
widths.rhs stroke
g4 SB (CAP - Hook)
hookstart (CAP - O) (sw -- stroke) (swItalicAdj -- Stroke)
g4 RightSB (CAP - smooth)
alsoThru.g2 0.5 0.5 [widths.center ess]
g4 (SB + SOBot) smooth [widths stroke 0]
hookend O (sw -- stroke) (swItalicAdj -- Stroke)
g4 (RightSB - SOBot) Hook
define [sStroke] : begin
define stroke : adviceBlackness2 2 3 XH
define ess : adviceBlackness2 2.2 3.2 XH
define strokeCoeff : StrokeWidthBlend 0 1 stroke
define smooth : adviceSSmooth XH (-1) stroke
return : dispiro
widths.lhs stroke
g4 (RightSB + OX / 4) (XH - SHook)
hookstart (XH - O) (sw -- stroke) (swItalicAdj -- Stroke)
g4 (SB + OX / 8) (XH - smooth)
SNeck (stroke -- ess) (slantCoeff -- -0.02) (dist -- [SmallSDistCoeff]) (tensionCoeff -- [SmallSTensionCoeff stroke])
g4 (RightSB - SOBot) (smooth) [widths 0 stroke]
hookend O (sw -- stroke) (swItalicAdj -- Stroke)
g4 (SB + SOBot) SHook
glyph-block-export SStrokeAlt
define [SStrokeAlt] : params [top hook swStart swEnd oXLeftTop offsetLT offsetRB offsetC] : begin
define stroke : Math.max swStart swEnd
define fine : Math.min swStart swEnd
define soStart : stroke - swStart
define soEnd : stroke - swEnd
define smooth : adviceSSmooth top (-1) stroke
return : dispiro
widths.lhs fine
g4 (RightSB + OX / 4 - HVContrast * soStart) (top - hook)
hookstart (top - O - soStart) (sw -- fine) (swItalicAdj -- Stroke) (noAdjTerminalY -- true)
g4 (SB + oXLeftTop + offsetLT.x) (top - smooth + offsetLT.y)
g2
offsetC.x + [mix (SB + oXLeftTop + offsetLT.x) (RightSB - SOBot - offsetRB.x) 0.5]
offsetC.y + [mix (top - smooth) (smooth) 0.5]
widths.center stroke
g4 (RightSB - SOBot - offsetRB.x) (smooth + offsetRB.y) [widths.rhs fine]
hookend (O + soEnd) (sw -- fine) (swItalicAdj -- Stroke) (noAdjTerminalY -- true)
g4 (SB + SOBot + HVContrast * soEnd) (hook) [widths.rhs fine]
define [sStrokePhoneticRight] : begin
define stroke : adviceBlackness2 2 3 XH
define ess : adviceBlackness2 2.2 3.2 XH
define strokeCoeff : StrokeWidthBlend 0 1 stroke
define smooth : adviceSSmooth XH (-1) stroke
return : dispiro
widths.lhs stroke
g4 (RightSB + OX / 4) (XH - SHook)
hookstart (XH - O) (sw -- stroke) (swItalicAdj -- Stroke)
g4 (SB + OX / 8) (XH - smooth)
SNeck (stroke -- ess) (slantCoeff -- -0.02) (dist -- [SmallSDistCoeff]) (tensionCoeff -- [SmallSTensionCoeff stroke])
g4 (RightSB - SOBot) (smooth) [widths 0 stroke]
arcvh
flat (Middle - CorrectionOMidS) 0 [widths 0 Stroke]
curl SB 0
define [RevsStroke] : begin
define stroke : adviceBlackness2 2 3 XH
define ess : adviceBlackness2 2.2 3.2 XH
define strokeCoeff : StrokeWidthBlend 0 1 stroke
define smooth : adviceSSmooth XH 0.75 stroke
return : dispiro
widths.rhs stroke
g4 SB (XH - SHook)
hookstart (XH - O) (sw -- stroke) (swItalicAdj -- Stroke)
g4 RightSB (XH - smooth)
SNeck (stroke -- ess) (slantCoeff -- 0.02) (dist -- [SmallSDistCoeff]) (tensionCoeff -- [SmallSTensionCoeff stroke])
g4 (SB + SOBot) (smooth) [widths stroke 0]
hookend O (sw -- stroke) (swItalicAdj -- Stroke)
g4 (RightSB - SOBot) SHook
create-glyph 'S' 'S' : glyph-proc
include : MarkSet.capital
include : SStroke
alias 'cyrl/Dze' 0x405 'S'
create-glyph 's' 's' : glyph-proc
include : MarkSet.e
include : sStroke
alias 'cyrl/dze' 0x455 's'
create-glyph 's.phoneticRight' : glyph-proc
include : MarkSet.e
include : sStrokePhoneticRight
create-glyph 'revS' 0x1A7 : glyph-proc
include : MarkSet.capital
include : RevSStroke
create-glyph 'revs' 0x1A8 : glyph-proc
include : MarkSet.e
include : RevsStroke
alias 'cyrl/ghe.italic' null 'revs'
create-glyph 'mathbb/S' 0x1D54A : glyph-proc
include : MarkSet.capital
define theta : Math.PI / 4
foreach sign [items-of { 1 (-1) }] : begin
include : SStrokeAlt
top -- CAP
hook -- Hook
swStart -- BBS * [if (sign > 0) CThin 1]
swEnd -- BBS * [if (sign < 0) CThin 1]
oXLeftTop -- O
ess -- BBD
offsetC -- {
.x (0.5 * sign * BBD * [Math.sin theta])
.y (0.5 * sign * BBD * [Math.cos theta])
}
offsetLT -- {
.x [if (sign > 0) (BBD / 2) 0]
.y ([if (sign > 0) 0.25 0.375] * sign * BBD * [Math.cos theta])
}
offsetRB -- {
.x [if (sign < 0) (BBD / 2) 0]
.y ([if (sign < 0) 0.25 0.375] * sign * BBD * [Math.cos theta])
}
create-glyph 'mathbb/s' 0x1D564 : glyph-proc
include : MarkSet.e
define theta : Math.PI / 5
foreach sign [items-of { 1 (-1) }] : begin
include : SStrokeAlt
top -- XH
hook -- SHook
swStart -- BBS * [if (sign > 0) CThin 1]
swEnd -- BBS * [if (sign < 0) CThin 1]
oXLeftTop -- (OX / 8)
ess -- BBD
offsetC -- {
.x (0.5 * sign * BBD * [Math.sin theta])
.y (0.5 * sign * BBD * [Math.cos theta])
}
offsetLT -- {
.x [if (sign > 0) (BBD / 2) 0]
.y ([if (sign > 0) 0.25 0.375] * sign * BBD * [Math.cos theta])
}
offsetRB -- {
.x [if (sign < 0) (BBD / 2) 0]
.y ([if (sign < 0) 0.25 0.375] * sign * BBD * [Math.cos theta])
}
create-glyph 'cyrl/ge.italic' : glyph-proc
include : MarkSet.b
local stroke : [RevsStroke].call currentGlyph
local start : currentGlyph.gizmo.unapply stroke.lhsKnots.0
include : VBarLeft start.x start.y (XH + Accent)
create-glyph 'cyrl/gheDescender.italic' : glyph-proc
include : MarkSet.b
local stroke : [RevsStroke].call currentGlyph
local start : currentGlyph.gizmo.unapply stroke.rhsKnots.(0)
include : VBarRight start.x (-Accent) start.y
create-glyph 'srtail' 0x282 : glyph-proc
include : MarkSet.p
local stroke : [sStroke].call currentGlyph
local start : currentGlyph.gizmo.unapply stroke.lhsKnots.(stroke.lhsKnots.length - 1)
include : new-glyph : glyph-proc
local sw : adviceBlackness2 2 3 XH
include : refer-glyph "rtailBR"
include : Upright
include : Translate (start.x + sw * HVContrast) 0
include : Italify
include : VBarLeft start.x 0 start.y
create-glyph 'Sswash' 0x2C7E : glyph-proc
include : MarkSet.if
local stroke : [SStroke].call currentGlyph
local start : currentGlyph.gizmo.unapply stroke.lhsKnots.(stroke.lhsKnots.length - 1)
local sw : adviceBlackness2 2 3 CAP
include : dispiro
widths.lhs [adviceBlackness 4.5]
g4 start.x start.y
alsoThru 0.15 0.6 important
flat (RightSB - 1) Descender [widths sw 0]
curl RightSB Descender
create-glyph 'sswash' 0x23F : glyph-proc
include : MarkSet.p
local stroke : [sStroke].call currentGlyph
local start : currentGlyph.gizmo.unapply stroke.lhsKnots.(stroke.lhsKnots.length - 1)
local sw : adviceBlackness2 2 3 XH
include : dispiro
widths.lhs [adviceBlackness 4.5]
g4 start.x start.y
alsoThru 0.15 0.6 important
flat (RightSB - 1) Descender [widths sw 0]
curl RightSB Descender
create-glyph 'dollar.open' : glyph-proc
include : MarkSet.capital
define top : CAP * 0.95
define bot : CAP * 0.05
define w : adviceBlackness 3
define fine : adviceBlackness 3.5
define smooth : adviceSSmooth (top - bot) (-1) w
include : dispiro
widths.lhs w
g4 RightSB (top - Hook)
hookstart (top - O)
g4 SB (top - smooth)
SNeck w
g4 RightSB (bot + smooth) [widths 0 w]
hookend (bot + O)
g4 SB (bot + Hook)
include : dispiro
widths.center w
flat Middle (top - HalfStroke)
curl Middle (CAP - Descender / 2) [heading Upward]
include : dispiro
widths.center w
flat Middle (Descender / 2) [heading Upward]
curl Middle (bot + HalfStroke)
create-derived 'dollar.through' : VBar Middle (bot + HalfStroke) (top - HalfStroke) fine
create-glyph 'dollar.opencap' : glyph-proc
include : MarkSet.capital
define top : CAP * 0.88
define bot : CAP * 0.12
define w : adviceBlackness 3
define fine : adviceBlackness 3.5
define smooth : adviceSSmooth (top - bot) (-1) w
include : dispiro
widths.lhs w
g4 RightSB (top - Hook)
hookstart (top - O)
g4 SB (top - smooth)
SNeck w
g4 RightSB (bot + smooth) [widths 0 w]
hookend (bot + O)
g4 SB (bot + Hook)
include : dispiro
widths.center w
flat Middle (top - HalfStroke)
curl Middle (CAP) [heading Upward]
include : dispiro
widths.center w
flat Middle (0) [heading Upward]
curl Middle (bot + HalfStroke)
create-derived 'dollar.throughcap' : VBar Middle (bot + HalfStroke) (top - HalfStroke) fine
select-variant 'dollar' '$'
glyph-block Letter-Latin-Z : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : HCurlyTail
glyph-block-import Letter-Blackboard : BBS BBD
create-glyph 'Z.standard' : glyph-proc
set-width Width
include : MarkSet.capital
local cor : 1.15 * HVContrast
include : HBarTop SB RightSB CAP
include : ReverseContours : spiro-outline
corner SB Stroke
corner (SB + Stroke * cor) Stroke
corner RightSB (CAP - Stroke)
corner (RightSB - Stroke * cor) (CAP - Stroke)
include : tagged 'strokeBottom' : HBarBottom SB RightSB 0
if SLAB : begin
include : DownwardLeftSerif SB CAP VJut
include : tagged 'serifRB' : UpwardRightSerif RightSB 0 VJut
create-derived 'Z.withHorizontalCrossBar' : refer-glyph 'barOver'
create-derived 'Z.withCrossBar' : refer-glyph 'antiSlashOver'
create-glyph 'z.standard' : glyph-proc
set-width Width
include : MarkSet.e
local cor : 1.2 * HVContrast
include : HBarTop SB RightSB XH
include : ReverseContours : spiro-outline
corner SB Stroke
corner (SB + Stroke * cor) Stroke
corner RightSB (XH - Stroke)
corner (RightSB - Stroke * cor) (XH - Stroke)
include : tagged 'strokeBottom' : HBarBottom SB RightSB 0
if SLAB : begin
include : DownwardLeftSerif SB XH VJut
include : tagged 'serifRB' : UpwardRightSerif RightSB 0 VJut
create-derived 'z.withHorizontalCrossBar' : refer-glyph 'barOver'
create-derived 'z.withCrossBar' : refer-glyph 'antiSlashOver'
select-variant 'Z' 'Z'
select-variant 'z' 'z'
alias 'grek/Zeta' 0x396 'Z.standard'
alias 'Zbar' 0x1B5 'Z.withHorizontalCrossBar'
alias 'zbar' 0x1B6 'z.withHorizontalCrossBar'
if [query-glyph 'Z'] : DoNotDeriveVariants.set [query-glyph 'Z']
if [query-glyph 'z'] : DoNotDeriveVariants.set [query-glyph 'z']
define [BBZShape top] : glyph-proc
include : HBarTop SB RightSB top BBS
include : HBarBottom SB RightSB 0 BBS
include : intersection
Rect top 0 SB RightSB
union
dispiro
widths.center BBS
corner SB (BBS / 2)
corner (RightSB - BBD) (top - BBS / 2)
dispiro
widths.center BBS
corner (SB + BBD) (BBS / 2)
corner RightSB (top - (BBS / 2))
include : intersection
union
VBarRight RightSB (top - BBS * 2) top BBS
VBarLeft SB 0 (BBS * 2) BBS
spiro-outline
corner SB (BBS / 2)
corner (RightSB - BBD) (top - BBS / 2)
corner RightSB (top - (BBS / 2))
corner (SB + BBD) (BBS / 2)
create-glyph 'mathbb/Z' 0x2124 : composite-proc [MarkSet.capital] [BBZShape CAP]
create-glyph 'mathbb/z' 0x1D56B : composite-proc [MarkSet.e] [BBZShape XH]
create-glyph 'Zdtail' 0x224 : glyph-proc
include [refer-glyph 'Z'] AS_BASE
eject-contour 'strokeBottom'
eject-contour 'serifRB'
include : dispiro
widths.lhs
flat SB 0 [heading Rightward]
curl (RightSB - HookX) 0
archv
straight.down.end RightSB (-Hook) [widths.heading 0 Stroke Downward]
create-glyph 'zdtail' 0x225 : glyph-proc
include [refer-glyph 'z'] AS_BASE
eject-contour 'strokeBottom'
eject-contour 'serifRB'
include : dispiro
widths.lhs
flat SB 0 [heading Rightward]
curl (RightSB - HookX) 0
archv
straight.down.end RightSB (-Hook) [widths.heading 0 Stroke Downward]
create-glyph 'Zswash' 0x2C7F : glyph-proc
include : MarkSet.if
local cor : 1.15 * HVContrast
include : HBarTop SB RightSB CAP
include : ReverseContours : spiro-outline
corner SB 0
corner (SB + Stroke * cor) 0
corner RightSB (CAP - Stroke)
corner (RightSB - Stroke * cor) (CAP - Stroke)
include : dispiro
widths.lhs
g4 SB 0
alsoThru 0.36 0.6 important
flat (RightSB - 1) Descender
curl RightSB Descender
if SLAB : begin
include : DownwardLeftSerif SB CAP VJut
create-glyph 'zswash' 0x240 : glyph-proc
include : MarkSet.p
local cor : 1.2 * HVContrast
include : HBarTop SB RightSB XH
include : ReverseContours : spiro-outline
corner SB 0
corner (SB + Stroke * cor) 0
corner RightSB (XH - Stroke)
corner (RightSB - Stroke * cor) (XH - Stroke)
include : dispiro
widths.lhs
g4 (SB - OXHook) 0
alsoThru 0.36 0.6 important
flat (RightSB - 1) Descender
curl RightSB Descender
if SLAB : begin
include : DownwardLeftSerif SB XH VJut
create-glyph 'Zdesc' 0x2C6B : glyph-proc
include [refer-glyph 'Z'] AS_BASE
eject-contour 'serifRB'
include : VBarRight [mix SB RightSB 1.05] (HalfStroke - LongJut) Stroke
create-glyph 'zdesc' 0x2C6C : glyph-proc
include [refer-glyph 'z'] AS_BASE
eject-contour 'serifRB'
include : VBarRight [mix SB RightSB 1.05] (HalfStroke - LongJut) Stroke
create-glyph 'zcurlytail' 0x291 : glyph-proc
include : MarkSet.e
local fine : adviceBlackness2 5 4 XH
local rinner : Math.max (XH * 0.04) (fine * 0.1)
local x2 : mix (SB + Stroke) RightSB 0.3
local x1 : mix x2 (RightSB - fine - rinner * 1.5) 0.45
local y2 : -XH * 0.2
local m1 : RightSB - fine / 2 - rinner * 1.5 + O
include : HCurlyTail fine Stroke rinner SB m1 (RightSB + fine / 2) x1 x2 y2
include : refer-glyph "z"
eject-contour 'strokeBottom'
eject-contour 'serifRB'
glyph-block Letter-Latin-Eszet : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Latin-S : SNeck
local ymiddle : [mix 0 CAP 0.5] - HalfStroke
local ymiddleCap : [mix 0 CAP 0.54] - HalfStroke
local xmiddle : RightSB - ymiddle / 2 - Stroke * 0.75
local xmiddleBot : RightSB - ymiddle / 2 - Stroke * 0.75
local xfinal : Math.min
xmiddle - 1 - Stroke * TanSlope
Math.max (SB + Stroke * 2) [mix SB RightSB (1 / 4)]
create-glyph 'eszet.traditional' : glyph-proc
set-width Width
include : MarkSet.if
local l : SB * 1
include : dispiro
widths.lhs
g4 ([mix SB RightSB 0.75] + HalfStroke * HVContrast) (CAP - Hook)
hookstart (CAP - O)
flat l XH
curl l 0 [heading Downward]
local t : mix 0 CAP 0.7
local tm : [mix Descender t 0.625] + HalfStroke
local tl : [mix l RightSB 0.35] + HalfStroke * HVContrast
include : HBarTop (l + 1) (RightSB - HalfStroke * 1.2 - OX) t
include : dispiro
widths.rhs
flat tl tm [heading Rightward]
curl (tl + 1) tm [heading Rightward]
g2 (RightSB - OX * 1.5) [mix Descender tm 0.70]
g2 (RightSB - OX * 1.5) [mix Descender tm 0.67]
alsoThru 0.5 0.75
g4 [mix SB RightSB 0.35] Descender
include : dispiro
widths.center (Stroke * 1.1)
corner tl (tm - Stroke) [heading Upward]
corner (RightSB - HalfStroke * 1.2 - OX) t [heading Upward]
piecewise
para.isItalic : include : VerticalHook (l + HalfStroke * HVContrast) 0 (-Hook * 1.2) Hook
SLAB : include : LeftwardBottomSerif SB 0 SideJut
create-glyph 'eszet.sulzbacher' : glyph-proc
include : MarkSet.capital
include : dispiro
widths.rhs
flat SB 0 [heading Upward]
curl SB XH
arcvh
g4 (Middle + O) (CAP - O)
archv
g4 (RightSB + O * 2) [mix CAP ymiddle 0.47]
g4.left.end xmiddle ymiddle [heading Leftward]
include : dispiro
widths.rhs
g4.right.start xmiddle (ymiddle + Stroke) [heading Rightward]
archv
g4 (RightSB - O) [mix 0 (ymiddle + Stroke) 0.5]
arcvh
flat xmiddleBot 0
curl xfinal 0 [heading Leftward]
piecewise
para.isItalic : include : VerticalHook (SB + HalfStroke * HVContrast) 0 (-Hook * 1.2) Hook
SLAB : include : LeftwardBottomSerif SB 0 SideJut
create-glyph 'eszet.longsslig' : glyph-proc
include : MarkSet.capital
define swOuter : adviceBlackness2 3 3 CAP
define strokeCoeff : StrokeWidthBlend 0 1 swInner
define sEndX : Math.max
SB + swOuter * HVContrast + (RightSB - SB - Stroke) * 0.1
mix SB RightSB 0.3
define widthInner : Width - swOuter * HVContrast - (RightSB - SB - Stroke) * 0.1
define swInner : adviceBlackness2 2 3 XH (widthInner / Width)
define sTopY : XH + swInner / 8
define smooth : SmoothBOf (swInner + (widthInner / Width) * ([adviceSSmooth XH (-1) swInner] - swInner)) widthInner
define sTurnX : Math.max sEndX [mix SB RightSB 0.3]
define sBotX : Math.max (sEndX + 1) [mix sEndX RightSB 0.30]
define sTopX : sTurnX + (RightSB - sBotX)
define sTopHookX : sTopX + 0.5 * swInner * HVContrast
include : dispiro
widths.rhs swOuter
flat SB 0 [heading Upward]
curl SB XH
arcvh
g4 ([mix SB sTopHookX 0.52] - CorrectionOMidX * swOuter) (CAP - O) [widths.rhs Stroke]
straight.down.end sTopHookX (sTopY - swInner - O) [widths.heading 0 swInner Downward]
include : dispiro
widths.lhs swInner
straight.left.start sTopX (sTopY - O) [widths.heading swInner 0 Leftward]
archv
g4 sTurnX (XH - smooth)
SNeck swInner (slantCoeff -- 0.02) (tensionCoeff -- [StrokeWidthBlend 0.99 0.975]) (dist -- 0.025)
g4 (RightSB - OX) (smooth) [widths 0 swInner]
hookend O (sw -- swInner) (swItalicAdj -- swOuter)
g4 (sEndX + OX) SHook
piecewise
para.isItalic : include : VerticalHook (SB + 0.5 * swOuter * HVContrast) 0 (-Hook * 1.2) Hook swOuter
SLAB : include : LeftwardBottomSerif SB 0 SideJut
select-variant 'eszet' 0xDF
create-glyph 'Eszet' 0x1E9E : glyph-proc
include : MarkSet.capital
local rightTopX : RightSB + O * 4
include : dispiro
widths.lhs
flat rightTopX CAP
curl Middle CAP
archv
flat SB XH
curl SB 0 [heading Downward]
include : dispiro
widths.rhs
g4 xmiddle (ymiddleCap + Stroke) [heading Rightward]
archv
g4 (RightSB - O * 2) [mix 0 (ymiddleCap + Stroke) 0.5]
arcvh
flat xmiddleBot 0
curl xfinal 0 [heading Leftward]
include : dispiro
widths.rhs
g4 rightTopX (CAP - Stroke)
g4 xmiddle (ymiddleCap + Stroke) [widths Stroke 0]
if SLAB : include : LeftwardBottomSerif SB 0 SideJut
glyph-block Letter-Latin-Upper-AE-OE : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Latin-Upper-F : EFVJutLength
create-glyph 'AE' 0xC6 : glyph-proc
define df : DivFrame para.diversityM 3
define eBarPos : designParameters.upperEBarPos SLAB
define sw : Math.min df.mvs : adviceBlackness2 3 3 CAP df.div
define eleft : df.middle - sw * 0.25 * HVContrast
define fine : adviceBlackness2 3 4 CAP df.div
define swVJut : Math.min sw ((df.rightSB - eleft - sw * HVContrast) * (4 / 5))
set-width df.width
include : df.markSet.capital
local turn : XH * 0.1
# A half
include : dispiro
widths.rhs sw
flat df.leftSB 0 [heading Upward]
curl df.leftSB (CAP * 0.1) [heading Upward]
quadcontrols 0 0.3 6 unimportant
g4 (eleft - HalfStroke) CAP [widths.rhs fine]
include : spiro-outline
corner (eleft - HalfStroke) CAP
corner eleft CAP
corner eleft (CAP - sw)
include : intersection
WithTransform [Translate (-O) 0] : spiro-outline
corner df.leftSB 0 [heading Upward]
curl df.leftSB (CAP * 0.1) [heading Upward]
quadcontrols 0 0.3 6 unimportant
corner (eleft - HalfStroke) CAP [widths.rhs fine]
corner eleft CAP
corner eleft 0
HBarTop 0 eleft (XH / 2) sw
# E half
include : VBarLeft eleft 0 CAP sw
include : HBarTop (eleft - O) df.rightSB CAP
include : HBar (eleft - O) (df.rightSB - sw / 4) (CAP * eBarPos)
include : HBarBottom (eleft - O) df.rightSB 0
if SLAB : begin
local { jutTop jutBot } : EFVJutLength CAP eBarPos sw
include : CenterBottomSerif (df.leftSB + sw / 2 * HVContrast) 0 Jut sw
include : DownwardRightSerif df.rightSB CAP jutTop swVJut
include : UpwardRightSerif df.rightSB 0 jutBot swVJut
alias 'cyrl/AE' 0x4D4 'AE'
define [OEShape top df] : glyph-proc
define eBarPos : designParameters.upperEBarPos SLAB
define sw : Math.min df.mvs : adviceBlackness2 3 3 top df.div
define eleft : df.middle - sw * [if SLAB (1 / 3) (1 / 4)] * HVContrast
define swVJut : Math.min sw ((df.rightSB - eleft - sw * HVContrast) * (4 / 5))
# O half
include : dispiro
widths.lhs sw 0
straight.left.start eleft top [heading Leftward]
archv
flat df.leftSB (top - SmoothA)
curl df.leftSB (SmoothB)
arcvh
straight.right.end eleft 0 [heading Rightward]
# E half
include : VBarLeft eleft 0 top sw
include : HBarTop (eleft - O) df.rightSB top sw
include : HBar (eleft - O) (df.rightSB - sw / 4) (top * 0.54) sw
include : HBarBottom (eleft - O) df.rightSB 0 sw
if SLAB : begin
local { jutTop jutBot } : EFVJutLength top eBarPos sw
include : DownwardRightSerif df.rightSB top jutTop swVJut
include : UpwardRightSerif df.rightSB 0 jutBot swVJut
create-glyph 'OE' 0x152 : glyph-proc
local df : DivFrame para.diversityM 3
set-width df.width
include : df.markSet.capital
include : OEShape CAP df
create-glyph 'smcpOE' 0x276 : glyph-proc
local df : DivFrame para.diversityM 3
set-width df.width
include : df.markSet.e
include : OEShape XH df
glyph-block Letter-Latin-Lower-AE-OE : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : nShoulder
define [GetSm df stroke] : begin
local sma : SmoothAOf [Math.max (stroke * 1.125) (SmallSmooth * 0.6 * df.div)] (Width * df.div)
local smb : SmoothBOf [Math.max (stroke * 1.125) (SmallSmooth * 0.6 * df.div)] (Width * df.div)
return { sma smb }
define [aeepart df] : glyph-proc
local eLeft : df.middle - df.mvs / 2 * HVContrast + 0.1
local eMiddle : [mix eLeft (df.rightSB - OX * 2) 0.5] - df.mvs * TanSlope
local barbottom (XH * designParameters.eBarPos - df.mvs / 2)
local { sma smb } : GetSm df df.mvs
include : difference
union
dispiro
widths.lhs df.mvs
flat (df.rightSB - OX * 2) barbottom [heading Upward]
curl (df.rightSB - OX * 2) (XH - smb)
arcvh
g4 eMiddle (XH - O)
archv
flat eLeft (XH - sma)
curl eLeft smb
hookend O (tight -- true) (sw -- df.mvs)
g4 (df.rightSB - OX * 2) (AHook + df.mvs * TanSlope) [heading Upward]
HBarBottom (eLeft + df.mvs / 2) (df.rightSB - OX * 2 - df.mvs / 2) barbottom df.mvs
Rect barbottom (barbottom - XH * 0.05) eMiddle df.width
define [aeapart df] : glyph-proc
local bartop (XH * OverlayPos * 1.02 + df.mvs / 2)
local abarRight : df.middle + df.mvs / 2 * HVContrast - 0.1
local lowmiddle : mix (df.leftSB + OX * 2) abarRight 0.5
local barsmooth : mix df.leftSB abarRight 0.7
local { sma smb } : GetSm df df.mvs
include : dispiro
widths.rhs df.mvs
g4 (df.leftSB + OX) (XH - AHook - df.mvs * TanSlope) [heading Upward]
hookstart (XH - O) (tight -- true) (sw -- df.mvs)
flat abarRight (XH - smb)
curl abarRight smb
arcvh
g4 lowmiddle O [heading Leftward]
archv
g4 (df.leftSB + OX * 2) [mix 0 bartop 0.45]
arcvh
flat barsmooth bartop
curl (abarRight - 1) bartop [heading Rightward]
define [oeopart df] : glyph-proc
local abarRight : df.middle + df.mvs / 2 * HVContrast
local { sma smb } : GetSm df df.mvs
include : OShape XH 0 (df.leftSB + OX) (abarRight + OX) df.mvs sma smb
define [ueupart df] : glyph-proc
local abarRight : df.middle + df.mvs / 2 * HVContrast
local { sma smb } : GetSm df df.mvs
include : nShoulder
left -- abarRight
right -- (df.rightSB - OX)
stroke -- df.mvs
sma -- smb
smb -- smb
include : FlipAround (df.width / 2) (XH / 2)
create-glyph 'ae' 0xE6 : glyph-proc
local df : DivFrame para.diversityM 3
set-width df.width
include : df.markSet.e
include : aeapart df
include : aeepart df
alias 'cyrl/ae' 0x4D5 'ae'
turned 'turnae' 0x1D02 'ae' [DivFrame para.diversityM].middle (XH / 2)
create-glyph 'oe' 0x153 : glyph-proc
local df : DivFrame para.diversityM 3
set-width df.width
include : df.markSet.e
include : oeopart df
include : aeepart df
turned 'turnoe' 0x1D14 'oe' [DivFrame para.diversityM].middle (XH / 2)
create-glyph 'ue' 0x1D6B : glyph-proc
local df : DivFrame para.diversityM 3
set-width df.width
include : df.markSet.e
include : new-glyph : glyph-proc
include : ueupart df
include : aeepart df
create-glyph 'db' 0x238 : glyph-proc
local df : DivFrame para.diversityM 3
set-width df.width
include : df.markSet.b
include : oeopart df
include : FlipAround df.middle (XH / 2)
include : oeopart df
include : VBar df.middle (XH / 2) CAP MVertStroke
if SLAB : begin
include : LeftwardTopSerif (df.middle - MVertStroke / 2 * HVContrast) CAP SideJut
create-glyph 'qp' 0x239 : glyph-proc
local df : DivFrame para.diversityM 3
set-width df.width
include : df.markSet.p
include : oeopart df
include : FlipAround df.middle (XH / 2)
include : oeopart df
include : VBar df.middle Descender (XH / 2) MVertStroke
if SLAB : begin
include : CenterBottomSerif df.middle Descender Jut
glyph-block Letter-Latin-OU : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
create-glyph 'OU' 0x222 : glyph-proc
include : MarkSet.capital
include : OShape (CAP * HBarPos + HalfStroke) 0 SB RightSB nothing SmoothA SmoothB
include : dispiro
widths.lhs
flat SB CAP [heading Downward]
curl SB (CAP * HBarPos - O - HalfStroke + SmoothB)
arcvh
g4 (Middle + CorrectionOMidS) (CAP * HBarPos - O - HalfStroke + (Stroke * (1 - CThin))) [widths.lhs (Stroke * CThin)]
archv
flat RightSB (CAP * HBarPos - O - HalfStroke + SmoothA) [widths.lhs]
curl RightSB CAP [heading Upward]
create-glyph 'ou' 0x223 : glyph-proc
include : MarkSet.b
local bar : StrokeWidthBlend (XH * 0.9) XH
include : OShape bar 0 SB RightSB
include : dispiro
widths.lhs
flat SB CAP [heading Downward]
curl SB (bar - O - Stroke + SmoothB)
arcvh
g4 (Middle + CorrectionOMidS) (bar - O - Stroke + (Stroke * (1 - CThin))) [widths.lhs (Stroke * CThin)]
archv
flat RightSB (bar - O - Stroke + SmoothA) [widths.lhs]
curl RightSB CAP [heading Upward]
glyph-block Letter-Latin-IJ : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
create-glyph 'IJ' 0x132 : glyph-proc
include : MarkSet.capital
include : new-glyph : glyph-proc
include : refer-glyph "I.straight"
include : Translate (SB - Middle + HalfStroke * HVContrast) 0
include : new-glyph : glyph-proc
include : refer-glyph "J.shorthook"
include : Translate JBalance2 0
create-glyph 'ij' 0x133 : glyph-proc
include : MarkSet.if
include : new-glyph : glyph-proc
include [refer-glyph 'dotlessi.straight'] AS_BASE
include : refer-glyph "dotAbove"
include : Translate (SB * 1.5 - Middle + HalfStroke * HVContrast) 0
include : new-glyph : glyph-proc
include [refer-glyph 'dotlessj.straight'] AS_BASE
include : refer-glyph "dotAbove"
include : Translate (RightSB - SB * 0.5 - Middle - JBalance - HalfStroke * HVContrast) 0
glyph-block Letter-Latin-Ezh : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : CurlyTail
glyph-block-export EzhShape
define [EzhShape] : params [top bot pleft pright hookless] : glyph-proc
local cor : 1.2 * HVContrast
local yMidBar : mix bot top 0.6
local ezhLeft : mix SB RightSB [fallback pleft 0.2]
local ezhRight : mix SB RightSB [fallback pright 0.925]
include : HBarTop SB ezhRight top
include : ReverseContours : spiro-outline
corner ezhLeft yMidBar
corner (ezhLeft + Stroke * cor) (yMidBar - HalfStroke)
corner (ezhLeft + Stroke * cor) yMidBar
corner ezhRight (top - Stroke)
corner (ezhRight - Stroke * cor) (top - Stroke)
include : dispiro
widths.rhs
flat ezhLeft yMidBar [heading Rightward]
curl (Middle - CorrectionOMidS) yMidBar
archv
if hookless
: then : list
g4.down.mid (RightSB - OX) [mix yMidBar bot hookless] [heading Downward]
: else : list
g4 (RightSB - OX) [mix yMidBar bot : SmallSmoothB / (SmallSmoothA + SmallSmoothB)]
hookend bot
g4 SB (bot + Hook * (top - bot) / [fallback para.cap0 CAP])
if SLAB : begin
include : DownwardLeftSerif SB top VJut
glyph-block-export RevEzhShape
define [RevEzhShape] : params [top bot pleft pright hookless [sma SmallSmoothA] [smb SmallSmoothB] [diagCoeff 1.2] [pyBar 0.6]] : glyph-proc
local cor : diagCoeff * HVContrast
local yMidBar : RevEzhShape.yMidBar top bot pyBar
local ezhRight : mix SB RightSB [fallback pright 0.8]
local ezhLeft : mix SB RightSB [fallback pleft 0.075]
include : HBarTop ezhLeft RightSB top
include : spiro-outline
corner ezhRight yMidBar
corner (ezhRight - Stroke * cor) (yMidBar - HalfStroke)
corner (ezhRight - Stroke * cor) yMidBar
corner ezhLeft (top - Stroke)
corner (ezhLeft + Stroke * cor) (top - Stroke)
include : dispiro
widths.lhs
flat ezhRight yMidBar [heading Leftward]
curl (Middle + CorrectionOMidS) yMidBar
archv
if hookless
: then : list
g4.down.mid (SB + OX) [RevEzhShape.yLoopLeft top bot pyBar sma smb]
: else : list
g4 (SB + OX) [RevEzhShape.yLoopLeft top bot pyBar sma smb]
hookend bot
g4 RightSB (bot + Hook * ((top - bot) / CAP))
if SLAB : begin
include : DownwardRightSerif RightSB top VJut
set RevEzhShape.yMidBar : lambda [top bot pyBar] : mix bot top pyBar
set RevEzhShape.yLoopLeft : lambda [top bot pyBar sma smb]
mix [RevEzhShape.yMidBar top bot pyBar] bot (sma / (sma + smb))
create-glyph 'Ezh' 0x1B7 : glyph-proc
set-width Width
include : MarkSet.capital
include : EzhShape CAP 0
create-glyph 'ezh' 0x292 : glyph-proc
set-width Width
include : MarkSet.p
include : EzhShape XH Descender
alias 'cyrl/Ezh' 0x4E0 'Ezh'
alias 'cyrl/ezh' 0x4E1 'ezh'
create-glyph 'revEzh' 0x1B8 : glyph-proc
include : MarkSet.capital
include : RevEzhShape CAP 0
create-glyph 'revezh' 0x1B9 : glyph-proc
include : MarkSet.p
include : RevEzhShape XH Descender
create-glyph 'lyogh' 0x26E : glyph-proc
include : MarkSet.if
include : EzhShape XH Descender 0.4
include : VBarLeft SB (XH * 0.1) CAP
create-glyph 'ezhtail' 0x1BA : glyph-proc
local b : mix Descender XH 0.25
include : EzhShape XH b nothing nothing 0.5
local y : mix [mix b XH 0.6] b 0.5
include : dispiro
widths.rhs
g4 (RightSB - OX) y [heading Downward]
g4 (RightSB - OX) (y - 1) [heading Downward]
arcvh
flat [mix SB RightSB 0.45] b
curl [mix SB RightSB 0.4] b
archv
g4 (SB + Stroke * HVContrast) [mix (Descender + Stroke) b 0.5]
arcvh
flat [mix SB RightSB 0.4] (Descender + Stroke)
curl RightSB (Descender + Stroke)
create-glyph 'ezhcurlytail' 0x293 : glyph-proc
include : MarkSet.e
local p (SmallSmoothB / (SmallSmoothA + SmallSmoothB))
include : EzhShape XH Descender nothing nothing p
local fine : adviceBlackness2 3 5 (XH - Descender)
local rinner : (XH * 0.4 - fine * 1.5) / 2
local m1 : RightSB - Stroke * HVContrast - OX
local x2 : RightSB - HalfStroke
local y2 Descender
include : dispiro
widths.lhs
g4 m1 [mix [mix Descender XH 0.6] Descender p] [heading Downward]
g4 m1 ([mix [mix Descender XH 0.6] Descender p] - 1) [heading Downward]
CurlyTail fine rinner m1 Descender SB x2 y2
glyph-block Letter-Latin-Glottal-Stop : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Marks : markHalfStroke
create-glyph 'glottalstop' 0x294 : glyph-proc
include : MarkSet.b
include : dispiro
widths.rhs
g4 SB (CAP - Hook)
hookstart (CAP - O)
g4 RightSB (CAP - [adviceGlottalStopSmooth CAP 1])
alsoThru.g2 0.5 0.5 important
flat (Middle + HalfStroke * HVContrast) (XH * 0.3)
curl (Middle + HalfStroke * HVContrast) 0 [heading Downward]
if SLAB : begin
include : CenterBottomSerif Middle 0 Jut
alias 'capglottalstop' 0x241 'glottalstop'
create-glyph 'revglottalstop' 0x295 : glyph-proc
include : MarkSet.b
include : dispiro
widths.lhs
g4 RightSB (CAP - Hook)
hookstart (CAP - O)
g4 SB (CAP - [adviceGlottalStopSmooth CAP (-1)])
alsoThru.g2 0.5 0.5 important
flat (Middle - HalfStroke * HVContrast) (XH * 0.3)
curl (Middle - HalfStroke * HVContrast) 0 [heading Downward]
if SLAB : begin
include : CenterBottomSerif Middle 0 Jut
create-glyph 'smallglottalstop' 0x242 : glyph-proc
include : MarkSet.b
include : dispiro
widths.rhs
g4 SB (XH - Hook)
hookstart (XH - O)
g4 RightSB (XH - [adviceGlottalStopSmooth XH 1])
alsoThru.g2 0.5 0.5 important
flat (Middle + HalfStroke * HVContrast) (XH * 0.15)
curl (Middle + HalfStroke * HVContrast) 0 [heading Downward]
if SLAB : begin
include : CenterBottomSerif Middle 0 Jut
create-glyph 'invglottalstopbar' 0x1BE : glyph-proc
include : MarkSet.e
local smooth : adviceGlottalStopSmooth XH (-1 - TanSlope * (15 - (Width / 500) * 12) * [clamp 0 1 : linreg 126 1 135 0.5 Stroke])
include : dispiro
widths.lhs
g4 RightSB (XH - Hook)
hookstart (XH - O)
g4.down.mid SB (XH - smooth)
alsoThru.g2 0.5 0.5 important
flat (Middle - HalfStroke * HVContrast) (XH * 0.15)
curl (Middle - HalfStroke * HVContrast) 0 [heading Downward]
include : HOverlayBar (Middle - LongJut * 0.6) (Middle + LongJut * 0.6) (XH * 0.25)
include : FlipAround Middle (XH / 2)
create-glyph 'fineglottalstop' : glyph-proc
include : MarkSet.b
local fine : markHalfStroke * 2
include : dispiro
widths.rhs fine
g4 SB (CAP - Hook)
hookstart (CAP - O)
g4 RightSB (CAP - [adviceGlottalStopSmooth CAP 1])
alsoThru.g2 0.5 0.5 important
flat (Middle + fine / 2 * HVContrast) (XH * 0.3)
curl (Middle + fine / 2 * HVContrast) 0 [heading Downward]
if SLAB : begin
include : CenterBottomSerif Middle 0 Jut fine
create-glyph 'finerevglottalstop' : glyph-proc
include : MarkSet.b
local fine : markHalfStroke * 2
include : dispiro
widths.lhs fine
g4 RightSB (CAP - Hook)
hookstart (CAP - O)
g4 SB (CAP - [adviceGlottalStopSmooth CAP (-1)])
alsoThru.g2 0.5 0.5 important
flat (Middle - fine / 2 * HVContrast) (XH * 0.3)
curl (Middle - fine / 2 * HVContrast) 0 [heading Downward]
if SLAB : begin
include : CenterBottomSerif Middle 0 Jut fine
turned 'invglottalstop' 0x296 'revglottalstop' Middle (CAP / 2)
create-glyph 'glottalstopbar' 0x2A1 : glyph-proc
include [refer-glyph 'glottalstop'] AS_BASE
include : HOverlayBar (Middle - LongJut * 0.6) (Middle + LongJut * 0.6) (CAP * 0.25)
create-glyph 'revglottalstopbar' 0x2A2 : glyph-proc
include [refer-glyph 'revglottalstop'] AS_BASE
include : HOverlayBar (Middle - LongJut * 0.6) (Middle + LongJut * 0.6) (CAP * 0.25)
glyph-block Letter-Latin-Eth : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
create-glyph 'eth' 0xF0 : glyph-proc
include : MarkSet.b
include : OShape (CAP * 0.6) 0 SB RightSB
local ymiddlea : (CAP * 0.6 + SmallSmoothA - SmallSmoothB) / 2
include : dispiro
widths.lhs
g4.up.start (RightSB - OX) ymiddlea
quadcontrols 0 0.8
g4 (SB + Stroke * 1.1) CAP
include : dispiro
widths.center OverlayStroke
flat [mix SB RightSB 0.1] [mix XH CAP (-0.1)]
curl [mix SB RightSB 0.95] [mix XH CAP 0.3]
glyph-block Letter-Latin-Thorn : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
create-glyph 'Thorn' 0xDE : glyph-proc
set-width Width
include : MarkSet.capital
local bowlTop (CAP * 0.81)
local bowlBottom (CAP * 0.19)
local turn : mix bowlTop bowlBottom (SmoothB / (SmoothA + SmoothB))
local turnRadius : (bowlTop - bowlBottom) / 2
include : dispiro
widths.rhs
flat (SB * 1.25 + 1) bowlTop [heading Rightward]
curl (RightSB - turnRadius - CorrectionOMidS) bowlTop
archv
g4 (RightSB - O) turn
arcvh
flat (RightSB - turnRadius + CorrectionOMidS) bowlBottom
curl (SB * 1.25 + 1) bowlBottom [heading Leftward]
include : VBarLeft (SB * 1.25) 0 CAP
if SLAB : begin
include : CenterBottomSerif (SB * 1.25 + HalfStroke * HVContrast) 0 Jut
include : CenterTopSerif (SB * 1.25 + HalfStroke * HVContrast) CAP Jut
alias 'grek/Sho' 0x3F7 'Thorn'
create-glyph 'thorn' 0xFE : glyph-proc
include : union
glyph-proc
include : refer-glyph "b"
eject-contour 'serifLB'
glyph-proc
include : refer-glyph "p"
eject-contour 'bowl'
eject-contour 'serifLT'
include : MarkSet.if
create-glyph 'grek/sho' 0x3F8 : glyph-proc
include : new-glyph : glyph-proc
include : refer-glyph "b"
eject-contour 'serifLB'
eject-contour 'serifLT'
include : new-glyph : glyph-proc
include : refer-glyph "p"
eject-contour 'bowl'
eject-contour 'serifLT'
eject-contour 'serifLB'
include : MarkSet.if
glyph-block Letter-Latin-Hwair : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : nShoulderKnots
create-glyph 'Hwair' 0x1F6 : glyph-proc
local df : DivFrame para.diversityM 3
set-width df.width
include : df.markSet.capital
include : VBarLeft df.leftSB 0 CAP df.mvs
include : HBar SB df.middle (CAP / 2)
include : dispiro
widths.lhs df.mvs
flat (df.middle - df.mvs * 0.5 * HVContrast) CAP [heading Downward]
curl (df.middle - df.mvs * 0.5 * HVContrast) (SmallSmoothB * 0.6 * df.div)
arcvh
g4 [mix (df.middle - df.mvs * 0.5 * HVContrast) df.rightSB 0.5] O [heading Rightward]
archv
flat df.rightSB (SmallSmoothA * 0.6 * df.div)
curl df.rightSB XH [heading Upward]
if SLAB : begin
local jut : Jut * 0.75
include : CenterTopSerif (df.leftSB + df.mvs / 2 * HVContrast) CAP jut
include : CenterBottomSerif (df.leftSB + df.mvs / 2 * HVContrast) 0 jut
include : CenterTopSerif df.middle CAP jut
create-glyph 'hwair' 0x195 : glyph-proc
local df : DivFrame para.diversityM 3
set-width df.width
include : df.markSet.b
include : VBarLeft df.leftSB 0 CAP df.mvs
include : dispiro
nShoulderKnots (df.leftSB + df.mvs * HVContrast) (df.middle + df.mvs * 0.5 * HVContrast) (df.mvs * 0.4) nothing (XH * 0.51) (SmallSmoothA * 0.6 * df.div) (SmallSmoothB * 0.6 * df.div) df.mvs
flat (df.middle + df.mvs * 0.5 * HVContrast) (XH * 0.5) [heading Downward]
curl (df.middle + df.mvs * 0.5 * HVContrast) (SmallSmoothB * 0.6 * df.div)
arcvh
g4 [mix (df.middle - df.mvs * 0.5 * HVContrast) df.rightSB 0.5] O [widths.heading df.mvs 0 Rightward]
archv
flat df.rightSB (SmallSmoothA * 0.6 * df.div)
curl df.rightSB XH [heading Upward]
if SLAB : begin
local jut : Jut * 0.75
include : LeftwardTopSerif df.leftSB CAP (jut - df.mvs / 2 * HVContrast)
if (!para.isItalic) : begin
include : tagged 'serifLB' : CenterBottomSerif (df.leftSB + df.mvs / 2 * HVContrast) 0 jut
glyph-block Letter-Latin-Gha : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
create-glyph 'Gha' 0x1A2 : glyph-proc
local df : DivFrame para.diversityM 3
set-width df.width
include : df.markSet.capital
local abarRight : df.middle + df.mvs / 2 * HVContrast
local sma : SmoothAOf [Math.max (df.mvs * 1.125) (SmallSmooth * 0.6 * df.div)] (Width * df.div)
local smb : SmoothBOf [Math.max (df.mvs * 1.125) (SmallSmooth * 0.6 * df.div)] (Width * df.div)
include : OShape CAP 0 df.leftSB abarRight df.mvs sma smb
include : VBarRight (df.rightSB - O) Descender CAP df.mvs
include : dispiro
widths.lhs df.mvs
flat df.middle (CAP - smb) [heading Rightward]
curl (df.middle + 1) (CAP - smb) [heading Rightward]
alsoThru 0.5 0.15
g4 (df.rightSB - O - df.mvs * HVContrast) CAP [widths 0 df.mvs]
create-glyph 'gha' 0x1A3 : glyph-proc
local df : DivFrame para.diversityM 3
set-width df.width
include : df.markSet.p
local abarRight : df.middle + df.mvs / 2 * HVContrast
local sma : SmoothAOf [Math.max (df.mvs * 1.125) (SmallSmooth * 0.6 * df.div)] (Width * df.div)
local smb : SmoothBOf [Math.max (df.mvs * 1.125) (SmallSmooth * 0.6 * df.div)] (Width * df.div)
include : OShape XH 0 df.leftSB abarRight df.mvs sma smb
include : VBarRight (df.rightSB - O) Descender XH df.mvs
include : dispiro
widths.lhs df.mvs
flat df.middle (XH - smb) [heading Rightward]
curl (df.middle + 1) (XH - smb) [heading Rightward]
alsoThru 0.5 0.15
g4 (df.rightSB - O - df.mvs * HVContrast) XH [widths 0 df.mvs]
glyph-block Letter-Latin-Wynn : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
define [WynnShape bot top] : glyph-proc
include : VBarLeft SB bot top
include : dispiro
widths.rhs (Stroke * CThin)
g4 (SB + HVContrast * Stroke * (1 - CThin)) [mix bot top 0.8]
alsoThru 0.55 0.85
g4 Middle (top - O) [widths.heading 0 Stroke Rightward]
archv
g4 (RightSB - O) (top - [SmoothBOf (0.3 * (top - bot)) Width])
alsoThru 0.25 0.45 important
g4 (SB + Stroke * HVContrast) [mix bot top 0.1]
create-glyph 'Wynn' 0x1F7 : glyph-proc
include : MarkSet.capital
include : WynnShape 0 CAP
create-glyph 'wynn' 0x1BF : glyph-proc
include : MarkSet.p
include : WynnShape Descender XH
glyph-block Letter-Latin-Yogh : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
define [YoghShape top bot] : glyph-proc
include : dispiro
widths.rhs
g4 SB (top - Hook)
hookstart (top - O)
g4 RightSB (top - SmoothB)
alsoThruThem {{0.5 0.75}}
g4 ([mix SB RightSB 0.1] + Stroke * 0.25) ([mix bot top 0.425] - HalfStroke)
include : dispiro
widths.rhs
g4 [mix SB RightSB 0.75] ([mix bot (top - SmoothB) 0.758] + HalfStroke)
g4 RightSB ([mix bot (top - SmoothB) 0.475])
alsoThruThem {{0.25 0.6} {0.5 0.81}}
g4 SB (bot + O)
create-glyph 'Yogh' 0x21C : glyph-proc
include : MarkSet.capital
include : YoghShape CAP 0
create-glyph 'yogh' 0x21D : glyph-proc
include : MarkSet.p
include : YoghShape XH Descender
glyph-block Letter-Latin-RamsHorn : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
define [RamsHornShape bottom top] : glyph-proc
local hf : [adviceBlackness 4] / 2
local d : hf * 2 + Width * 0.05
include : dispiro
widths.center
g4 (SB + HalfStroke * HVContrast + O) top [heading Downward]
quadcontrols 1 0.7 16
g4 (Middle + d - hf) (bottom + d * (1 - TanSlope * 0.5)) [widths hf hf]
arcvh
g4 (Middle + CorrectionOMidX * hf * 2) (bottom + hf)
archv
g4 (Middle - d + hf) (bottom + d * (1 + TanSlope * 0.5))
quadcontrols 0 0.3 16
g4 (RightSB - HalfStroke * HVContrast - O) top [widths.heading HalfStroke HalfStroke Upward]
create-glyph 'latingamma' 0x263 : glyph-proc
include : MarkSet.p
include : RamsHornShape Descender XH
create-glyph 'latinGamma' 0x194 : glyph-proc
include : MarkSet.if
include : RamsHornShape Descender CAP
create-glyph 'ramshorn' 0x264 : glyph-proc
include : MarkSet.e
include : RamsHornShape 0 XH
### Ayin
create-glyph 'latinAyin' 0x1D25 : glyph-proc
include : MarkSet.e
local k1 0.65
local k2 0.7
local zmidy (XH * 0.15)
local offset : Stroke * 0.25
include : union
dispiro
widths.lhs
g4.right.start SB 0 [heading Rightward]
g4 Middle zmidy
g4.up.mid [mix Middle RightSB k1] (XH * k2) [heading Upward]
arcvh
g4.left.mid Middle (XH - O) [heading Leftward]
archv
g4.down.mid [mix Middle SB k1] (XH * k2) [heading Downward]
g4 Middle zmidy
g4.right.end RightSB 0 [heading Rightward]
spiro-outline
corner Middle (zmidy + offset)
g4.up.mid ([mix Middle RightSB k1] - offset) (XH * k2)
g4.left.mid Middle (XH - offset)
g4.down.mid ([mix Middle SB k1] + offset) (XH * k2)
close
glyph-block Letter-Latin-Rhotic : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Marks : markFine
glyph-block-export ErTail
define [ErTail left w dohook] : glyph-proc
local right Width
local mid : mix left right 0.5
local rise : (Width - left) * 0.3
local sw : fallback w (markFine * 2)
include : dispiro
widths.rhs sw
g2 (left - sw / 2 * HVContrast) (XH * 0.5)
g2 (mid - sw * HVContrast) (XH * 0.5 + rise)
include : dispiro
widths.rhs sw
flat mid (XH * 0.5 + rise) [heading Downward]
curl mid (XH * 0.5 + [if dohook 0 (rise - 1)]) [heading Downward]
if dohook {[hookend (XH * 0.5 - rise)]} {[arcvh]}
g4 (right - [if dohook (markFine * 2) 0]) (XH * 0.5 - [if dohook (rise * 0.5) rise]) [if dohook nothing [heading Rightward]]
#if dohook {[hookend (XH * 0.5 - rise)] [g4 right (XH * 0.5)]} {}
create-glyph 'rhotichook' 0x2DE : glyph-proc
include : ErTail (-Stroke * HVContrast) Stroke true
glyph-block Letter-Latin-Bidental-Percussive : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
create-glyph 'bidentalPercussive' 0x2AD : glyph-proc
local g : new-glyph : glyph-proc
include : HBarTop SB RightSB (CAP * 0.4)
include : VBarLeft SB (CAP * 0.1) (CAP * 0.4)
include : VBarRight RightSB (CAP * 0.1) (CAP * 0.4)
include g
include : Upright
include : Translate 0 (CAP / 2)
include : Italify
include g
glyph-block Letter-Latin-Egyptological : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
define [EgyptologicalYodComponent sw x bot top] : glyph-proc
local rad : (top - bot) / 2
local wid : rad * 1.2
local balance : wid * 0.55
include : dispiro
widths.rhs sw
g4.right.start (x - balance) (top - O) [heading Rightward]
archv
g4.down.mid (x + wid - balance) [mix bot top 0.5] [heading Downward]
arcvh
g4.left.end (x - balance) (bot + O) [heading Leftward]
define [EgyptologicalAyinComponent sw x bot top] : glyph-proc
local rad : (top - bot) / 2
local wid : rad * 1.2
local balance : wid * 0.55
include : dispiro
widths.lhs sw
g4.left.start (x + balance) (top - O) [heading Leftward]
archv
g4.down.mid (x - wid + balance) [mix bot top 0.5] [heading Downward]
arcvh
g4.right.end (x + balance) (bot + O) [heading Rightward]
define [EgyptologicalAlefShape bot top] : glyph-proc
local sw : adviceBlackness2 4 4 top
local gap : Math.max (sw / 2) (top / 12)
local rad : (top - gap) / 4
include : EgyptologicalYodComponent sw Middle (top - rad * 2) top
include : EgyptologicalYodComponent sw Middle bot (bot + rad * 2)
define [EgyptologicalAyinShape bot top] : glyph-proc
local sw : adviceBlackness2 4 4 top
local gap : Math.max (sw / 2) (top / 12)
local rad : (top + gap) / 4
include : EgyptologicalAyinComponent sw Middle (top - rad * 2) top
create-glyph 'EgyptologicalCapitalAlef' 0xA722 : glyph-proc
include : MarkSet.capital
include : EgyptologicalAlefShape 0 CAP
create-glyph 'EgyptologicalSmallAlef' 0xA723 : glyph-proc
include : MarkSet.capital
include : EgyptologicalAlefShape 0 XH # Per Unicode chart
create-glyph 'EgyptologicalCapitalAyin' 0xA724 : glyph-proc
include : MarkSet.capital
include : EgyptologicalAyinShape 0 CAP
create-glyph 'EgyptologicalSmallAyin' 0xA725 : glyph-proc
include : MarkSet.capital
include : EgyptologicalAyinShape 0 XH # Per Unicode chart
glyph-block-import Marks : markMiddle aboveMarkTop aboveMarkBot aboveMarkMid
create-glyph 'EgyptologicalYodAbove' 0xE010 : glyph-proc
set-width 0
set-mark-anchor 'above' markMiddle XH markMiddle aboveMarkTop
set-base-anchor 'aboveBrace' markMiddle aboveMarkMid
local fine : adviceBlackness 5
include : EgyptologicalYodComponent fine markMiddle aboveMarkBot aboveMarkTop