Iosevka/glyphs/cyrillic-basic.patel
2015-08-16 00:27:05 +08:00

450 lines
14 KiB
Plaintext

###### Cyrillic glyphs
alias 'cyrA' 0x410 'A'
alias 'cyra' 0x430 'a'
alias 'cyrVe' 0x412 'B'
alias 'cyrGhe' 0x413 'Gamma'
alias 'cyrIe' 0x415 'E'
alias 'cyrie' 0x435 'e'
alias 'cyrKa' 0x41A 'K'
alias 'cyrka' 0x43A 'kappa'
alias 'cyrEm' 0x41C 'M'
alias 'cyrEn' 0x41D 'H'
alias 'cyrO' 0x41E 'O'
alias 'cyro' 0x43e 'o'
alias 'cyrPe' 0x41F 'Pi'
alias 'cyrpe.upright' null 'pi'
alias 'cyrpe.italic' null 'n'
italic-variant 'cyrpe' 0x43f
alias 'cyrEr' 0x420 'P'
alias 'cyrer' 0x440 'p'
alias 'cyrEs' 0x421 'C'
alias 'cyres' 0x441 'c'
alias 'cyrTe' 0x422 'T'
alias 'cyrte.upright' null 'tau'
alias 'cyrte.italic' null 'm'
italic-variant 'cyrte' 0x442
alias 'Ef' 0x424 'Phi'
alias 'cyref' 0x444 'varphi'
alias 'cyrHa' 0x425 'X'
alias 'cyrha' 0x445 'x'
alias 'cyru' 0x443 'y'
alias 'cyrUkranianI' 0x406 'I'
alias 'cyrUkraniani' 0x456 'i'
alias 'cyrJe' 0x408 'J'
alias 'cyrje' 0x458 'j'
alias 'cyrDze' 0x405 'S'
alias 'cyrdze' 0x455 's'
### Russian letters
define [CyrYeriShape top _left _right _fine] : glyph-construction {
local fine : fallback _fine STROKE
local left : fallback _left SB
local right : fallback _right RIGHTSB
local bowl : top * 0.55 + HALFSTROKE
local tkappa [COKAPPA - 0.22]
local bkappa [COKAPPA - 0.2]
local turnbottom : bowl / 2
include : create-stroke
:.start-from [left + STROKE * 0.2] 0
:.heads-to RIGHTWARD
:.set-width fine 0
:.line-to [right - turnbottom * [right - left] / [RIGHTSB - SB]] 0
:.arc-hv-to [right - O] turnbottom
:.arc-vh-to [right - turnbottom * [right - left] / [RIGHTSB - SB]] bowl
:.line-to [left + STROKE * 0.2] bowl
:.heads-to LEFTWARD
include : VBarLeft left 0 top fine
}
create-glyph 'cyrYeri' : glyph-construction {
assign-unicode 0x42C
include capitalMarks
include : CyrYeriShape CAP SB RIGHTSB
}
create-glyph 'cyryeri' : glyph-construction {
assign-unicode 0x44C
include eMarks
include : CyrYeriShape XH SB RIGHTSB
}
create-glyph 'cyrBe' : glyph-construction {
assign-unicode 0x411
include glyphs.cyrYeri AS_BASE
include : HBar SB [mix SB RIGHTSB 0.9] [CAP - HALFSTROKE]
}
define [CyrCyrIShape top] : glyph-construction {
local topstroke : adviceBlackness 4
local halftopstroke : topstroke / 2
include : create-stroke
:.start-from RIGHTSB 0 :.heads-to UPWARD :.set-width STROKE 0
:.line-to RIGHTSB [top * 0.4] :.heads-to UPWARD
:.line-to RIGHTSB top :.heads-to UPWARD :.set-width topstroke 0
include : create-stroke
:.start-from SB 0 :.heads-to UPWARD :.set-width 0 topstroke
:.line-to SB [top * 0.6] :.heads-to UPWARD :.set-width 0 STROKE
:.line-to SB top :.heads-to UPWARD
include : create-stroke
:.start-from [SB + halftopstroke] 0 :.heads-to UPWARD :.set-width 0 topstroke
:.line-to [RIGHTSB - topstroke - halftopstroke] top :.heads-to UPWARD
}
create-glyph 'cyrI' : glyph-construction {
assign-unicode 0x418
include capitalMarks
include : CyrCyrIShape CAP
}
create-glyph 'cyri.upright' : glyph-construction {
include eMarks
dont-export
include : CyrCyrIShape XH
}
create-glyph 'cyri.italic' : glyph-construction {
dont-export
include glyphs.u AS_BASE
}
italic-variant 'cyri' 0x438
create-glyph 'cyrU' : glyph-construction {
set-width WIDTH
assign-unicode 0x423
include capitalMarks
local xbottom : mix SB RIGHTSB 0.28
local turnp : XH / CAP
local xb : mix SB RIGHTSB 0.51
local yb : mix [CAP - XH] CAP [0.05 * turnp]
include : xStrand xbottom 0 RIGHTSB CAP 0.1 0.6 0.14
include : halfXStrand SB CAP xb yb [0.1 * turnp] 0.4 [0.14 * turnp]
}
create-glyph 'cyrbe' : glyph-construction {
assign-unicode 0x431
include bMarks
include : smallo [CAP * 0.7] 0 SB RIGHTSB
include : create-stroke
:.start-from [SB + O] SMALLSMOOTHB
:.set-width 0 STROKE
:.line-to [SB + O] [XH - SMALLSMOOTHA]
:.cubic-to [SB + O] [mix XH CAP 1.2] [mix SB RIGHTSB 0.4] [mix XH CAP 0.5] [RIGHTSB - HALFSTROKE * ITALICCOR] CAP
}
create-glyph 'cyrve.italic' : glyph-construction {
include eMarks
local mid : mix RIGHTSB SB 0.65
include : create-stroke
:.start-from mid [XH / 2 - HALFSTROKE]
:.heads-to RIGHTWARD
:.set-width STROKE 0
:.line-to MIDDLE [XH / 2 - HALFSTROKE]
:.arc-hv-to [RIGHTSB + O] [XH - SMOOTHB * 0.87] KAPPA
:.arc-vh-to [MIDDLE - OMIDCOR_S] XO
:.arc-hv-to [SB + O] [XH - SMALLSMOOTHA]
:.line-to [SB + O] SMALLSMOOTHB
:.arc-vh-to [MIDDLE + OMIDCOR_S] O
:.arc-hv-to [RIGHTSB - O] [SMOOTHA * 0.87]
:.arc-vh-to MIDDLE [XH / 2 + HALFSTROKE] KAPPA
:.line-to mid [XH / 2 + HALFSTROKE]
:.heads-to LEFTWARD
}
create-glyph 'cyrve.upright' : glyph-construction {
include eMarks
include : BShape XH
}
italic-variant 'cyrve' 0x432
create-glyph 'cyrghe.upright' : glyph-construction {
include eMarks
include : LShape XH
include : FlipAround MIDDLE [XH / 2] 1 [-1]
}
create-glyph 'cyrghe.italic' : glyph-construction {
include eMarks
include : twoHookUpper XH [SMOOTHB * 0.87] SHOOK
include : XSHookLower 0 [RIGHTSB - OXHOOK + TAILADJX * globalTransform.yx] MIDDLE SB [SMOOTHB * 0.87] [SHOOK - TAILADJY * globalTransform.yx]
include : sStrand [SMOOTHB * 0.87] [XH - [SMOOTHB * 0.87]] 0.2 0.45
}
italic-variant 'cyrghe' 0x433
define [CyrDeShape top] : glyph-construction {
local cutleft : mix SB RIGHTSB 0.2
local cutright : mix SB RIGHTSB 0.92
include : HBar [SB + O * 2] RIGHTSB HALFSTROKE
include : VBar [cutright - HALFSTROKE * ITALICCOR] 0 top
include : HBar cutleft cutright [top - HALFSTROKE]
include : halfXStrand [cutleft + STROKE * ITALICCOR] top [SB + HALFSTROKE * ITALICCOR] HALFSTROKE 0.1 0.75 0.5
include : VBar [SB + HALFSTROKE * ITALICCOR + O * 2] [-LONGJUT + HALFSTROKE] 0
include : VBar [RIGHTSB - HALFSTROKE * ITALICCOR] [-LONGJUT + HALFSTROKE] 0
}
create-glyph 'cyrDe' : glyph-construction {
assign-unicode 0x414
include ifMarks
include : CyrDeShape CAP
}
create-glyph 'cyrde.upright' : glyph-construction {
include eMarks
include : CyrDeShape XH
}
create-glyph 'cyrde.italic' : glyph-construction {
include bMarks
include : smallo [CAP * 0.7] 0 SB RIGHTSB
local ymiddlea : [XH + SMALLSMOOTHA - SMALLSMOOTHB] / 2
include : create-stroke
:.start-from [RIGHTSB - O] ymiddlea
:.set-width STROKE 0
:.curve-to [RIGHTSB - O] [mix ymiddlea CAP 0.8] [SB + STROKE * 1.1] CAP
}
italic-variant 'cyrde' 0x434
define [CyrZheShape top] : glyph-construction {
local fine : adviceBlackness 3.5
local midx : mix SB MIDDLE 0.3
define [CyrAngleShape] : glyph-construction {
local cor 1
start-from [SB + O * 4] 0
line-to [SB + fine * cor + O * 4] 0
line-to [midx + fine * cor] [top / 2]
line-to [SB + fine * cor + O * 4] top
line-to [SB + O * 4] top
line-to midx [top / 2]
reverse-last
}
include : CyrAngleShape
include : FlipAround MIDDLE [top / 2]
include : CyrAngleShape
include : VBar MIDDLE 0 top fine
include : HBar midx [WIDTH - midx] [top / 2] fine
}
create-glyph 'cyrZhe' : glyph-construction {
assign-unicode 0x416
include capitalMarks
include : CyrZheShape CAP
}
create-glyph 'cyrzhe' : glyph-construction {
assign-unicode 0x436
include eMarks
include : CyrZheShape XH
}
define [CyrZeShape top hook] : glyph-construction {
local midx : mix RIGHTSB SB 0.65
local midy : top * BARPOS
local smb : top - [mix [midy + HALFSTROKE] [top - O - STROKE] [SMOOTHA / [SMOOTHA + SMOOTHB]]]
local sma : mix [STROKE + O] [midy - HALFSTROKE] [SMOOTHA / [SMOOTHA + SMOOTHB]]
include : twoHookUpper top smb [fallback hook SHOOK] [MIDDLE + OMIDCOR_S / 2] nothing 0
include : sHookLower 0 sma [fallback hook SHOOK] [MIDDLE - OMIDCOR_S / 2] nothing 0
include : create-stroke
:.start-from RIGHTSB [top - smb]
:.set-width 0 STROKE
:.arc-vh-to MIDDLE [midy - HALFSTROKE] KAPPA
:.line-to midx [midy - HALFSTROKE]
:.heads-to LEFTWARD
include : create-stroke
:.start-from RIGHTSB sma
:.set-width STROKE 0
:.arc-vh-to MIDDLE [midy + HALFSTROKE] KAPPA
:.line-to midx [midy + HALFSTROKE]
:.heads-to LEFTWARD
}
create-glyph 'cyrZe' : glyph-construction {
assign-unicode 0x417
include capitalMarks
include : CyrZeShape CAP HOOK
}
create-glyph 'cyrze' : glyph-construction {
assign-unicode 0x437
include eMarks
include : CyrZeShape XH
}
define [CyrElShape top] : glyph-construction {
local cutleft : mix SB RIGHTSB 0.125
local cutleft2 : mix SB RIGHTSB 0.075
local cutright : mix SB RIGHTSB 0.95
include : VBarRight cutright 0 top
include : HBar cutleft cutright [top - HALFSTROKE]
include : LegShape cutleft cutleft2 [mix SB 0 0.25] top 0
}
create-glyph 'cyrEl' : glyph-construction {
assign-unicode 0x41B
include capitalMarks
include : CyrElShape CAP
}
create-glyph 'cyrel' : glyph-construction {
assign-unicode 0x43B
include eMarks
include : CyrElShape XH
}
create-glyph 'cyrem' : glyph-construction {
assign-unicode 0x43C
include eMarks
include : MShape XH
}
create-glyph 'cyren' : glyph-construction {
assign-unicode 0x43D
include eMarks
include : HShape XH
}
define [CyrTseShape top] : glyph-construction {
include : VBarLeft SB 0 top
include : HBarBottom SB RIGHTSB 0
include : VBarRight RIGHTSB 0 top
include : VBarRight [mix SB RIGHTSB 1.05] [HALFSTROKE - LONGJUT] STROKE
}
create-glyph 'cyrTse' : glyph-construction {
assign-unicode 0x426
include capitalMarks
include : CyrTseShape CAP
}
create-glyph 'cyrtse' : glyph-construction {
assign-unicode 0x446
include eMarks
include : CyrTseShape XH
}
define [CyrCheShape top] : glyph-construction {
include : VBarRight RIGHTSB 0 top
include : create-stroke
:.start-from SB top
:.set-width STROKE 0
:.heads-to DOWNWARD
:.line-to SB [top * 0.3 + SMOOTHB - HALFSTROKE]
:.arc-vh-to MIDDLE [top * 0.3 - HALFSTROKE]
:.heads-to RIGHTWARD
:.line-to RIGHTSB [top * 0.3 - HALFSTROKE]
:.heads-to RIGHTWARD
}
create-glyph 'cyrChe' : glyph-construction {
assign-unicode 0x427
include capitalMarks
include : CyrCheShape CAP
}
create-glyph 'cyrche' : glyph-construction {
assign-unicode 0x447
include eMarks
include : CyrCheShape XH
}
define [CyrShaShape top] : glyph-construction {
local fine : adviceBlackness 3.5
include : HBarBottom SB RIGHTSB 0
include : VBarLeft SB 0 top fine
include : VBarRight RIGHTSB 0 top fine
include : VBar MIDDLE 0 top fine
}
create-glyph 'cyrSha' : glyph-construction {
assign-unicode 0x428
include capitalMarks
include : CyrShaShape CAP
}
create-glyph 'cyrsha' : glyph-construction {
assign-unicode 0x448
include eMarks
include : CyrShaShape XH
}
define [CyrShchaShape top] : glyph-construction {
include : CyrShaShape top
include : VBarRight [mix SB RIGHTSB 1.05] [HALFSTROKE - LONGJUT] STROKE
}
create-glyph 'cyrShcha' : glyph-construction {
assign-unicode 0x429
include capitalMarks
include : CyrShchaShape CAP
}
create-glyph 'cyrshcha' : glyph-construction {
assign-unicode 0x449
include eMarks
include : CyrShchaShape XH
}
define [CyrYerShape top] : glyph-construction {
include : CyrYeriShape top [mix SB RIGHTSB 0.1] RIGHTSB
include : HBarTop [mix 0 SB 0.6] [STROKE * 0.1 + [mix SB RIGHTSB 0.1]] top
}
create-glyph 'cyrYer' : glyph-construction {
assign-unicode 0x42A
include capitalMarks
include : CyrYerShape CAP
}
create-glyph 'cyryer' : glyph-construction {
assign-unicode 0x44A
include eMarks
include : CyrYerShape XH
}
define [CyrYeryShape top] : glyph-construction {
local fine : adviceBlackness 3.5
include : CyrYeriShape top SB [mix [RIGHTSB - fine * ITALICCOR] [MIDDLE + fine / 2 * ITALICCOR] 0.5] fine
include : VBarRight RIGHTSB 0 top fine
}
create-glyph 'cyrYery' : glyph-construction {
assign-unicode 0x42B
include capitalMarks
include : CyrYeryShape CAP
}
create-glyph 'cyryery' : glyph-construction {
assign-unicode 0x44B
include eMarks
include : CyrYeryShape XH
}
create-glyph 'cyrE' : glyph-construction {
assign-unicode 0x42D
include capitalMarks
include glyphs.C
include : FlipAround MIDDLE [CAP / 2]
include : HBar [mix SB RIGHTSB 0.25] RIGHTSB [CAP / 2]
}
create-glyph 'cyre' : glyph-construction {
assign-unicode 0x44D
include eMarks
include glyphs.c
include : FlipAround MIDDLE [XH / 2]
include : HBar [mix SB RIGHTSB 0.25] RIGHTSB [XH / 2]
}
define [CyrYuShape top sma smb] : glyph-construction {
local fine : adviceBlackness 3.5
include : VBarLeft [SB + O] 0 top fine
include : smallo top 0 [mix [SB + fine * ITALICCOR] RIGHTSB 0.15] [RIGHTSB - O] fine [sma * 0.8] [smb * 0.8]
include : HBar [SB + fine * 0.1] [mix [SB + fine * ITALICCOR] RIGHTSB 0.15] [top / 2]
}
create-glyph 'cyrYu' : glyph-construction {
assign-unicode 0x42E
include capitalMarks
include : CyrYuShape CAP SMOOTHA SMOOTHB
}
create-glyph 'cyryu' : glyph-construction {
assign-unicode 0x44E
include eMarks
include : CyrYuShape XH SMALLSMOOTHA SMALLSMOOTHB
}
define [CyrYaShape top] : glyph-construction {
local bowlTop [top * 1]
local bowlBottom [[top - STROKE] * 0.55 - HALFSTROKE]
local turn : mix bowlTop bowlBottom 0.5
local turnRadius : [bowlTop - bowlBottom] / 2
include : create-stroke
:.start-from [WIDTH - SB * 1.25 - HALFSTROKE * 0.1] bowlTop
:.heads-to LEFTWARD
:.set-width STROKE 0
:.line-to [SB + turnRadius] bowlTop
:.arc-hv-to [SB + O] turn
:.arc-vh-to [SB + turnRadius] bowlBottom
:.line-to [WIDTH - SB * 1.25 - HALFSTROKE * 0.1] bowlBottom
:.heads-to RIGHTWARD
include : VBarRight RIGHTSB 0 top
local turn [XH * 0.1]
local left [SB + O]
include : create-stroke
:.start-from [left + HALFSTROKE] 0
:.heads-to UPWARD
:.set-width HALFSTROKE HALFSTROKE
:.curve-to [left + HALFSTROKE] [turn + 0.2 * [XH - turn]] MIDDLE [bowlBottom + HALFSTROKE]
}
create-glyph 'cyrYa' : glyph-construction {
assign-unicode 0x42F
include capitalMarks
include : CyrYaShape CAP
}
create-glyph 'cyrya' : glyph-construction {
assign-unicode 0x44F
include eMarks
include : CyrYaShape XH
}