Improved spacing of tailed / flat-tailed i
, l
and iota
characters (#905).
This commit is contained in:
parent
dc4acbed7b
commit
31b61400c9
12 changed files with 138 additions and 120 deletions
|
@ -4,3 +4,4 @@
|
|||
- Commercial Minus Sign (`U+2052`).
|
||||
- Precedes Under Relation (`U+22B0`) and Succeeds Under Relation (`U+22B1`)
|
||||
- Heavy Black Curved Downwards And Rightwards Arrow (`U+27A5`)
|
||||
* Improved spacing of tailed / flat-tailed `i`, `l` and `iota` characters (#905).
|
|
@ -93,6 +93,14 @@ glyph-block Common-Derivatives : begin
|
|||
include : FlipAround x y
|
||||
set currentGlyph.autoRefPriority [query-glyph src].autoRefPriority
|
||||
|
||||
define [HalfAdvance] : this.advanceWidth / 2
|
||||
|
||||
define [TurnMarks k fnOverride] : glyph-proc
|
||||
local df : DivFrame (currentGlyph.advanceWidth / Width)
|
||||
local mx : compositeBaseAnchors [df.markSet.(k)]
|
||||
if fnOverride [fnOverride df] {.baseAnchors {.}}
|
||||
include mx
|
||||
|
||||
# Dual derivatives
|
||||
define [HCombine newid unicode id1 id2 spacing] : begin
|
||||
if [not newid] : throw : new Error "Target ID not specified"
|
||||
|
@ -119,6 +127,7 @@ glyph-block Common-Derivatives : begin
|
|||
|
||||
glyph-block-export select-variant orthographic-italic refer-glyph query-glyph with-related-glyphs
|
||||
glyph-block-export alias turned HDual HCombine VDual VCombine glyph-is-needed
|
||||
glyph-block-export HalfAdvance TurnMarks
|
||||
|
||||
glyph-block Recursive-Build : begin
|
||||
define [Fork gs ps] : begin
|
||||
|
|
|
@ -102,8 +102,8 @@ glyph-block Letter-Latin-Lower-F : begin
|
|||
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
|
||||
include : VerticalHook Middle (XH - Hook) (-LongJut + [IBalance2 : DivFrame 1]) (-Hook + HalfStroke)
|
||||
include : Translate [IBalance2 : DivFrame 1] 0
|
||||
if SLAB : begin
|
||||
include : CenterBottomSerif Middle Descender Jut
|
||||
|
||||
|
|
|
@ -12,30 +12,44 @@ glyph-block Letter-Latin-Lower-I : begin
|
|||
glyph-block-import Letter-Shared : CreateDottedComposition
|
||||
glyph-block-import Letter-Shared-Shapes : FlatHookDepth DiagonalTailR DiagonalTailStdDepth
|
||||
|
||||
glyph-block-export OverrideILMarks
|
||||
define [OverrideILMarks df xMiddle yTop] : glyph-proc
|
||||
set-base-anchor 'above' xMiddle yTop
|
||||
set-base-anchor 'below' xMiddle 0
|
||||
set-base-anchor 'overlay' xMiddle (yTop * OverlayPos)
|
||||
set-base-anchor 'topright' (xMiddle + df.rightSB - df.middle) yTop
|
||||
|
||||
glyph-block-export OverrideILMarksSerifed
|
||||
define [OverrideILMarksSerifed df xMiddle yTop] : glyph-proc
|
||||
set-base-anchor 'above' xMiddle yTop
|
||||
set-base-anchor 'below' xMiddle 0
|
||||
set-base-anchor 'overlay' [mix df.middle xMiddle 0.5] (yTop * OverlayPos)
|
||||
set-base-anchor 'topright' (xMiddle + df.rightSB - df.middle) yTop
|
||||
|
||||
### dotless i, i and iota
|
||||
glyph-block-export IotaShape
|
||||
define [IotaShape] : params [df top [addTopSerif false]] : glyph-proc
|
||||
local middle : df.middle - [if addTopSerif 0 LBalance2]
|
||||
local xMiddle : df.middle - [if addTopSerif 0 : IBalance2 df]
|
||||
local tailLength : LongJut * 1.05 * [mix 1 df.div 0.75]
|
||||
local hd : FlatHookDepth df
|
||||
set-base-anchor 'above' middle top
|
||||
set-base-anchor 'below' middle 0
|
||||
set-base-anchor 'overlay' middle (top * OverlayPos)
|
||||
set-base-anchor 'topright' (middle + RightSB - Middle) top
|
||||
|
||||
if addTopSerif : include : tagged 'serifLT'
|
||||
LeftwardTopSerif middle top (LongJut * df.div)
|
||||
LeftwardTopSerif xMiddle top (LongJut * df.div)
|
||||
include : dispiro
|
||||
widths.center
|
||||
flat middle top [heading Downward]
|
||||
curl middle hd.y
|
||||
flat xMiddle top [heading Downward]
|
||||
curl xMiddle hd.y
|
||||
arcvh.superness DesignParameters.tightHookSuperness
|
||||
flat (middle + hd.x - HalfStroke * HVContrast) HalfStroke
|
||||
curl (middle + [Math.max (hd.x - HalfStroke * HVContrast + 1) (LongJut * 1.05 * df.div)] + HalfStroke * TanSlope) HalfStroke
|
||||
flat (xMiddle + hd.x - HalfStroke * HVContrast) HalfStroke
|
||||
curl (xMiddle + [Math.max (hd.x - HalfStroke * HVContrast + 1) tailLength] + HalfStroke * TanSlope) HalfStroke
|
||||
include : OverrideILMarks df xMiddle top
|
||||
|
||||
glyph-block-export ItalicDotlessIShape
|
||||
define [ItalicDotlessIShape] : params [df top [addTopSerif false] [setMarks true]] : glyph-proc
|
||||
local fine : AdviceStroke 3
|
||||
local shift : (1 - df.div) * 0.2
|
||||
local left : [mix SB df.rightSB ([StrokeWidthBlend 0.42 0.46] - shift)] - HalfStroke * HVContrast
|
||||
local xBarMiddle : mix SB df.rightSB ([StrokeWidthBlend 0.42 0.46] - shift)
|
||||
local left : xBarMiddle - 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)
|
||||
|
@ -44,32 +58,33 @@ glyph-block Letter-Latin-Lower-I : begin
|
|||
flat left top [heading Downward]
|
||||
curl left (SmallSmoothB * 0.8)
|
||||
hookend O
|
||||
g4 rightTerm (Hook * [StrokeWidthBlend 0.85 1] * df.div)
|
||||
g4 rightTerm (Hook * [StrokeWidthBlend 0.85 1] * df.div) [widths.lhs fine]
|
||||
if addTopSerif : include : dispiro
|
||||
flat (left - (LongJut * df.div) + HalfStroke * HVContrast) top [widths 0 Stroke]
|
||||
curl left top
|
||||
if setMarks : begin
|
||||
set-base-anchor 'above' (left + HalfStroke * HVContrast + [StrokeWidthBlend 0.25 0] * TanSlope * df.width) top
|
||||
set-base-anchor 'below' middle 0
|
||||
|
||||
local xDot : xBarMiddle + [StrokeWidthBlend 0.25 0] * TanSlope * df.width
|
||||
include : OverrideILMarks df xDot top
|
||||
|
||||
glyph-block-export TailedDotlessShape
|
||||
define [TailedDotlessShape] : params [df top [xMiddle (df.middle - LBalance2)] [setMarks true] [hookScale 1] [addTopSerif false]] : 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
|
||||
define [TailedDotlessShape] : params [df top [setMarks true] [addTopSerif false]] : glyph-proc
|
||||
local xMiddle : df.middle - [if addTopSerif 0 : IBalance2 df]
|
||||
local tailLength : LongJut * 1.05 * [mix 1 df.div 0.75]
|
||||
|
||||
local hookScaleX : mix 1 df.div 0.5
|
||||
local hookScaleY : mix 1 df.div 1.25
|
||||
local x0 : mix HalfStroke (HalfStroke + (Hook - Stroke + 1) * 0.85 * df.div + [IBalance2 df]) hookScaleX
|
||||
local x1 : mix HalfStroke ([Math.max (Hook - HalfStroke + 1) tailLength] + [IBalance2 df]) hookScaleX
|
||||
include : dispiro
|
||||
widths.center
|
||||
flat xMiddle top [heading Downward]
|
||||
curl xMiddle [mix Stroke Hook hookScale]
|
||||
arcvh
|
||||
curl xMiddle [mix Stroke Hook hookScaleY]
|
||||
arcvh 16
|
||||
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
|
||||
g4 (xMiddle + x1) (HalfStroke + (1 - 2 * hookScaleY) * O) [heading Rightward]
|
||||
if addTopSerif : begin
|
||||
include : tagged 'serifLT' : LeftwardTopSerif xMiddle top (LongJut * df.div)
|
||||
include : OverrideILMarks df xMiddle top
|
||||
|
||||
create-glyph 'dotlessi.straight' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
|
@ -78,12 +93,13 @@ glyph-block Letter-Latin-Lower-I : begin
|
|||
include : VBar (df.middle) 0 XH
|
||||
|
||||
create-glyph 'dotlessi.hooky' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
local df : DivFrame para.diversityII
|
||||
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)
|
||||
local xMiddle : df.middle + [IBalance2 df]
|
||||
include : OverrideILMarks df xMiddle XH
|
||||
include : VBar xMiddle 0 XH
|
||||
include : LeftwardTopSerif xMiddle XH (LongJut * df.div)
|
||||
|
||||
create-glyph 'dotlessi.zshaped' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
|
@ -102,18 +118,22 @@ glyph-block Letter-Latin-Lower-I : begin
|
|||
include : RightwardBottomSerif df.middle 0 (LongJut * df.div)
|
||||
|
||||
create-glyph 'dotlessi.hookyBottom' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
local df : DivFrame para.diversityII
|
||||
set-width df.width
|
||||
include : df.markSet.e
|
||||
include : VBar (df.middle - LBalance2) 0 XH
|
||||
include : RightwardBottomSerif (df.middle - LBalance2) 0 (LongJut * df.div)
|
||||
local xMiddle : df.middle - [IBalance2 df]
|
||||
include : OverrideILMarks df xMiddle XH
|
||||
include : VBar xMiddle 0 XH
|
||||
include : RightwardBottomSerif xMiddle 0 (LongJut * df.div)
|
||||
|
||||
create-glyph 'latn/Iota.hookyBottom' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
local df : DivFrame para.diversityII
|
||||
set-width df.width
|
||||
include : df.markSet.capital
|
||||
include : VBar (df.middle - LBalance2) 0 CAP
|
||||
include : RightwardBottomSerif (df.middle - LBalance2) 0 (LongJut * df.div)
|
||||
local xMiddle : df.middle - [IBalance2 df]
|
||||
include : OverrideILMarks df xMiddle CAP
|
||||
include : VBar xMiddle 0 CAP
|
||||
include : RightwardBottomSerif xMiddle 0 (LongJut * df.div)
|
||||
|
||||
create-glyph 'dotlessi.serifless' : glyph-proc
|
||||
local df : DivFrame para.diversityII
|
||||
|
@ -125,7 +145,8 @@ glyph-block Letter-Latin-Lower-I : begin
|
|||
local df : DivFrame para.diversityI
|
||||
set-width df.width
|
||||
include : df.markSet.e
|
||||
local balance : IBalance * df.div * df.div
|
||||
local balance : IBalance df
|
||||
include : OverrideILMarksSerifed df (df.middle + balance) XH
|
||||
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)
|
||||
|
@ -135,7 +156,8 @@ glyph-block Letter-Latin-Lower-I : begin
|
|||
local df : DivFrame para.diversityI
|
||||
set-width df.width
|
||||
include : df.markSet.e
|
||||
local balance : IBalance * df.div * df.div
|
||||
local balance : IBalance df
|
||||
include : OverrideILMarksSerifed df (df.middle + balance) XH
|
||||
include : VBar (df.middle + balance) 0 XH
|
||||
include : LeftwardTopSerif (df.middle + balance) XH
|
||||
mix Jut ((LongJut * df.div) - balance) 0.5
|
||||
|
@ -143,23 +165,23 @@ glyph-block Letter-Latin-Lower-I : begin
|
|||
include : LeftwardBottomSerif df.middle 0 (LongJut * df.div)
|
||||
|
||||
create-glyph 'dotlessi.tailed' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
local df : DivFrame para.diversityII
|
||||
set-width df.width
|
||||
include : df.markSet.e
|
||||
if para.isItalic
|
||||
if (para.isItalic && para.diversityII >= (3 / 4))
|
||||
: then : begin
|
||||
include : ItalicDotlessIShape df XH (setMarks -- true) (addTopSerif -- false)
|
||||
include : ItalicDotlessIShape df XH (addTopSerif -- false)
|
||||
: else : begin
|
||||
include : TailedDotlessShape df XH (addTopSerif -- false)
|
||||
|
||||
create-glyph 'grek/iota.tailed' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
local df : DivFrame para.diversityII
|
||||
set-width df.width
|
||||
include : df.markSet.e
|
||||
include : TailedDotlessShape df XH (addTopSerif -- false)
|
||||
|
||||
create-glyph 'latn/Iota.tailed' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
local df : DivFrame para.diversityII
|
||||
set-width df.width
|
||||
include : df.markSet.capital
|
||||
include : TailedDotlessShape df CAP (addTopSerif -- false)
|
||||
|
@ -168,9 +190,9 @@ glyph-block Letter-Latin-Lower-I : begin
|
|||
local df : DivFrame para.diversityI
|
||||
set-width df.width
|
||||
include : df.markSet.e
|
||||
if para.isItalic
|
||||
if (para.isItalic && para.diversityI >= (3 / 4))
|
||||
: then : begin
|
||||
include : ItalicDotlessIShape df XH (setMarks -- true) (addTopSerif -- true)
|
||||
include : ItalicDotlessIShape df XH (addTopSerif -- true)
|
||||
: else : begin
|
||||
include : TailedDotlessShape df XH (addTopSerif -- true)
|
||||
|
||||
|
@ -187,13 +209,13 @@ glyph-block Letter-Latin-Lower-I : begin
|
|||
include : TailedDotlessShape df CAP (addTopSerif -- true)
|
||||
|
||||
create-glyph 'dotlessi.flatTailed' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
local df : DivFrame para.diversityII
|
||||
set-width df.width
|
||||
include : df.markSet.e
|
||||
include : IotaShape df XH (addTopSerif -- false)
|
||||
|
||||
create-glyph 'latn/Iota.flatTailed' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
local df : DivFrame para.diversityII
|
||||
set-width df.width
|
||||
include : df.markSet.capital
|
||||
include : IotaShape df CAP (addTopSerif -- false)
|
||||
|
@ -211,31 +233,27 @@ glyph-block Letter-Latin-Lower-I : begin
|
|||
include : IotaShape df CAP (addTopSerif -- true)
|
||||
|
||||
glyph-block-export DTailDotlessIShape
|
||||
define [DTailDotlessIShape] : params [top [addTopSerif false]] : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
local middle : df.middle - [if addTopSerif 0 LBalance2]
|
||||
set-base-anchor 'above' middle top
|
||||
set-base-anchor 'below' middle 0
|
||||
set-base-anchor 'overlay' middle (top * OverlayPos)
|
||||
set-base-anchor 'topright' (middle + RightSB - Middle) top
|
||||
define [DTailDotlessIShape] : params [df top [addTopSerif false]] : glyph-proc
|
||||
local xMiddle : df.middle - [if addTopSerif 0 : IBalance2 df]
|
||||
include : OverrideILMarks df xMiddle top
|
||||
if addTopSerif : include : tagged 'serifLT'
|
||||
LeftwardTopSerif middle top (LongJut * df.div)
|
||||
LeftwardTopSerif xMiddle top (LongJut * df.div)
|
||||
include : dispiro
|
||||
widths.center
|
||||
flat middle top [heading Downward]
|
||||
DiagonalTailR df middle 0 [DiagonalTailStdDepth df Stroke] Stroke
|
||||
flat xMiddle top [heading Downward]
|
||||
DiagonalTailR df xMiddle 0 [DiagonalTailStdDepth df Stroke] Stroke
|
||||
|
||||
create-glyph 'dotlessi.diagonalTailed' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
local df : DivFrame para.diversityII
|
||||
set-width df.width
|
||||
include : df.markSet.e
|
||||
include : DTailDotlessIShape XH (addTopSerif -- false)
|
||||
include : DTailDotlessIShape df XH (addTopSerif -- false)
|
||||
|
||||
create-glyph 'dotlessi.serifedDiagonalTailed' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
set-width df.width
|
||||
include : df.markSet.e
|
||||
include : DTailDotlessIShape XH (addTopSerif -- true)
|
||||
include : DTailDotlessIShape df XH (addTopSerif -- true)
|
||||
|
||||
select-variant 'dotlessi' 0x131
|
||||
create-glyph 'iogonek.dotless' : glyph-proc
|
||||
|
@ -254,7 +272,7 @@ glyph-block Letter-Latin-Lower-I : begin
|
|||
alias 'latn/iota' 0x269 'grek/iota'
|
||||
select-variant 'latn/Iota' 0x196 (follow -- 'grek/iota')
|
||||
|
||||
turned 'turni' 0x1D09 'i' [lambda [] : this.advanceWidth / 2] (XH / 2) [MarkSet.p]
|
||||
turned 'turni' 0x1D09 'i' HalfAdvance (XH / 2) [TurnMarks 'p']
|
||||
|
||||
with-related-glyphs 'cyrl/ghe.SRB' null 'dotlessi' : lambda [src sel] : glyph-proc
|
||||
include [refer-glyph src] AS_BASE ALSO_METRICS
|
||||
|
|
|
@ -64,10 +64,10 @@ glyph-block Letter-Latin-Lower-J : begin
|
|||
include : VBar df.middle Descender XH
|
||||
|
||||
create-glyph 'dotlessj.hooky' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
local df : DivFrame para.diversityII
|
||||
set-width df.width
|
||||
include : df.markSet.p
|
||||
local balance : IBalance2 * df.div * df.div
|
||||
local balance : IBalance2 df
|
||||
include : LeftwardTopSerif (df.middle + balance) XH (LongJut * df.div)
|
||||
include : VBar (df.middle + balance) Descender XH
|
||||
|
||||
|
|
|
@ -12,21 +12,19 @@ glyph-block Letter-Latin-Lower-L : begin
|
|||
glyph-block-import Marks : markMiddle aboveMarkBot aboveMarkTop
|
||||
glyph-block-import Letter-Latin-Lower-I : IotaShape TailedDotlessShape ItalicDotlessIShape
|
||||
glyph-block-import Letter-Latin-Lower-I : DTailDotlessIShape
|
||||
glyph-block-import Letter-Latin-Lower-I : OverrideILMarks OverrideILMarksSerifed
|
||||
glyph-block-import Letter-Shared : CreateCommaCaronComposition
|
||||
glyph-block-import Letter-Shared-Shapes : CurlyTail
|
||||
|
||||
create-glyph 'l.hooky' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
local df : DivFrame para.diversityII
|
||||
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)
|
||||
local balance : IBalance2 df
|
||||
local xMiddle : df.middle + balance
|
||||
include : OverrideILMarks df xMiddle CAP
|
||||
include : VBar xMiddle 0 (CAP - Stroke)
|
||||
include : LeftwardTopSerif xMiddle CAP (LongJut * df.div)
|
||||
|
||||
create-glyph 'l.zshaped' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
|
@ -35,7 +33,6 @@ glyph-block Letter-Latin-Lower-L : begin
|
|||
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.serifless' : glyph-proc
|
||||
local df : DivFrame para.diversityII
|
||||
|
@ -43,25 +40,24 @@ glyph-block Letter-Latin-Lower-L : begin
|
|||
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
|
||||
local balance : IBalance df
|
||||
include : OverrideILMarksSerifed df (df.middle + balance) CAP
|
||||
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
|
||||
local balance : IBalance df
|
||||
include : OverrideILMarksSerifed df (df.middle + balance) CAP
|
||||
include : VBar (df.middle + balance) 0 CAP
|
||||
include : LeftwardTopSerif (df.middle + balance) CAP
|
||||
mix Jut ((LongJut * df.div) - balance) 0.5
|
||||
|
@ -70,7 +66,7 @@ glyph-block Letter-Latin-Lower-L : begin
|
|||
set-base-anchor 'topright' (df.middle + RightSB - Middle) CAP
|
||||
|
||||
create-glyph 'l.tailed' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
local df : DivFrame para.diversityII
|
||||
set-width df.width
|
||||
include : df.markSet.b
|
||||
if para.isItalic
|
||||
|
@ -90,7 +86,7 @@ glyph-block Letter-Latin-Lower-L : begin
|
|||
include : TailedDotlessShape df CAP (addTopSerif -- true)
|
||||
|
||||
create-glyph 'l.flatTailed' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
local df : DivFrame para.diversityII
|
||||
set-width df.width
|
||||
include : df.markSet.b
|
||||
include : IotaShape df CAP (addTopSerif -- false)
|
||||
|
@ -102,16 +98,16 @@ glyph-block Letter-Latin-Lower-L : begin
|
|||
include : IotaShape df CAP (addTopSerif -- true)
|
||||
|
||||
create-glyph 'l.diagonalTailed' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
local df : DivFrame para.diversityII
|
||||
set-width df.width
|
||||
include : df.markSet.b
|
||||
include : DTailDotlessIShape CAP (addTopSerif -- false)
|
||||
include : DTailDotlessIShape df CAP (addTopSerif -- false)
|
||||
|
||||
create-glyph 'l.serifedDiagonalTailed' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
set-width df.width
|
||||
include : df.markSet.b
|
||||
include : DTailDotlessIShape CAP (addTopSerif -- true)
|
||||
include : DTailDotlessIShape df CAP (addTopSerif -- true)
|
||||
|
||||
create-glyph 'l.phoneticLeft' : glyph-proc
|
||||
local df : DivFrame 1
|
||||
|
@ -128,20 +124,18 @@ glyph-block Letter-Latin-Lower-L : begin
|
|||
set-base-anchor 'topright' (df.middle + RightSB - Middle) CAP
|
||||
|
||||
create-glyph 'l.hookyBottom' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
local df : DivFrame para.diversityII
|
||||
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)
|
||||
local xMiddle : df.middle - [IBalance2 df]
|
||||
include : OverrideILMarks df xMiddle CAP
|
||||
include : VBar xMiddle 0 CAP
|
||||
include : RightwardBottomSerif xMiddle 0 (LongJut * df.div)
|
||||
|
||||
select-variant 'l' 'l'
|
||||
alias 'cyrl/palochka' 0x4CF 'l'
|
||||
turned 'turnl' 0xA781 'l' Middle (XH / 2) [MarkSet.p]
|
||||
|
||||
turned 'turnl' 0xA781 'l' HalfAdvance (XH / 2) [TurnMarks 'p']
|
||||
|
||||
glyph-block-import Letter-Blackboard : BBS BBD BBBarCenter
|
||||
create-glyph 'mathbb/l' 0x1D55D : glyph-proc
|
||||
|
@ -159,7 +153,7 @@ glyph-block Letter-Latin-Lower-L : begin
|
|||
include : FlatSlashShape anchor.x anchor.y (0.5 * OverlayStroke) (0.8 * stretch) (0.4 * stretch)
|
||||
|
||||
local LDotOptions : list
|
||||
list 'hooky' 0
|
||||
list 'hooky' Stroke
|
||||
list 'zshaped' Stroke
|
||||
list 'serifed' Stroke
|
||||
list 'serifedTailed' Stroke
|
||||
|
@ -174,10 +168,9 @@ glyph-block Letter-Latin-Lower-L : begin
|
|||
|
||||
foreach {suffix y0} [items-of LDotOptions] : if [query-glyph ('l.' + suffix)]
|
||||
create-glyph ('ldot.' + suffix) : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
local df : DivFrame ([query-glyph ('l.' + suffix)].advanceWidth / Width)
|
||||
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
|
||||
|
||||
|
@ -186,7 +179,7 @@ glyph-block Letter-Latin-Lower-L : begin
|
|||
create-glyph 'lrtail' 0x26D : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
include : refer-glyph "rtailBR"
|
||||
include : Translate (df.middle + LBalance2 + HalfStroke * HVContrast) 0
|
||||
include : Translate (df.middle + [IBalance2 df] + HalfStroke * HVContrast) 0
|
||||
include : refer-glyph "l.hooky"
|
||||
include : df.markSet.if
|
||||
|
||||
|
@ -227,12 +220,12 @@ glyph-block Letter-Latin-Lower-L : begin
|
|||
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)
|
||||
include : Belt (df.middle + [IBalance * df])
|
||||
|
||||
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)
|
||||
include : Belt (df.middle + [IBalance2 df])
|
||||
|
||||
create-glyph 'looprevesh' 0x1AA : glyph-proc
|
||||
include : MarkSet.if
|
||||
|
|
|
@ -154,12 +154,8 @@ glyph-block Letter-Latin-Lower-R : begin
|
|||
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
|
||||
define [TurnRMarks k] : TurnMarks k
|
||||
function [df] : return {.baseAnchors {.bottomright {.x (df.rightSB - RBalance) .y 0}}}
|
||||
|
||||
turned 'turnr' 0x279 'r' HalfAdvance (XH / 2) [TurnRMarks 'e']
|
||||
|
||||
|
|
|
@ -315,10 +315,8 @@ glyph-block Letter-Shared-Shapes : begin
|
|||
define rInY : DiagonalTailInnerRadius
|
||||
define rInX : 1 * rInY
|
||||
define InvSqrt2 : 1 / [Math.sqrt 2]
|
||||
define dxTurn : 0.5 * sw * HVContrast + rInX
|
||||
define dxTurnObl : if (sign > 0)
|
||||
-0.75 * TanSlope * rInY
|
||||
0 * TanSlope * (0.5 * mocSwMid + rInY)
|
||||
define dxTurn : 0.5 * sw * HVContrast + rInX * df.div
|
||||
define dxTurnObl : if (sign > 0) (-0.75 * TanSlope * rInY) 0
|
||||
define dyTurn : 0.5 * mocSwMid
|
||||
define dxTailStart : dxTurn + InvSqrt2 * rInX + InvSqrt2 * 0.5 * mocFine * HVContrast
|
||||
define dyTailStart : dyTurn + (1 - InvSqrt2 + [if (sign > 0) 0 (TanSlope)]) * (0.5 * mocFine + rInY)
|
||||
|
|
|
@ -111,12 +111,10 @@ export : define [calculateMetrics para] : begin
|
|||
|
||||
define TailAdjX : Width * 0.2
|
||||
define TailAdjY : XH * 0.25
|
||||
define LBalance : LongJut * 0.04
|
||||
define IBalance : fallback para.ibalance (LongJut * 0.04)
|
||||
define LBalance2 : LongJut * 0.14
|
||||
define IBalance2 : fallback para.ibalance (LongJut * 0.14)
|
||||
define [IBalance df] : df.div * df.div * [fallback para.ibalance (LongJut * 0.04)] # Serifed
|
||||
define [IBalance2 df] : df.div * [fallback para.ibalance2 (LongJut * 0.14)] # Hooky, Tailed
|
||||
define JBalance : fallback para.jbalance 0
|
||||
define JBalance2 : fallback para.jbalance2 (Stroke * 0.25 + LBalance)
|
||||
define JBalance2 : fallback para.jbalance2 (Stroke * 0.25 + LongJut * 0.04)
|
||||
define TBalance : fallback para.tbalance JBalance
|
||||
define TBalance2 : fallback para.tbalance2 TBalance
|
||||
define RBalance : fallback para.rbalance (JBalance * 0.3)
|
||||
|
@ -202,7 +200,7 @@ export : define [calculateMetrics para] : begin
|
|||
Rightward Leftward UpwardT DownwardT LeftwardT RightwardT O OX OXHook Hook AHook SHook RHook
|
||||
JHook FHook HookX Smooth SmallSmooth Stroke DotSize PeriodSize HBarPos OverlayPos
|
||||
LongJut Jut VJut Accent AccentX AccentBaseOffset AccentStackOffset CThin CThinB SLAB
|
||||
TailAdjX TailAdjY LBalance IBalance LBalance2 IBalance2 JBalance JBalance2 TBalance
|
||||
TailAdjX TailAdjY IBalance IBalance2 JBalance JBalance2 TBalance
|
||||
TBalance2 RBalance RBalance2 FBalance OneBalance WideWidth0 WideWidth1 WideWidth2 WideWidth3
|
||||
WideWidth4 Ess EssQuestion HalfStroke RightSB Middle CapMiddle DotRadius PeriodRadius
|
||||
SideJut SmoothA SmoothB SmallSmoothA SmallSmoothB CorrectionOMidX CorrectionOMidS
|
||||
|
|
|
@ -129,7 +129,8 @@ define-macro glyph-block-import : syntax-rules
|
|||
|
||||
define allExports : object
|
||||
Common-Derivatives `[select-variant orthographic-italic refer-glyph query-glyph
|
||||
alias turned HDual HCombine VDual VCombine with-related-glyphs glyph-is-needed]
|
||||
alias turned HDual HCombine VDual VCombine with-related-glyphs glyph-is-needed
|
||||
HalfAdvance TurnMarks]
|
||||
|
||||
CommonShapes `[Rect SquareAt Ring RingAt DotAt RingStroke RingStrokeAt DotStrokeAt
|
||||
CircleRing CircleRingAt CircleDotAt OShape OShapeOutline OBarLeftShape OBarRightShape
|
||||
|
@ -210,8 +211,8 @@ define-macro glyph-block : syntax-rules
|
|||
HVContrast Upward Downward Rightward Leftward UpwardT DownwardT LeftwardT RightwardT O OX
|
||||
OXHook Hook AHook SHook RHook JHook FHook HookX Smooth SmallSmooth Stroke DotSize
|
||||
PeriodSize HBarPos OverlayPos LongJut Jut VJut Accent AccentX AccentBaseOffset
|
||||
AccentStackOffset CThin CThinB SLAB TailAdjX TailAdjY LBalance IBalance LBalance2
|
||||
IBalance2 JBalance JBalance2 TBalance TBalance2 RBalance RBalance2 FBalance OneBalance
|
||||
AccentStackOffset CThin CThinB SLAB TailAdjX TailAdjY IBalance IBalance2
|
||||
JBalance JBalance2 TBalance TBalance2 RBalance RBalance2 FBalance OneBalance
|
||||
WideWidth0 WideWidth1 WideWidth2 WideWidth3 WideWidth4 Ess EssQuestion HalfStroke RightSB
|
||||
Middle CapMiddle DotRadius PeriodRadius SideJut SmoothA SmoothB SmallSmoothA
|
||||
SmallSmoothB CorrectionOMidX CorrectionOMidS AdviceStroke AdviceStroke2 MVertStroke
|
||||
|
|
|
@ -177,11 +177,15 @@ module.exports = class Glyph {
|
|||
if (g.baseAnchors) for (const k in g.baseAnchors) this.baseAnchors[k] = g.baseAnchors[k];
|
||||
}
|
||||
setBaseAnchor(id, x, y) {
|
||||
if (isNaN(x - 0) || isNaN(y - 0)) throw new Error(`NaN found in anchor coord for ${id}`);
|
||||
this.baseAnchors[id] = new Anchor(x, y).transform(this.gizmo);
|
||||
}
|
||||
setMarkAnchor(id, x, y, mbx, mby) {
|
||||
if (isNaN(x - 0) || isNaN(y - 0)) throw new Error(`NaN found in anchor coord for ${id}`);
|
||||
this.markAnchors[id] = new Anchor(x, y).transform(this.gizmo);
|
||||
if (mbx != null && mby != null) {
|
||||
if (isNaN(mbx - 0) || isNaN(mby - 0))
|
||||
throw new Error(`NaN found in anchor coord for ${id}`);
|
||||
this.baseAnchors[id] = new Anchor(mbx, mby).transform(this.gizmo);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iosevka",
|
||||
"version": "5.0.4",
|
||||
"version": "5.0.5",
|
||||
"main": "./font-src/index.js",
|
||||
"scripts": {
|
||||
"build": "node utility/ensure-verda-exists && verda -f verdafile.js",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue