Iosevka/font-src/glyphs/letter/latin/lower-g.ptl
be5invis 6c413e66b6 * [**Breaking**] Fix typo of variant name standing-motion-serifed of capital-r (#1187).
* [**Breaking**] Change of variant names:
   - `one`.`nobase` → `one`.`no-base`
   - `one`.`nobase-long-top-serif` → `one`.`no-base-long-top-serif`
   - `one`.`nobase-flat-top-serif` → `one`.`no-base-flat-top-serif`
   - `three`.`flattop` → `three`.`flat-top`
   - `three`.`twoarcs` → `three`.`two-arcs`
2021-08-08 17:00:07 -07:00

222 lines
No EOL
9.1 KiB
Text

$$include '../../../meta/macros.ptl'
import [mix linreg clamp fallback] from '../../../support/utils'
import [Dotless CvDecompose MathSansSerif] from "../../../support/gr"
glyph-module
glyph-block Letter-Latin-Lower-G : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : DToothlessRise DMBlend FlatHookDepth
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 yTop sink offset sw] : sink
widths.rhs sw
[if (sink == spiro-outline) corner flat] (RightSB - offset) yTop [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.singleStoreySerifless' : glyph-proc
include : MarkSet.p
set-base-anchor 'overlay' Middle (XH / 2)
include : OBarRightShape
include : SmallGSingleStoreyShapeHookT XH dispiro 0 Stroke
create-glyph 'g.singleStoreySerifed' : glyph-proc
include : MarkSet.p
set-base-anchor 'overlay' Middle (XH / 2)
include : OBarRightShape
include : SmallGSingleStoreyShapeHookT XH dispiro 0 Stroke
include : tagged 'serifRT' : RightwardTopSerif RightSB XH SideJut
create-glyph 'g.singleStoreyEarlessCorner' : glyph-proc
include : MarkSet.p
set-base-anchor 'overlay' Middle (XH / 2)
include : OBarLeftToothlessShape XH SB DToothlessRise DMBlend
include : FlipAround Middle (XH / 2)
include : SmallGSingleStoreyShapeHookT (XH - DToothlessRise) dispiro 0 Stroke
create-glyph 'g.singleStoreyEarlessCornerHTB' : glyph-proc
include : MarkSet.p
set-base-anchor 'overlay' Middle (XH / 2)
include : OBarLeftToothlessShape XH SB DToothlessRise DMBlend
include : FlipAround Middle (XH / 2)
include : SmallGSingleStoreyShapeHookT XH dispiro 0 Stroke
create-glyph 'g.singleStoreyEarlessRounded' : glyph-proc
include : MarkSet.p
set-base-anchor 'overlay' Middle (XH / 2)
include : OBarLeftRoundedShape XH SB (SmallSmoothB - O)
include : FlipAround Middle (XH / 2)
include : SmallGSingleStoreyShapeHookT (XH - SmallSmoothB) dispiro 0 Stroke
create-glyph 'g.singleStoreyEarlessRoundedHTB' : glyph-proc
include : MarkSet.p
set-base-anchor 'overlay' Middle (XH / 2)
include : OBarLeftRoundedShape XH SB (SmallSmoothB - O)
include : FlipAround Middle (XH / 2)
include : SmallGSingleStoreyShapeHookT XH dispiro 0 Stroke
define [SmallGSingleStoreyFlatHookShape df y0] : begin
local hd : FlatHookDepth df (9 / 8)
local xTerminal : Math.min (df.rightSB - hd.x - 0.1) : mix df.leftSB df.rightSB (1 / 5)
return : dispiro
widths.rhs
flat df.rightSB y0 [heading Downward]
curl df.rightSB (Descender + hd.y)
arcvh.superness DesignParameters.tightHookSuperness
flat (df.rightSB - hd.x) Descender
curl xTerminal Descender [heading Leftward]
create-glyph 'g.singleStoreyFlatHookSerifless' : glyph-proc
include : MarkSet.p
set-base-anchor 'overlay' Middle (XH / 2)
include : OBarRightShape
include : SmallGSingleStoreyFlatHookShape [DivFrame 1] XH
create-glyph 'g.singleStoreyFlatHookSerifed' : glyph-proc
include : MarkSet.p
set-base-anchor 'overlay' Middle (XH / 2)
include : OBarRightShape
include : SmallGSingleStoreyFlatHookShape [DivFrame 1] XH
include : tagged 'serifRT' : RightwardTopSerif RightSB XH SideJut
create-glyph 'g.singleStoreyEarlessCornerFlatHook' : glyph-proc
include : MarkSet.p
set-base-anchor 'overlay' Middle (XH / 2)
include : OBarLeftToothlessShape XH SB DToothlessRise DMBlend
include : FlipAround Middle (XH / 2)
include : SmallGSingleStoreyFlatHookShape [DivFrame 1] (XH - DToothlessRise)
create-glyph 'g.singleStoreyEarlessCornerFlatHookHTB' : glyph-proc
include : MarkSet.p
set-base-anchor 'overlay' Middle (XH / 2)
include : OBarLeftToothlessShape XH SB DToothlessRise DMBlend
include : FlipAround Middle (XH / 2)
include : SmallGSingleStoreyFlatHookShape [DivFrame 1] XH
create-glyph 'g.singleStoreyEarlessRoundedFlatHook' : glyph-proc
include : MarkSet.p
set-base-anchor 'overlay' Middle (XH / 2)
include : OBarLeftRoundedShape XH SB (SmallSmoothB - O)
include : FlipAround Middle (XH / 2)
include : SmallGSingleStoreyFlatHookShape [DivFrame 1] (XH - SmallSmoothB)
create-glyph 'g.singleStoreyEarlessRoundedFlatHookHTB' : glyph-proc
include : MarkSet.p
set-base-anchor 'overlay' Middle (XH / 2)
include : OBarLeftRoundedShape XH SB (SmallSmoothB - O)
include : FlipAround Middle (XH / 2)
include : SmallGSingleStoreyFlatHookShape [DivFrame 1] XH
select-variant 'g' 'g'
link-reduced-variant 'g/sansSerif' 'g' MathSansSerif
turned 'turng' 0x1D77 'g' Middle [mix Descender XH 0.5]
select-variant 'gScript/hookTopBase' null (shapeFrom -- 'g')
select-variant 'gScript' 0x261 (shapeFrom -- 'g')
follow -- [if SLAB 'gScript/slabSerif' 'gScript/sansSerif']
alias 'cyrl/de.SRB' null 'gScript'
alias 'cyrl/de.BGR' null 'gScript'
derive-composites 'gScriptHookTop' 0x260 'gScript/hookTopBase'
VerticalHook (RightSB - HalfStroke * HVContrast) XH HookX (-Hook) nothing (yExtension -- O)
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 XH dispiro 0 BBS
include : HBarTop (RightSB - BBD) RightSB XH BBS
include : intersection
VBarRight (RightSB - BBD) Descender XH BBS
SmallGSingleStoreyShapeHookT XH spiro-outline 1 BBS
do
define l : mix 0 SB 0.3
define r : mix Width RightSB 0.3
define bwDoubleStorey : Math.min [AdviceStroke 5] (0.5 / 3 * (CAP - Stroke * 4))
define bwSingleStorey : AdviceStroke2 2 4 XH
define [derive suffix bw] : create-glyph "gbar.\(suffix)" : glyph-proc
include [refer-glyph "g.\(suffix)"] AS_BASE
include : HBar l r [query-glyph "g.\(suffix)"].baseAnchors.overlay.y bw
derive 'doubleStorey' bwDoubleStorey
derive 'openDoubleStorey' bwDoubleStorey
derive 'singleStoreySerifless' bwSingleStorey
derive 'singleStoreySerifed' bwSingleStorey
derive 'singleStoreyEarlessCorner' bwSingleStorey
derive 'singleStoreyEarlessRounded' bwSingleStorey
derive 'singleStoreyFlatHookSerifless' bwSingleStorey
derive 'singleStoreyFlatHookSerifed' bwSingleStorey
derive 'singleStoreyEarlessCornerFlatHook' bwSingleStorey
derive 'singleStoreyEarlessRoundedFlatHook' bwSingleStorey
select-variant "gbar" 0x1E5 (follow -- 'g')