Iosevka/font-src/glyphs/number/1.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

107 lines
No EOL
3.7 KiB
Text

$$include '../../meta/macros.ptl'
import [mix linreg clamp fallback] from '../../support/utils'
import [AnyCv getGrMesh] from "../../support/gr"
glyph-module
glyph-block Digits-One : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Digits-Shared : OnumHeight OnumMarks CodeLnum CodeOnum
define [OneShape top balance pTopSerif] : glyph-proc
define topSW : AdviceStroke 3.5
include : VBar (Middle + balance) 0 top
include : dispiro
flat (Middle - HalfStroke * HVContrast + balance) top [widths topSW 0]
curl (Middle - Stroke / 8 * HVContrast - HookX * 1.25 + balance) (top - Stroke / 8 - Hook * pTopSerif * (top / CAP))
define [OneShapeFlat top balance pTopSerif] : glyph-proc
define topSW : AdviceStroke 3.5
include : VBar (Middle + balance) 0 top
include : LeftwardTopSerif (Middle + balance - HalfStroke * HVContrast) (top - Stroke / 8 - Hook * pTopSerif * (top / CAP)) (LongJut - HalfStroke * HVContrast)
create-glyph 'one.lnum.noBase' : glyph-proc
include : MarkSet.capital
include : OneShape CAP OneBalance 0.75
create-glyph 'one.lnum.base' : glyph-proc
include : MarkSet.capital
include : OneShape CAP (OneBalance / 4) 0.75
include : CenterBottomSerif Middle 0 LongJut
create-glyph 'one.lnum.noBaseLongTopSerif' : glyph-proc
include : MarkSet.capital
include : OneShape CAP OneBalance 1.875
create-glyph 'one.lnum.baseLongTopSerif' : glyph-proc
include : MarkSet.capital
include : OneShape CAP (OneBalance / 4) 1.875
include : CenterBottomSerif Middle 0 LongJut
create-glyph 'one.lnum.noBaseFlatTopSerif' : glyph-proc
include : MarkSet.capital
include : OneShapeFlat CAP OneBalance 0.625
create-glyph 'one.lnum.baseFlatTopSerif' : glyph-proc
include : MarkSet.capital
include : OneShapeFlat CAP (OneBalance / 4) 0.625
include : CenterBottomSerif Middle 0 LongJut
create-glyph 'one.lnum.line' : glyph-proc
include : MarkSet.capital
include : VBar Middle 0 CAP
create-glyph 'one.onum.noBase' : glyph-proc
include : OnumMarks.e
include : OneShape OnumHeight OneBalance 0.75
create-glyph 'one.onum.base' : glyph-proc
include : OnumMarks.e
include : OneShape OnumHeight (OneBalance / 4) 0.75
include : CenterBottomSerif Middle 0 LongJut
create-glyph 'one.onum.noBaseLongTopSerif' : glyph-proc
include : OnumMarks.e
include : OneShape OnumHeight OneBalance 1.875
create-glyph 'one.onum.baseLongTopSerif' : glyph-proc
include : OnumMarks.e
include : OneShape OnumHeight (OneBalance / 4) 1.875
include : CenterBottomSerif Middle 0 LongJut
create-glyph 'one.onum.noBaseFlatTopSerif' : glyph-proc
include : OnumMarks.e
include : OneShapeFlat OnumHeight OneBalance 0.625
create-glyph 'one.onum.baseFlatTopSerif' : glyph-proc
include : OnumMarks.e
include : OneShapeFlat OnumHeight (OneBalance / 4) 0.625
include : CenterBottomSerif Middle 0 LongJut
create-glyph 'one.onum.line' : glyph-proc
include : OnumMarks.e
include : VBar Middle 0 OnumHeight
select-variant 'one.lnum' [CodeLnum '1'] (follow -- 'one')
select-variant 'one.onum' [CodeOnum '1'] (follow -- 'one')
glyph-block-import Letter-Blackboard : BBS BBD BBBarCenter
create-glyph 'mathbb/one' 0x1D7D9 : glyph-proc
define barCenter : Middle + OneBalance / 2
define xSerifTerminal : barCenter - BBD / 8 * HVContrast - HookX * 1.25
define ySerifTerminal : CAP - BBD / 8 - Hook * 0.75
include : MarkSet.capital
include : intersection
BBBarCenter barCenter 0 CAP
spiro-outline
corner (barCenter + BBD / 2) CAP
corner Width CAP
corner Width 0
corner 0 0
corner xSerifTerminal ySerifTerminal
include : dispiro
widths.lhs BBS
corner (barCenter + BBD / 2) CAP
corner xSerifTerminal ySerifTerminal