Iosevka/font-src/glyphs/letter/latin/upper-e.ptl
be5invis 2526b3a7e5 * Fix anchor placement of:
- Latin Letter Small Capital R (`U+0280`) (#1159)
   - Latin Letter Small Capital L (`U+029F`) (#1159)
   - Cyrillic Small Letter Psi (`U+0471`) (#1159)
   - Latin Letter Small Capital E (`U+1D07`) (#1159)
   - Latin Letter Small Capital L with Stroke (`U+1D0C`) (#1159)
   - Latin Letter Small Capital U (`U+1D1C`) (#1159)
   - Modifier Letter Small Capital U (`U+1DB8`) (#1159)
   - Turned Small F (`U+214E`) (#1159)
   - Latin Letter Small Capital Turned E (`U+2C7B`) (#1159)
   - Latin Small Letter Egyptological Alef (`U+A723`) (#1159)
   - Latin Small Letter Egyptological Ain (`U+A725`) (#1159)
   - Latin Letter Small Capital F (`U+A730`) (#1159)
   - Latin Small Letter R Rotunda (`U+A75B`) (#1159)
2021-07-19 19:31:55 -07:00

86 lines
3.5 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-Upper-E : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Marks : markHalfStroke
glyph-block-import Letter-Shared : SetGrekUpperTonos
glyph-block-import Letter-Latin-Upper-F : xMidBarShrink yMidBar EFVJutLength
define kSB 1
define xEBarLeft : SB * kSB - O
define xRevEBarRight : Width - SB * kSB + O
define [EShape] : params [top pyBar serifLT serifLB serifV [stroke : AdviceStroke2 2 3 top]] : glyph-proc
include : VBarLeft (xEBarLeft) 0 top stroke
include : HBarTop (xEBarLeft - O) RightSB top stroke
include : HBar (xEBarLeft - O) (RightSB - [xMidBarShrink serifV]) [yMidBar top pyBar] stroke
include : HBarBottom (xEBarLeft - O) RightSB 0 stroke
if serifLT : include : LeftwardTopSerif xEBarLeft top SideJut
if serifLB : include : LeftwardBottomSerif xEBarLeft 0 SideJut
if serifV : begin
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 serifRT serifRB serifV [stroke : AdviceStroke2 2 3 top]] : glyph-proc
include : VBarRight (xRevEBarRight) 0 top stroke
include : HBarTop SB (xRevEBarRight + O) top stroke
include : HBar (SB + [xMidBarShrink serifV]) (xRevEBarRight + O) [yMidBar top pyBar] stroke
include : HBarBottom SB (xRevEBarRight + O) 0 stroke
if serifRT : include : RightwardTopSerif xRevEBarRight top SideJut
if serifRB : include : RightwardBottomSerif xRevEBarRight 0 SideJut
if serifV : begin
local { jutTop jutBot } : EFVJutLength top pyBar stroke
include : DownwardLeftSerif SB top jutTop
include : UpwardLeftSerif SB 0 jutBot
define EConfig : object
serifless { false false false }
topLeftSerifed { true false false }
serifed { true true true }
foreach { suffix { lt lb v } } [Object.entries EConfig] : do
create-glyph "E.\(suffix)" : glyph-proc
include : MarkSet.capital
include : EShape CAP (serifLT -- lt) (serifLB -- lb) (serifV -- v)
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
create-glyph "grek/Epsilon.\(suffix)" : glyph-proc
include [refer-glyph "E.\(suffix)"] AS_BASE ALSO_METRICS
include : SetGrekUpperTonos [if lt (-SideJut) 0]
create-glyph "smcpE.\(suffix)" : glyph-proc
include : MarkSet.e
include : EShape XH (serifLT -- lt) (serifLB -- lb) (serifV -- v)
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
create-glyph "revE.\(suffix)" : glyph-proc
include : MarkSet.capital
include : RevEShape CAP (serifRT -- lt) (serifRB -- lb) (serifV -- v)
select-variant 'E' 'E'
link-reduced-variant 'E/sansSerif' 'E' MathSansSerif
select-variant 'grek/Epsilon' 0x395 (follow -- 'E')
link-reduced-variant 'grek/Epsilon/sansSerif' 'grek/Epsilon' MathSansSerif (follow -- 'E/sansSerif')
select-variant 'smcpE' 0x1D07 (follow -- 'E')
alias 'cyrl/Ie' 0x415 'E'
select-variant 'revE' 0x18E (follow -- 'E')
turned 'turnSmcpE' 0x2C7B 'smcpE' Middle (XH / 2)
glyph-block-import Letter-Blackboard : BBS BBD
create-glyph 'mathbb/E' 0x1D53C : glyph-proc
include : MarkSet.capital
include : union
difference
EShape CAP (serif -- false) (stroke -- BBS)
Rect (CAP - BBS) BBS (xEBarLeft + BBS * HVContrast) (xEBarLeft + BBD)
VBarLeft (xEBarLeft + BBD) 0 CAP BBS