Constant name cleanup
This commit is contained in:
parent
0ede6b66f6
commit
85d7c1d8c9
16 changed files with 929 additions and 927 deletions
|
@ -30,7 +30,7 @@ export all : define [buildGlyphs para recursive recursiveCodes] : begin
|
|||
local unicodeGlyphs {}
|
||||
|
||||
define metrics : calculateMetrics para
|
||||
define [object globalTransform UPM Middle CAP XH SB RightSB Contrast Stroke Superness Width TanSlope OverlayPos Descender symbolMid parenTop parenBot operTop operBot plusTop plusBot tackTop tackBot adviceBlackness MVertStrokeD] metrics
|
||||
define [object GlobalTransform UPM Middle CAP XH SB RightSB Contrast Stroke Superness Width TanSlope OverlayPos Descender SymbolMid ParenTop ParenBot OperTop OperBot PlusTop PlusBot TackTop TackBot adviceBlackness MVertStrokeD] metrics
|
||||
|
||||
define fontMetrics {.head {.} .hhea {.} .OS_2 {.} .post {.}}
|
||||
setFontMetrics para metrics fontMetrics
|
||||
|
@ -84,7 +84,7 @@ export all : define [buildGlyphs para recursive recursiveCodes] : begin
|
|||
|
||||
local glyphObject [new Glyph saveGlyphName]
|
||||
glyphObject.setWidth Width
|
||||
glyphObject.gizmo = globalTransform
|
||||
glyphObject.gizmo = GlobalTransform
|
||||
glyphObject.include actions true true
|
||||
warnAboutBrokenGlyph glyphObject ensuredGlyphName
|
||||
|
||||
|
@ -118,8 +118,8 @@ export all : define [buildGlyphs para recursive recursiveCodes] : begin
|
|||
|
||||
### Spiro constructions
|
||||
# Basic knots
|
||||
define spirofns : spirokit.SetupBuilders : object globalTransform Contrast Stroke Glyph para Superness
|
||||
define booleFns : BooleKit.SetupBuilders : object globalTransform Glyph
|
||||
define spirofns : spirokit.SetupBuilders : object GlobalTransform Contrast Stroke Glyph para Superness
|
||||
define booleFns : BooleKit.SetupBuilders : object GlobalTransform Glyph
|
||||
|
||||
# IDKY, but wrapping "metrics" prevents Node.js on Arch modifying it.
|
||||
define $$Capture$$ : object [metrics : Object.create metrics] $NamedParameterPair$ $donothing$ para recursive recursiveCodes variantSelector glyphMap glyphList unicodeGlyphs $createAndSaveGlyphImpl$ spirofns booleFns MarkSet AS_BASE ALSO_METRICS pickHash dependencyProfile getDependencyProfile buildGlyphs newtemp tagged DivFrame fontMetrics $assignUnicodeImpl$
|
||||
|
|
|
@ -2,17 +2,17 @@ import 'typo-geom' as TypoGeom
|
|||
import '../../support/curve-util' as CurveUtil
|
||||
|
||||
export : define [SetupBuilders args] : begin
|
||||
define [object Glyph globalTransform] args
|
||||
define [object Glyph GlobalTransform] args
|
||||
define [Boole operator] : lambda [] : let [k : {}.slice.call arguments 0] : lambda [dontinc] : begin
|
||||
local g : new Glyph
|
||||
set g.gizmo : this.gizmo || globalTransform
|
||||
set g.gizmo : this.gizmo || GlobalTransform
|
||||
if (k.length == 0) : return g
|
||||
|
||||
g.include k.0
|
||||
set g.contours : g.contours.map CurveUtil.convertContourToCubic
|
||||
foreach [item : items-of : k.slice 1] : begin
|
||||
local g1 : new Glyph
|
||||
set g1.gizmo : this.gizmo || globalTransform
|
||||
set g1.gizmo : this.gizmo || GlobalTransform
|
||||
g1.include item
|
||||
set g1.contours : g1.contours.map CurveUtil.convertContourToCubic
|
||||
local c1 : TypoGeom.Boolean.combine operator
|
||||
|
|
|
@ -5,7 +5,7 @@ import '../../support/transform' as Transform
|
|||
import '../../support/utils' as [object fallback mix bez2 bez3]
|
||||
|
||||
export : define [SetupBuilders args] : begin
|
||||
define [object para Glyph Contrast globalTransform Stroke Superness] args
|
||||
define [object para Glyph Contrast GlobalTransform Stroke Superness] args
|
||||
|
||||
define [g4 x y f] {.x x .y y .type 'g4' .af f}
|
||||
define [g2 x y f] {.x x .y y .type 'g2' .af f}
|
||||
|
@ -158,7 +158,7 @@ export : define [SetupBuilders args] : begin
|
|||
define [dispiro] : let [args : {}.slice.call arguments 0] : lambda [dontinc] : begin
|
||||
define CLOSED true
|
||||
local s : new SpiroExpansionContext
|
||||
set s.gizmo : this.gizmo || globalTransform
|
||||
set s.gizmo : this.gizmo || GlobalTransform
|
||||
local {.knots knots .closed closed .lastafs lastafs} : prepareSpiroKnots [{}.slice.call args 0] s
|
||||
foreach knot [items-of knots] : let [ty knot.type] [af knot.af] : begin
|
||||
set knot.af : lambda [] : begin
|
||||
|
@ -188,7 +188,7 @@ export : define [SetupBuilders args] : begin
|
|||
return g
|
||||
|
||||
define [spiro-outline] : let [k : {}.slice.call arguments 0] : lambda [dontinc] : begin
|
||||
local g : new CurveUtil.BezToContoursSink (this.gizmo || globalTransform)
|
||||
local g : new CurveUtil.BezToContoursSink (this.gizmo || GlobalTransform)
|
||||
local {.knots knots .closed closed .lastafs lastafs} : prepareSpiroKnots k g
|
||||
convertSpiroToBezier knots closed g
|
||||
foreach af [items-of lastafs] : if af : af.call g
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue