Optimize shape for double-struck 2 (#2728)
This commit is contained in:
parent
5c8392346d
commit
e5032b977c
2 changed files with 22 additions and 18 deletions
|
@ -12,31 +12,32 @@ glyph-block Digits-Two : begin
|
||||||
|
|
||||||
define [TwoStraightNeckArcT sink offset sw top] : begin
|
define [TwoStraightNeckArcT sink offset sw top] : begin
|
||||||
define archDepth : [AdviceGlottalStopArchDepth top 1] * 0.95
|
define archDepth : [AdviceGlottalStopArchDepth top 1] * 0.95
|
||||||
define xLeft : SB + offset
|
define xLB : SB + offset
|
||||||
define xRight : RightSB - offset - OX / 2
|
define xR : RightSB - OX / 2
|
||||||
define yPhRight : top - archDepth * 1.5 - sw / 2 * (top / CAP - TanSlope)
|
define yPhRight : top - archDepth * 1.5 - sw / 2 * (top / CAP - TanSlope)
|
||||||
define pStraightBarStart 0.75
|
define pStraightBarStart 0.75
|
||||||
return : sink
|
return : sink
|
||||||
widths.rhs sw
|
widths.rhs sw
|
||||||
g4 xLeft (top - Hook)
|
g4 SB (top - Hook)
|
||||||
hookstart (top - offset) (sw -- sw)
|
hookstart top (sw -- sw)
|
||||||
g4.down.mid xRight (top - archDepth)
|
g4.down.mid xR (top - archDepth)
|
||||||
flat [mix xLeft xRight pStraightBarStart] [mix sw yPhRight pStraightBarStart]
|
flat [mix xLB xR pStraightBarStart] [mix sw yPhRight pStraightBarStart]
|
||||||
curl xLeft sw [widths.lhs sw]
|
curl xLB sw [widths.lhs sw]
|
||||||
|
|
||||||
define [TwoArcShapeT sink offset sw top] : begin
|
define [TwoArcShapeT sink offsetU offsetD sw top] : begin
|
||||||
define archDepth : [AdviceGlottalStopArchDepth top 1] * 0.95
|
define archDepth : [AdviceGlottalStopArchDepth top 1] * 0.95
|
||||||
return : sink
|
return : sink
|
||||||
widths.rhs sw
|
widths.rhs sw
|
||||||
g4 (SB + offset) (top - Hook)
|
g4 (SB - offsetU) (top - Hook)
|
||||||
hookstart (top - offset) (sw -- sw)
|
hookstart top (sw -- sw)
|
||||||
g4.down.mid (RightSB - offset - OX / 2) (top - archDepth)
|
g4.down.mid (RightSB - offsetU - OX / 2) (top - archDepth)
|
||||||
alsoThru.g2 0.5 ([StrokeWidthBlend 0.425 0.4 sw] * [linreg 500 1 700 0.95 Width]) [widths.center sw]
|
alsoThru.g2.withOffset 0.5 ([StrokeWidthBlend 0.425 0.4 sw] * [linreg 500 1 700 0.95 Width]) 0 (0.25 * (offsetU - offsetD)) [widths.center sw]
|
||||||
flat (SB - offset) 1 [widths.heading sw 0 Downward]
|
flat (SB + offsetD) 1 [widths.heading sw 0 Downward]
|
||||||
curl (SB - offset) 0 [heading Downward]
|
[if (sink == spiro-outline) corner curl] (SB + offsetD) 0 [heading Downward]
|
||||||
|
if (sink == spiro-outline) { [corner (SB - offsetU) 0] } {}
|
||||||
|
|
||||||
define [TwoShape top slab] : glyph-proc
|
define [TwoShape top slab] : glyph-proc
|
||||||
include : TwoArcShapeT dispiro 0 Stroke top
|
include : TwoArcShapeT dispiro 0 0 Stroke top
|
||||||
include : HBar.b (SB + HalfStroke) RightSB 0
|
include : HBar.b (SB + HalfStroke) RightSB 0
|
||||||
if slab : begin
|
if slab : begin
|
||||||
include : VSerif.ur RightSB 0 VJut
|
include : VSerif.ur RightSB 0 VJut
|
||||||
|
@ -90,8 +91,8 @@ glyph-block Digits-Two : begin
|
||||||
glyph-block-import Letter-Blackboard : BBS BBD
|
glyph-block-import Letter-Blackboard : BBS BBD
|
||||||
create-glyph 'mathbb/two' 0x1D7DA : glyph-proc
|
create-glyph 'mathbb/two' 0x1D7DA : glyph-proc
|
||||||
include : MarkSet.capital
|
include : MarkSet.capital
|
||||||
include : TwoArcShapeT dispiro 0 BBS CAP
|
include : TwoArcShapeT dispiro 0 BBD BBS CAP
|
||||||
include : intersection
|
include : intersection
|
||||||
TwoArcShapeT spiro-outline 1 BBS CAP
|
TwoArcShapeT dispiro BBD 0 BBS CAP
|
||||||
VBar.r (RightSB - OX / 2 - BBD) 0 CAP BBS
|
TwoArcShapeT spiro-outline 0 BBD BBS CAP
|
||||||
include : HBar.b (SB + [HSwToV : 0.5 * BBS]) RightSB 0 BBS
|
include : HBar.b (SB + [HSwToV : 0.5 * BBS]) RightSB 0 BBS
|
||||||
|
|
|
@ -314,6 +314,9 @@ export function SetupBuilders(bindings) {
|
||||||
alsoThru.g4 = function (rx, ry, raf) {
|
alsoThru.g4 = function (rx, ry, raf) {
|
||||||
return new SimpleMixInterpolator(g4, rx, ry, 0, 0, raf);
|
return new SimpleMixInterpolator(g4, rx, ry, 0, 0, raf);
|
||||||
};
|
};
|
||||||
|
alsoThru.g2.withOffset = function (rx, ry, deltaX, deltaY, raf) {
|
||||||
|
return new SimpleMixInterpolator(g2, rx, ry, deltaX, deltaY, raf);
|
||||||
|
};
|
||||||
|
|
||||||
/// Multi-mix interpolator
|
/// Multi-mix interpolator
|
||||||
class MultiMixInterpolator extends InterpolatorBase {
|
class MultiMixInterpolator extends InterpolatorBase {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue