Shape fixup
This commit is contained in:
parent
8f957410e1
commit
e69163cec8
1 changed files with 32 additions and 37 deletions
|
@ -10,45 +10,44 @@ glyph-block Digits-Five : begin
|
||||||
glyph-block-import Common-Derivatives
|
glyph-block-import Common-Derivatives
|
||||||
glyph-block-import Digits-Shared : OnumMarks ShiftDown CodeLnum CodeOnum
|
glyph-block-import Digits-Shared : OnumMarks ShiftDown CodeLnum CodeOnum
|
||||||
|
|
||||||
define [FiveFlatStroke top xleft t2 ycurly sw] : dispiro
|
define [FiveFlatStroke xLeft archTop pShapeHeight sw] : dispiro
|
||||||
widths.rhs sw
|
widths.rhs sw
|
||||||
flat (xleft + [HSwToV sw]) t2
|
flat (xLeft + [HSwToV sw]) archTop
|
||||||
curl Middle t2
|
curl [Math.max (xLeft + 0.01) (Middle - CorrectionOMidX * sw)] archTop
|
||||||
archv
|
archv
|
||||||
g4 (RightSB - OX) ycurly
|
g4 (RightSB - OX) [YSmoothMidR archTop 0 ArchDepthA ArchDepthB]
|
||||||
hookend O
|
hookend O
|
||||||
g4 SB (Hook * top / CAP)
|
g4 SB (Hook * pShapeHeight)
|
||||||
|
|
||||||
define [FiveArcStroke top xleft t2 ycurly sw] : dispiro
|
define [FiveArcStroke xLeft archTop pShapeHeight sw] : dispiro
|
||||||
widths.rhs sw
|
widths.rhs sw
|
||||||
g4 xleft (t2 - AHook * top / CAP)
|
g4 xLeft (archTop - AHook * pShapeHeight)
|
||||||
hookstart (t2 - O)
|
hookstart (archTop - O)
|
||||||
g4 (RightSB - OX) ycurly
|
g4 (RightSB - OX) [YSmoothMidR archTop 0 ArchDepthA ArchDepthB]
|
||||||
hookend O
|
hookend O
|
||||||
g4 SB (Hook * top / CAP)
|
g4 SB (Hook * pShapeHeight)
|
||||||
|
|
||||||
define [FiveArcStrokeMask top xleft t2 ycurly sw] : spiro-outline
|
define [FiveArcStrokeMask xLeft archTop pShapeHeight sw] : spiro-outline
|
||||||
g4 (xleft + 1) (t2 - AHook * top / CAP)
|
g4 (xLeft + 1) (archTop - AHook * pShapeHeight)
|
||||||
hookstart (t2 - O - 1)
|
hookstart (archTop - O - 1)
|
||||||
g4 (RightSB - OX - 1) ycurly
|
g4 (RightSB - OX - 1) [YSmoothMidR archTop 0 ArchDepthA ArchDepthB]
|
||||||
hookend (O + 1)
|
hookend (O + 1)
|
||||||
g4 (SB + 1) (Hook * top / CAP)
|
g4 (SB + 1) (Hook * pShapeHeight)
|
||||||
|
|
||||||
define [FiveShape] : with-params [
|
define [FiveShape] : with-params [
|
||||||
top bp [sw Stroke] [bbd 0] [obl 0] [zt 0]
|
top bp pBarPosSwAdj [sw Stroke] [bbd 0] [obl 0] [zt 0]
|
||||||
[bottomShape FiveArcStroke] [bottomMaskShape FiveArcStrokeMask]
|
[bottomShape FiveArcStroke]
|
||||||
] : glyph-proc
|
] : glyph-proc
|
||||||
local t1 : top * bp * 0.8
|
local t1 : (top * bp + sw * pBarPosSwAdj) * 0.8
|
||||||
local t2 : top * bp
|
local t2 : (top * bp + sw * pBarPosSwAdj) * 1.0
|
||||||
local ycurly : YSmoothMidR t2 0 ArchDepthA ArchDepthB
|
local xLeft : [mix SB RightSB 0.025] + zt
|
||||||
local xleft : [mix SB RightSB 0.025] + zt
|
|
||||||
local xright : [mix RightSB SB 0.05] - (OX - O)
|
local xright : [mix RightSB SB 0.05] - (OX - O)
|
||||||
|
|
||||||
local kGap : 0.144 - 0.1 * sw / t2
|
local kGap : 0.144 - 0.1 * sw / t2
|
||||||
|
|
||||||
include : difference
|
include : difference
|
||||||
glyph-proc
|
glyph-proc
|
||||||
local fiveStroke : include : bottomShape top xleft t2 ycurly sw
|
local fiveStroke : include : bottomShape xLeft t2 (top / CAP) sw
|
||||||
local firstKnot fiveStroke.rhsKnots.0
|
local firstKnot fiveStroke.rhsKnots.0
|
||||||
|
|
||||||
local oblCor : Math.hypot 1 obl
|
local oblCor : Math.hypot 1 obl
|
||||||
|
@ -63,13 +62,9 @@ glyph-block Digits-Five : begin
|
||||||
flat xVBar firstKnot.y [widths.rhs.heading (oblCor * sw) Upward]
|
flat xVBar firstKnot.y [widths.rhs.heading (oblCor * sw) Upward]
|
||||||
flat (xVBar + xVBarOffset) top [heading Upward]
|
flat (xVBar + xVBarOffset) top [heading Upward]
|
||||||
|
|
||||||
if bbd : begin
|
if bbd : let [mask : FiveArcStrokeMask xLeft t2 (top / CAP) sw] : begin
|
||||||
local fiveStrokeMask : bottomMaskShape top xleft t2 ycurly sw
|
include : intersection mask [VBar.r (RightSB - OX - bbd) 0 CAP sw]
|
||||||
include : intersection fiveStrokeMask [VBar.r (RightSB - OX - bbd) 0 CAP sw]
|
include : difference [VBar.r (firstKnot.x + bbd) 0 CAP sw] mask [Rect (t2 / 2) 0 0 Width]
|
||||||
include : difference
|
|
||||||
VBar.r (firstKnot.x + bbd) 0 CAP sw
|
|
||||||
begin fiveStrokeMask
|
|
||||||
Rect (t2 / 2) 0 0 Width
|
|
||||||
|
|
||||||
Rect (t2 / 2 + t2 * kGap) (t2 / 2 - t2 * kGap) 0 Middle
|
Rect (t2 / 2 + t2 * kGap) (t2 / 2 - t2 * kGap) 0 Middle
|
||||||
|
|
||||||
|
@ -80,26 +75,26 @@ glyph-block Digits-Five : begin
|
||||||
"upright" 0
|
"upright" 0
|
||||||
"oblique" (1 / 12)
|
"oblique" (1 / 12)
|
||||||
object # middle
|
object # middle
|
||||||
"arched" FiveArcStroke
|
"arched" { FiveArcStroke DesignParameters.fiveBarPos 0 }
|
||||||
"flat" FiveFlatStroke
|
"flat" { FiveFlatStroke (7 / 8 * DesignParameters.fiveBarPos) (1/3) }
|
||||||
|
|
||||||
foreach { suffix { obl bottomShape } } [pairs-of FiveConfig] : do
|
foreach { suffix { obl { bottomShape pBarPos pBarPosSwAdj } } } [pairs-of FiveConfig] : do
|
||||||
create-glyph "five.lnum.\(suffix)" : glyph-proc
|
create-glyph "five.lnum.\(suffix)" : glyph-proc
|
||||||
include : MarkSet.capital
|
include : MarkSet.capital
|
||||||
include : FiveShape CAP DesignParameters.fiveBarPos (bottomShape -- bottomShape) (obl -- obl)
|
include : FiveShape CAP pBarPos pBarPosSwAdj (bottomShape -- bottomShape) (obl -- obl)
|
||||||
|
|
||||||
create-glyph "five.onum.\(suffix)" : glyph-proc
|
create-glyph "five.onum.\(suffix)" : glyph-proc
|
||||||
include : OnumMarks.p
|
include : OnumMarks.p
|
||||||
include : FiveShape CAP DesignParameters.fiveBarPos (bottomShape -- bottomShape) (obl -- obl)
|
include : FiveShape CAP pBarPos pBarPosSwAdj (bottomShape -- bottomShape) (obl -- obl)
|
||||||
include : ShiftDown
|
include : ShiftDown
|
||||||
|
|
||||||
create-glyph "zhuangToneFive.\(suffix)" : glyph-proc
|
create-glyph "zhuangToneFive.\(suffix)" : glyph-proc
|
||||||
include : MarkSet.capital
|
include : MarkSet.capital
|
||||||
include : FiveShape CAP DesignParameters.fiveBarPos (bottomShape -- bottomShape) (zt -- ((RightSB - SB) * 0.05))
|
include : FiveShape CAP pBarPos pBarPosSwAdj (bottomShape -- bottomShape) (zt -- ((RightSB - SB) * 0.05))
|
||||||
|
|
||||||
create-glyph "zhuangtonefive.\(suffix)" : glyph-proc
|
create-glyph "zhuangtonefive.\(suffix)" : glyph-proc
|
||||||
include : MarkSet.e
|
include : MarkSet.e
|
||||||
include : FiveShape XH DesignParameters.fiveBarPos (bottomShape -- bottomShape) (zt -- ((RightSB - SB) * 0.05))
|
include : FiveShape XH pBarPos pBarPosSwAdj (bottomShape -- bottomShape) (zt -- ((RightSB - SB) * 0.05))
|
||||||
|
|
||||||
select-variant 'five.lnum' [CodeLnum '5'] (follow -- 'five')
|
select-variant 'five.lnum' [CodeLnum '5'] (follow -- 'five')
|
||||||
select-variant 'five.onum' [CodeOnum '5'] (follow -- 'five')
|
select-variant 'five.onum' [CodeOnum '5'] (follow -- 'five')
|
||||||
|
@ -109,4 +104,4 @@ glyph-block Digits-Five : begin
|
||||||
glyph-block-import Letter-Blackboard : BBS BBD
|
glyph-block-import Letter-Blackboard : BBS BBD
|
||||||
create-glyph 'mathbb/five' 0x1D7DD : glyph-proc
|
create-glyph 'mathbb/five' 0x1D7DD : glyph-proc
|
||||||
include : MarkSet.capital
|
include : MarkSet.capital
|
||||||
include : FiveShape CAP DesignParameters.fiveBarPos (sw -- BBS) (bbd -- BBD)
|
include : FiveShape CAP DesignParameters.fiveBarPos 0 (sw -- BBS) (bbd -- BBD)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue