Cleanup of instances of flatside
using af
argument.
This commit is contained in:
parent
9b55f4642d
commit
6b86b6d349
5 changed files with 90 additions and 90 deletions
|
@ -61,8 +61,8 @@ glyph-block CommonShapes : begin
|
|||
define [MaskAboveLine x1 y1 x2 y2 _ext] : begin
|
||||
local ext : fallback _ext 0
|
||||
return : spiro-outline
|
||||
corner [mix x1 x2 (-ext)] (+VERY-FAR)
|
||||
corner [mix x1 x2 (-ext)] [mix y1 y2 (-ext)]
|
||||
corner [mix x1 x2 (0 - ext)] (+VERY-FAR)
|
||||
corner [mix x1 x2 (0 - ext)] [mix y1 y2 (0 - ext)]
|
||||
corner [mix x1 x2 (1 + ext)] [mix y1 y2 (1 + ext)]
|
||||
corner [mix x1 x2 (1 + ext)] (+VERY-FAR)
|
||||
|
||||
|
@ -70,26 +70,26 @@ glyph-block CommonShapes : begin
|
|||
define [MaskBelowLine x1 y1 x2 y2 _ext] : begin
|
||||
local ext : fallback _ext 0
|
||||
return : spiro-outline
|
||||
corner [mix x1 x2 (-ext)] (-VERY-FAR)
|
||||
corner [mix x1 x2 (-ext)] [mix y1 y2 (-ext)]
|
||||
corner [mix x1 x2 (0 - ext)] (-VERY-FAR)
|
||||
corner [mix x1 x2 (0 - ext)] [mix y1 y2 (0 - ext)]
|
||||
corner [mix x1 x2 (1 + ext)] [mix y1 y2 (1 + ext)]
|
||||
corner [mix x1 x2 (1 + ext)] (-VERY-FAR)
|
||||
|
||||
glyph-block-export MaskLeftLine
|
||||
define [MaskLeftLine x1 y1 x2 y2 _ext] : begin
|
||||
local ext : fallback _ext 0
|
||||
spiro-outline
|
||||
corner (-VERY-FAR) [mix y1 y2 (-ext)]
|
||||
corner [mix x1 x2 (-ext)] [mix y1 y2 (-ext)]
|
||||
return : spiro-outline
|
||||
corner (-VERY-FAR) [mix y1 y2 (0 - ext)]
|
||||
corner [mix x1 x2 (0 - ext)] [mix y1 y2 (0 - ext)]
|
||||
corner [mix x1 x2 (1 + ext)] [mix y1 y2 (1 + ext)]
|
||||
corner (-VERY-FAR) [mix y1 y2 (1 + ext)]
|
||||
|
||||
glyph-block-export MaskRightLine
|
||||
define [MaskRightLine x1 y1 x2 y2 _ext] : begin
|
||||
local ext : fallback _ext 0
|
||||
spiro-outline
|
||||
corner (+VERY-FAR) [mix y1 y2 (-ext)]
|
||||
corner [mix x1 x2 (-ext)] [mix y1 y2 (-ext)]
|
||||
return : spiro-outline
|
||||
corner (+VERY-FAR) [mix y1 y2 (0 - ext)]
|
||||
corner [mix x1 x2 (0 - ext)] [mix y1 y2 (0 - ext)]
|
||||
corner [mix x1 x2 (1 + ext)] [mix y1 y2 (1 + ext)]
|
||||
corner (+VERY-FAR) [mix y1 y2 (1 + ext)]
|
||||
|
||||
|
@ -505,14 +505,14 @@ glyph-block CommonShapes : begin
|
|||
local-parameter : u # Y-position of the ring's top
|
||||
local-parameter : ada -- ArchDepthA
|
||||
local-parameter : adb -- ArchDepthB
|
||||
local-parameter : overshoot -- OX
|
||||
local-parameter : ox -- OX
|
||||
local-parameter : af -- nothing # Additional function for the control knots
|
||||
|
||||
return : if (u - d > ada + adb)
|
||||
list
|
||||
flat (x + overshoot) (u - ada) af
|
||||
curl (x + overshoot) (d + adb)
|
||||
g4 (x + overshoot) [mix d u (adb / (ada + adb))] af
|
||||
flat (x + ox) (u - ada) af
|
||||
curl (x + ox) (d + adb)
|
||||
g4 (x + ox) [mix d u (adb / (ada + adb))] af
|
||||
|
||||
export : define flex-params [lu]: begin
|
||||
local-parameter : x # X-position of the stroke, without overshoot
|
||||
|
@ -520,14 +520,14 @@ glyph-block CommonShapes : begin
|
|||
local-parameter : u # Y-position of the ring's top
|
||||
local-parameter : ada -- ArchDepthA
|
||||
local-parameter : adb -- ArchDepthB
|
||||
local-parameter : overshoot -- OX
|
||||
local-parameter : ox -- OX
|
||||
local-parameter : af -- nothing # Additional function for the control knots
|
||||
|
||||
return : if (u - d > ada + adb)
|
||||
list
|
||||
flat (x + overshoot) (d + adb) af
|
||||
curl (x + overshoot) (u - ada)
|
||||
g4 (x + overshoot) [mix d u (adb / (ada + adb))] af
|
||||
flat (x + ox) (d + adb) af
|
||||
curl (x + ox) (u - ada)
|
||||
g4 (x + ox) [mix d u (adb / (ada + adb))] af
|
||||
|
||||
export : define flex-params [rd]: begin
|
||||
local-parameter : x # X-position of the stroke, without overshoot
|
||||
|
@ -535,14 +535,14 @@ glyph-block CommonShapes : begin
|
|||
local-parameter : u # Y-position of the ring's top
|
||||
local-parameter : ada -- ArchDepthA
|
||||
local-parameter : adb -- ArchDepthB
|
||||
local-parameter : overshoot -- OX
|
||||
local-parameter : ox -- OX
|
||||
local-parameter : af -- nothing # Additional function for the control knots
|
||||
|
||||
return : if (u - d > ada + adb)
|
||||
list
|
||||
flat (x - overshoot) (u - adb) af
|
||||
curl (x - overshoot) (d + ada)
|
||||
g4 (x - overshoot) [mix d u (ada / (ada + adb))] af
|
||||
flat (x - ox) (u - adb) af
|
||||
curl (x - ox) (d + ada)
|
||||
g4 (x - ox) [mix d u (ada / (ada + adb))] af
|
||||
|
||||
export : define flex-params [ru]: begin
|
||||
local-parameter : x # X-position of the stroke, without overshoot
|
||||
|
@ -550,14 +550,14 @@ glyph-block CommonShapes : begin
|
|||
local-parameter : u # Y-position of the ring's top
|
||||
local-parameter : ada -- ArchDepthA
|
||||
local-parameter : adb -- ArchDepthB
|
||||
local-parameter : overshoot -- OX
|
||||
local-parameter : ox -- OX
|
||||
local-parameter : af -- nothing # Additional function for the control knots
|
||||
|
||||
return : if (u - d > ada + adb)
|
||||
list
|
||||
flat (x - overshoot) (d + ada) af
|
||||
curl (x - overshoot) (u - adb)
|
||||
g4 (x - overshoot) [mix d u (ada / (ada + adb))] af
|
||||
flat (x - ox) (d + ada) af
|
||||
curl (x - ox) (u - adb)
|
||||
g4 (x - ox) [mix d u (ada / (ada + adb))] af
|
||||
|
||||
glyph-block-export arch
|
||||
define arch : namespace
|
||||
|
@ -772,19 +772,19 @@ glyph-block CommonShapes : begin
|
|||
glyph-block-export ExtLineCenter
|
||||
define [ExtLineCenter k sw x1 y1 x2 y2] : dispiro
|
||||
widths.center sw
|
||||
corner [mix x1 x2 (-k)] [mix y1 y2 (-k)]
|
||||
corner [mix x1 x2 (0-k)] [mix y1 y2 (0-k)]
|
||||
corner [mix x1 x2 (1+k)] [mix y1 y2 (1+k)]
|
||||
|
||||
glyph-block-export ExtLineLhs
|
||||
define [ExtLineLhs k sw x1 y1 x2 y2] : dispiro
|
||||
widths.lhs sw
|
||||
corner [mix x1 x2 (-k)] [mix y1 y2 (-k)]
|
||||
corner [mix x1 x2 (0-k)] [mix y1 y2 (0-k)]
|
||||
corner [mix x1 x2 (1+k)] [mix y1 y2 (1+k)]
|
||||
|
||||
glyph-block-export ExtLineRhs
|
||||
define [ExtLineRhs k sw x1 y1 x2 y2] : dispiro
|
||||
widths.rhs sw
|
||||
corner [mix x1 x2 (-k)] [mix y1 y2 (-k)]
|
||||
corner [mix x1 x2 (0-k)] [mix y1 y2 (0-k)]
|
||||
corner [mix x1 x2 (1+k)] [mix y1 y2 (1+k)]
|
||||
|
||||
# Dot variant constructor
|
||||
|
|
|
@ -45,7 +45,7 @@ glyph-block Letter-Armenian-To : begin
|
|||
flat (df.leftSB + [HSwToV : df.mvs - df.shoulderFine]) (XH - df.smallArchDepthA - TINY) [widths.rhs df.shoulderFine]
|
||||
curl (df.leftSB + [HSwToV : df.mvs - df.shoulderFine]) (XH - df.smallArchDepthA)
|
||||
arch.rhs XH (sw -- df.mvs) (swBefore -- df.shoulderFine)
|
||||
flatside.rd df.rightSB 0 XH df.smallArchDepthA df.smallArchDepthB 0 (af -- [widths.rhs df.mvs])
|
||||
flatside.rd df.rightSB 0 XH df.smallArchDepthA df.smallArchDepthB 0 [widths.rhs df.mvs]
|
||||
arch.rhs 0 (sw -- df.mvs) (swAfter -- fine)
|
||||
g4 (df.middle - [HSwToV : 0.5 * fine]) [mix 0 barPosT 0.5] [widths.rhs fine]
|
||||
arcvh
|
||||
|
|
|
@ -22,7 +22,7 @@ glyph-block Letter-Latin-Upper-Q : begin
|
|||
return : dispiro
|
||||
g4.right.mid [arch.adjust-x.bot df.middle fine] (sw - fine) [widths.lhs fine]
|
||||
archv
|
||||
flatside.ru df.rightSB 0 top ArchDepthA ArchDepthB (af -- [widths.lhs sw])
|
||||
flatside.ru df.rightSB 0 top ArchDepthA ArchDepthB nothing [widths.lhs sw]
|
||||
arch.lhs top
|
||||
flatside.ld df.leftSB 0 top ArchDepthA ArchDepthB
|
||||
arcvh
|
||||
|
@ -48,7 +48,7 @@ glyph-block Letter-Latin-Upper-Q : begin
|
|||
flat df.width (yRingStart + O) [widths.rhs.heading fine Leftward]
|
||||
curl [arch.adjust-x.bot df.middle] (yRingStart + O)
|
||||
archv
|
||||
flatside.lu df.leftSB yRingStart top ArchDepthA ArchDepthB (af -- [widths.rhs Stroke])
|
||||
flatside.lu df.leftSB yRingStart top ArchDepthA ArchDepthB nothing [widths.rhs Stroke]
|
||||
arch.rhs top
|
||||
flatside.rd df.rightSB 0 top ArchDepthA ArchDepthB
|
||||
MaskBelowLine
|
||||
|
|
|
@ -342,7 +342,7 @@ glyph-block Letter-Shared-Shapes : begin
|
|||
arch.lhs bot (sw -- sw) (swBefore -- fine)
|
||||
flatside.ru right bot top ada adb
|
||||
arch.lhs top (sw -- sw) (swAfter -- fine)
|
||||
flatside.ld (left + [HSwToV : sw - fine]) bot top ada adb 0 (af -- [widths.lhs fine])
|
||||
flatside.ld (left + [HSwToV : sw - fine]) bot top ada adb 0 [widths.lhs fine]
|
||||
|
||||
export : define [toothless] : with-params [
|
||||
[top XH] [bot 0] [left SB] [right RightSB] [rise SHook] [sw Stroke] [fine ShoulderFine]
|
||||
|
@ -621,7 +621,7 @@ glyph-block Letter-Shared-Shapes : begin
|
|||
export : define [DefaultInnerRadius] : Math.max (XH / 32) (0.5 * [AdviceStroke2 24 32 XH])
|
||||
|
||||
define [FineSw sw] : begin
|
||||
define mocFine : [AdviceStroke 3] / Stroke * sw
|
||||
define mocFine : [AdviceStroke 3] * (sw / Stroke)
|
||||
return : mocFine / [mix 1 HVContrast 0.375]
|
||||
|
||||
define DiagTailSuperness DesignParameters.superness
|
||||
|
@ -652,8 +652,8 @@ glyph-block Letter-Shared-Shapes : begin
|
|||
[Math.sin theta] ** (2 / DiagTailSuperness)
|
||||
|
||||
define [superEllipseDerivative theta] : begin
|
||||
local dc : (-2 / DiagTailSuperness) * [Math.sin theta] * ([Math.cos theta] ** (2 / DiagTailSuperness - 1))
|
||||
local ds : (+2 / DiagTailSuperness) * [Math.cos theta] * ([Math.sin theta] ** (2 / DiagTailSuperness - 1))
|
||||
local dc : (2 / DiagTailSuperness) * [Math.sin (-theta)] * ([Math.cos theta] ** (2 / DiagTailSuperness - 1))
|
||||
local ds : (2 / DiagTailSuperness) * [Math.cos (-theta)] * ([Math.sin theta] ** (2 / DiagTailSuperness - 1))
|
||||
local h : Math.hypot dc ds
|
||||
return : list (dc / h) (ds / h)
|
||||
|
||||
|
@ -824,7 +824,7 @@ glyph-block Letter-Shared-Shapes : begin
|
|||
local mid : mix left right 0.5
|
||||
include : dispiro
|
||||
widths.rhs sw
|
||||
g2 (left - [HSwToV : 0.5 * sw]) (y)
|
||||
g2 (left - [HSwToV : 0.5 * sw]) (y + 0)
|
||||
g2 (mid - [HSwToV : 0.5 * sw]) (y + rise)
|
||||
include : dispiro
|
||||
widths.center sw
|
||||
|
@ -877,8 +877,8 @@ glyph-block Letter-Shared-Shapes : begin
|
|||
do "Descender shapes"
|
||||
define [xLinkStroke xLink x yAttach sw]
|
||||
if (xLink == nothing) [no-shape] : HBar.b
|
||||
Math.min xLink (x - [HSwToV : 0.5 * sw])
|
||||
Math.max xLink (x + [HSwToV : 0.5 * sw])
|
||||
Math.min xLink : x - [HSwToV : 0.5 * sw]
|
||||
Math.max xLink : x + [HSwToV : 0.5 * sw]
|
||||
begin yAttach
|
||||
|
||||
define [Descenders Impl] : namespace
|
||||
|
@ -992,7 +992,7 @@ glyph-block Letter-Shared-Shapes : begin
|
|||
ada -- ArchDepthA
|
||||
adb -- ArchDepthB
|
||||
sw -- df.mvs
|
||||
xDepth -- (-[Math.max [HSwToV df.mvs] : Math.min HookX : 0.5 * (df.rightSB - df.leftSB) - [HSwToV df.mvs]])
|
||||
xDepth -- (0 - [Math.max [HSwToV df.mvs] : Math.min HookX : 0.5 * (df.rightSB - df.leftSB) - [HSwToV df.mvs]])
|
||||
|
||||
# Hook for Eng shape
|
||||
glyph-block-export EngHook
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue