Balances: /r, /g, superscripts, etc.
This commit is contained in:
parent
c3b45df019
commit
0a51584579
|
@ -46,7 +46,9 @@ define-macro reverse-last : syntax-rules
|
||||||
define-macro eject-contour : syntax-rules
|
define-macro eject-contour : syntax-rules
|
||||||
`[eject-contour @::args] {'.syntactic-closure' `[currentGlyph.eject-contour @::args] env}
|
`[eject-contour @::args] {'.syntactic-closure' `[currentGlyph.eject-contour @::args] env}
|
||||||
define-macro tag-contour : syntax-rules
|
define-macro tag-contour : syntax-rules
|
||||||
`[tag-contour @name] {'.syntactic-closure' `(currentGlyph.contours.(currentGlyph.contours.length - 1).tag = @name) env}
|
`[tag-contour @::args] {'.syntactic-closure' `[currentGlyph.tag-contour @::args] env}
|
||||||
|
define-macro retag-contour : syntax-rules
|
||||||
|
`[retag-contour @::args] {'.syntactic-closure' `[currentGlyph.retag-contour @::args] env}
|
||||||
define-macro assign-unicode : syntax-rules
|
define-macro assign-unicode : syntax-rules
|
||||||
`[assign-unicode @code] {".syntactic-closure" `[begin \\
|
`[assign-unicode @code] {".syntactic-closure" `[begin \\
|
||||||
currentGlyph.assign-unicode @code
|
currentGlyph.assign-unicode @code
|
||||||
|
@ -90,12 +92,9 @@ define [anchorDeriv] : begin
|
||||||
return {.anchors h}
|
return {.anchors h}
|
||||||
|
|
||||||
# contour tagging
|
# contour tagging
|
||||||
define [tagged tag fn] : lambda [] : begin
|
define [tagged tag component] : begin
|
||||||
local _tag this.defaultTag
|
set component.tag tag
|
||||||
set this.defaultTag tag
|
return component
|
||||||
fn.apply this arguments
|
|
||||||
set this.defaultTag _tag
|
|
||||||
return nothing
|
|
||||||
|
|
||||||
export as build : define [buildFont para recursive recursiveCodes] : begin
|
export as build : define [buildFont para recursive recursiveCodes] : begin
|
||||||
define variantSelector para.variantSelector
|
define variantSelector para.variantSelector
|
||||||
|
@ -220,7 +219,7 @@ export as build : define [buildFont para recursive recursiveCodes] : begin
|
||||||
define WHITENESS : ((XH - STROKE * 3) * (RIGHTSB - SB) * (1 / 3)) / (XH * (RIGHTSB - SB))
|
define WHITENESS : ((XH - STROKE * 3) * (RIGHTSB - SB) * (1 / 3)) / (XH * (RIGHTSB - SB))
|
||||||
define [adviceBlackness crowdedness] : Math.min STROKE ((RIGHTSB - SB) * (1 - WHITENESS) / (crowdedness * CORRECTION_HX))
|
define [adviceBlackness crowdedness] : Math.min STROKE ((RIGHTSB - SB) * (1 - WHITENESS) / (crowdedness * CORRECTION_HX))
|
||||||
define MVERTSTROKE : adviceBlackness : fallback para.lllcrowdedness (3 + 1 / 3)
|
define MVERTSTROKE : adviceBlackness : fallback para.lllcrowdedness (3 + 1 / 3)
|
||||||
define OVERLAYSTROKE : adviceBlackness 4
|
define OVERLAYSTROKE : adviceBlackness 3.75
|
||||||
define OPERATORSTROKE : adviceBlackness 3.2
|
define OPERATORSTROKE : adviceBlackness 3.2
|
||||||
define SHOULDERFINE : [adviceBlackness 4] / 2
|
define SHOULDERFINE : [adviceBlackness 4] / 2
|
||||||
|
|
||||||
|
|
|
@ -219,12 +219,12 @@ define [suggestName name] : begin
|
||||||
define [createCircledGlyphs records] : if [not recursive] : begin
|
define [createCircledGlyphs records] : if [not recursive] : begin
|
||||||
local dscale 0.55
|
local dscale 0.55
|
||||||
local pendingGlyphs : records.map : [record] -> record.1
|
local pendingGlyphs : records.map : [record] -> record.1
|
||||||
local miniatureFont : Miniature pendingGlyphs 4 0.65
|
local miniatureFont : Miniature pendingGlyphs 3.5 0.65
|
||||||
|
|
||||||
foreach {unicode glyphid w} [items-of records] : create-glyph [suggestName : 'circle' + glyphid] : glyph-construction
|
foreach {unicode glyphid w} [items-of records] : create-glyph [suggestName : 'circle' + glyphid] : glyph-construction
|
||||||
local width : fallback w WIDTH
|
local width : fallback w WIDTH
|
||||||
set-width width
|
set-width width
|
||||||
local sw [adviceBlackness 6]
|
local sw [adviceBlackness 5]
|
||||||
if unicode : assign-unicode unicode
|
if unicode : assign-unicode unicode
|
||||||
include : create-glyph [suggestName : 'circleinner' + glyphid] : glyph-construction
|
include : create-glyph [suggestName : 'circleinner' + glyphid] : glyph-construction
|
||||||
local g miniatureFont.(glyphid)
|
local g miniatureFont.(glyphid)
|
||||||
|
@ -243,7 +243,7 @@ define [createCircledGlyphs records] : if [not recursive] : begin
|
||||||
|
|
||||||
define [createSuperscripts records] : if [not recursive] : begin
|
define [createSuperscripts records] : if [not recursive] : begin
|
||||||
local pendingGlyphs : records.map : [record] -> record.1
|
local pendingGlyphs : records.map : [record] -> record.1
|
||||||
local miniatureFont : Miniature pendingGlyphs 3.7 0.7
|
local miniatureFont : Miniature pendingGlyphs 3.5 0.7
|
||||||
foreach {unicode glyphid} [items-of records] : create-glyph [suggestName : 'sup' + glyphid] : glyph-construction
|
foreach {unicode glyphid} [items-of records] : create-glyph [suggestName : 'sup' + glyphid] : glyph-construction
|
||||||
if unicode : assign-unicode unicode
|
if unicode : assign-unicode unicode
|
||||||
include miniatureFont.(glyphid) AS_BASE
|
include miniatureFont.(glyphid) AS_BASE
|
||||||
|
@ -255,7 +255,7 @@ define [createSuperscripts records] : if [not recursive] : begin
|
||||||
|
|
||||||
define [createSubscripts records] : if [not recursive] : begin
|
define [createSubscripts records] : if [not recursive] : begin
|
||||||
local pendingGlyphs : records.map : [record] -> record.1
|
local pendingGlyphs : records.map : [record] -> record.1
|
||||||
local miniatureFont : Miniature pendingGlyphs 3.7 0.7
|
local miniatureFont : Miniature pendingGlyphs 3.5 0.7
|
||||||
foreach {unicode glyphid} [items-of records] : create-glyph [suggestName : 'sub' + glyphid] : glyph-construction
|
foreach {unicode glyphid} [items-of records] : create-glyph [suggestName : 'sub' + glyphid] : glyph-construction
|
||||||
if unicode : assign-unicode unicode
|
if unicode : assign-unicode unicode
|
||||||
include miniatureFont.(glyphid) AS_BASE
|
include miniatureFont.(glyphid) AS_BASE
|
||||||
|
@ -487,7 +487,7 @@ createSuperscripts : list
|
||||||
list 0x1D41 'U'
|
list 0x1D41 'U'
|
||||||
list 0x1D42 'W'
|
list 0x1D42 'W'
|
||||||
list 0x2C7D 'V'
|
list 0x2C7D 'V'
|
||||||
if [not recursive] : let [df : Miniature {'a' 'o'} 0.7 0.7] : begin
|
if [not recursive] : let [df : Miniature {'a' 'o'} 3.5 0.7] : begin
|
||||||
create-glyph 'ordfeminine' : glyph-construction
|
create-glyph 'ordfeminine' : glyph-construction
|
||||||
assign-unicode 0xAA
|
assign-unicode 0xAA
|
||||||
include df.a
|
include df.a
|
||||||
|
|
|
@ -569,7 +569,7 @@ define [CyrYaShape top] : glyph-construction
|
||||||
include : dispiro
|
include : dispiro
|
||||||
widths.center
|
widths.center
|
||||||
g4.up.start (left + HALFSTROKE) 0 [heading UPWARD]
|
g4.up.start (left + HALFSTROKE) 0 [heading UPWARD]
|
||||||
quadcontrols 0 0.4 8
|
quadcontrols 0 [if SLAB 0.2 0.4] 8
|
||||||
g4 MIDDLE ((top - STROKE) * m)
|
g4 MIDDLE ((top - STROKE) * m)
|
||||||
|
|
||||||
if SLAB : begin
|
if SLAB : begin
|
||||||
|
|
|
@ -117,13 +117,13 @@ create-glyph 'Y' : glyph-construction
|
||||||
define [KShape top] : glyph-construction
|
define [KShape top] : glyph-construction
|
||||||
local turn (top * 0.99)
|
local turn (top * 0.99)
|
||||||
|
|
||||||
local attach (top * 0.375)
|
local attach (top * [if SLAB 0.325 0.375])
|
||||||
local attach2 MIDDLE
|
local attach2 [if SLAB [mix SB RIGHTSB 0.48] MIDDLE]
|
||||||
|
|
||||||
local fine : adviceBlackness 3.5
|
local fine : adviceBlackness 3.5
|
||||||
include : dispiro
|
include : dispiro
|
||||||
g4.down.start (RIGHTSB - [if SLAB (JUT / 4) 0]) top [widths.heading 0 (STROKE * 1.05 * (WIDTH * 2 / UPM)) DOWNWARD]
|
g4.down.start RIGHTSB top [widths.heading 0 (STROKE * [if SLAB 1.15 1.05] * (WIDTH * 2 / UPM)) DOWNWARD]
|
||||||
bezcontrols 0 0.2 0.5 0.65 8
|
bezcontrols 0 [if SLAB 0.1 0.2] 0.5 [if SLAB 0.55 0.65] 8
|
||||||
g4 (SB + STROKE) attach [widths 0 fine]
|
g4 (SB + STROKE) attach [widths 0 fine]
|
||||||
include : dispiro
|
include : dispiro
|
||||||
widths.center
|
widths.center
|
||||||
|
@ -131,7 +131,7 @@ define [KShape top] : glyph-construction
|
||||||
quadcontrols 0 [if SLAB 0.125 0.25] 8
|
quadcontrols 0 [if SLAB 0.125 0.25] 8
|
||||||
g4 attach2 (top * 0.61) [widths.center fine]
|
g4 attach2 (top * 0.61) [widths.center fine]
|
||||||
if SLAB : begin
|
if SLAB : begin
|
||||||
include : RightwardTopSerif (RIGHTSB - JUT / 4) top (SIDEJUT + O)
|
include : RightwardTopSerif RIGHTSB top (SIDEJUT + O - JUT / 4)
|
||||||
include : RightwardBottomSerif (RIGHTSB - O - JUT / 4) 0 SIDEJUT
|
include : RightwardBottomSerif (RIGHTSB - O - JUT / 4) 0 SIDEJUT
|
||||||
|
|
||||||
create-glyph 'K' : glyph-construction
|
create-glyph 'K' : glyph-construction
|
||||||
|
@ -243,7 +243,7 @@ define [RShape top] : glyph-construction
|
||||||
include : dispiro
|
include : dispiro
|
||||||
widths.center
|
widths.center
|
||||||
g4.up.start (right - HALFSTROKE) 0 [heading UPWARD]
|
g4.up.start (right - HALFSTROKE) 0 [heading UPWARD]
|
||||||
quadcontrols 0 0.4 8
|
quadcontrols 0 [if SLAB 0.2 0.4] 8
|
||||||
g4 MIDDLE ((top - STROKE) * m)
|
g4 MIDDLE ((top - STROKE) * m)
|
||||||
if SLAB : begin
|
if SLAB : begin
|
||||||
include : RightwardBottomSerif (RIGHTSB - JUT / 4) 0 (SIDEJUT + JUT / 4)
|
include : RightwardBottomSerif (RIGHTSB - JUT / 4) 0 (SIDEJUT + JUT / 4)
|
||||||
|
@ -434,6 +434,7 @@ define [TShape top] : glyph-construction
|
||||||
include : DownwardLeftSerif l top VJUT MVERTSTROKE
|
include : DownwardLeftSerif l top VJUT MVERTSTROKE
|
||||||
tag-contour 'serifLT'
|
tag-contour 'serifLT'
|
||||||
include : CenterBottomSerif MIDDLE 0 JUT
|
include : CenterBottomSerif MIDDLE 0 JUT
|
||||||
|
tag-contour 'serifRB'
|
||||||
|
|
||||||
create-glyph 'T' : glyph-construction
|
create-glyph 'T' : glyph-construction
|
||||||
set-width WIDTH
|
set-width WIDTH
|
||||||
|
|
|
@ -91,18 +91,19 @@ create-glyph 'g.doublestorey' : glyph-construction
|
||||||
local obot : XH * GBARPOS - O - HALFSTROKE
|
local obot : XH * GBARPOS - O - HALFSTROKE
|
||||||
include : smallo XH obot SB (RIGHTSB - 0.3 * SB)
|
include : smallo XH obot SB (RIGHTSB - 0.3 * SB)
|
||||||
|
|
||||||
local gleftx (SB * 0.8 + OX)
|
local gleftx ([mix 0 SB 0.85] + OX)
|
||||||
local grightx (RIGHTSB + SB * 0.1 - OX)
|
local grightx ([mix WIDTH RIGHTSB 0.825] - OX)
|
||||||
local groundy : Math.round : [mix DESCENDER (XH * GBARPOS) 0.625] + HALFSTROKE
|
local groundy : Math.round : [mix DESCENDER (XH * GBARPOS) 0.63] + HALFSTROKE
|
||||||
|
local gtipy [mix XH obot 0.975]
|
||||||
include : dispiro
|
include : dispiro
|
||||||
g4 [mix SB RIGHTSB 0.3] [mix XH obot 0.95] [widths 0 (STROKE * 0.7)]
|
g4.left.start [mix SB RIGHTSB 0.4] gtipy [widths 0 (STROKE * 0.7)]
|
||||||
alsothru (-1.2) 0.5 [widths HALFSTROKE HALFSTROKE]
|
g4 ([mix SB RIGHTSB 0.0575] + STROKE * 0.85) [mix groundy gtipy 0.5] [widths.rhs (STROKE * 0.85)]
|
||||||
flat [mix SB RIGHTSB 0.435] groundy [widths 0 STROKE]
|
flat [mix SB RIGHTSB 0.435] groundy [widths 0 STROKE]
|
||||||
curl [mix RIGHTSB SB 0.435] groundy
|
curl [mix RIGHTSB SB 0.435] groundy
|
||||||
archv 4
|
archv 4
|
||||||
g4 grightx [mix (DESCENDER + O) groundy 0.53]
|
g4 grightx [mix (DESCENDER + O) groundy 0.53]
|
||||||
arcvh
|
arcvh
|
||||||
g4 [mix gleftx grightx 0.5] (DESCENDER + O)
|
g4 MIDDLE (DESCENDER + O)
|
||||||
archv
|
archv
|
||||||
g4 gleftx [mix (DESCENDER + O) groundy 0.53]
|
g4 gleftx [mix (DESCENDER + O) groundy 0.53]
|
||||||
arcvh
|
arcvh
|
||||||
|
@ -218,7 +219,7 @@ create-glyph 'a.upright' : glyph-construction
|
||||||
flat (RIGHTSB - STROKE * CORRECTION_HX) (SMALLSMOOTHB * 0.9) [widths 0 SHOULDERFINE]
|
flat (RIGHTSB - STROKE * CORRECTION_HX) (SMALLSMOOTHB * 0.9) [widths 0 SHOULDERFINE]
|
||||||
curl (RIGHTSB - STROKE * CORRECTION_HX) (SMALLSMOOTHB * 0.9 + 1)
|
curl (RIGHTSB - STROKE * CORRECTION_HX) (SMALLSMOOTHB * 0.9 + 1)
|
||||||
if SLAB : begin
|
if SLAB : begin
|
||||||
include : RightwardBottomSerif RIGHTSB 0 SIDEJUT
|
include : tagged 'serifRB' : RightwardBottomSerif RIGHTSB 0 SIDEJUT
|
||||||
|
|
||||||
create-glyph 'a.italic' : glyph-construction
|
create-glyph 'a.italic' : glyph-construction
|
||||||
set-width WIDTH
|
set-width WIDTH
|
||||||
|
@ -256,8 +257,7 @@ create-glyph 'n' : glyph-construction
|
||||||
: then : include : tagged 'serifRB' : RightwardBottomSerif RIGHTSB 0 SIDEJUT
|
: then : include : tagged 'serifRB' : RightwardBottomSerif RIGHTSB 0 SIDEJUT
|
||||||
: else : include : tagged 'serifRB' : CenterBottomSerif (RIGHTSB - HALFSTROKE * CORRECTION_HX) 0 JUT
|
: else : include : tagged 'serifRB' : CenterBottomSerif (RIGHTSB - HALFSTROKE * CORRECTION_HX) 0 JUT
|
||||||
if (para.italicangle === 0) : begin
|
if (para.italicangle === 0) : begin
|
||||||
include : CenterBottomSerif (SB + HALFSTROKE * CORRECTION_HX) 0 JUT
|
include : tagged 'serifLB' : CenterBottomSerif (SB + HALFSTROKE * CORRECTION_HX) 0 JUT
|
||||||
tag-contour 'serifLB'
|
|
||||||
|
|
||||||
create-glyph 'u' : glyph-construction
|
create-glyph 'u' : glyph-construction
|
||||||
set-width WIDTH
|
set-width WIDTH
|
||||||
|
@ -267,6 +267,7 @@ create-glyph 'u' : glyph-construction
|
||||||
include glyphs.n
|
include glyphs.n
|
||||||
eject-contour 'serifRB'
|
eject-contour 'serifRB'
|
||||||
eject-contour 'serifLB'
|
eject-contour 'serifLB'
|
||||||
|
retag-contour 'serifLT' 'serifRB'
|
||||||
include : FlipAround MIDDLE (XH / 2)
|
include : FlipAround MIDDLE (XH / 2)
|
||||||
|
|
||||||
if SLAB : begin
|
if SLAB : begin
|
||||||
|
@ -544,10 +545,8 @@ create-glyph 'r' : glyph-construction
|
||||||
set-anchor 'overlay' BASE rbar (XH * 0.5)
|
set-anchor 'overlay' BASE rbar (XH * 0.5)
|
||||||
|
|
||||||
if SLAB : begin
|
if SLAB : begin
|
||||||
include : CenterBottomSerif (SB + RBALANCE + STROKE * 0.75 * CORRECTION_HX) 0 (JUT + HALFSTROKE / 2)
|
include : tagged 'serifLB' : CenterBottomSerif (SB + RBALANCE + RBALANCE * 1.25) 0 (JUT + RBALANCE * 0.75)
|
||||||
tag-contour 'serifLB'
|
include : tagged 'serifLT' : LeftwardTopSerif (SB + RBALANCE) XH (SIDEJUT + RBALANCE * 0.25)
|
||||||
include : LeftwardTopSerif (SB + RBALANCE) XH SIDEJUT
|
|
||||||
tag-contour 'serifLT'
|
|
||||||
|
|
||||||
|
|
||||||
### f
|
### f
|
||||||
|
|
|
@ -198,8 +198,7 @@ create-glyph 'rlongleg' : glyph-construction
|
||||||
eject-contour 'serifLB'
|
eject-contour 'serifLB'
|
||||||
include : VBarLeft (SB + RBALANCE) DESCENDER 0
|
include : VBarLeft (SB + RBALANCE) DESCENDER 0
|
||||||
if SLAB : begin
|
if SLAB : begin
|
||||||
include : CenterBottomSerif (SB + RBALANCE + STROKE * 0.75 * CORRECTION_HX) DESCENDER (JUT + HALFSTROKE / 2)
|
include : tagged 'serifLB' : CenterBottomSerif (SB + RBALANCE + RBALANCE * 1.25) DESCENDER (JUT + RBALANCE * 0.75)
|
||||||
tag-contour 'serifLB'
|
|
||||||
|
|
||||||
create-glyph 'turnmleg' : glyph-construction
|
create-glyph 'turnmleg' : glyph-construction
|
||||||
assign-unicode 0x270
|
assign-unicode 0x270
|
||||||
|
|
|
@ -73,7 +73,7 @@ symbol-block 'Currency'
|
||||||
create-glyph 'frenchFranc' : glyph-construction
|
create-glyph 'frenchFranc' : glyph-construction
|
||||||
assign-unicode 0x20A3
|
assign-unicode 0x20A3
|
||||||
include glyphs.F
|
include glyphs.F
|
||||||
include : HOverlayBar [mix SB 0 0.7] [mix SB RIGHTSB 0.5] [mix 0 XH 0.3]
|
include : HOverlayBar (SB * 0.5) (SB * 3 + STROKE * CORRECTION_HX) [mix 0 XH 0.4]
|
||||||
|
|
||||||
create-glyph 'peseta' : glyph-construction
|
create-glyph 'peseta' : glyph-construction
|
||||||
assign-unicode 0x20A7
|
assign-unicode 0x20A7
|
||||||
|
|
|
@ -212,7 +212,7 @@ symbol-block 'Typographic Symbols'
|
||||||
set-width WIDTH
|
set-width WIDTH
|
||||||
assign-unicode '&'
|
assign-unicode '&'
|
||||||
|
|
||||||
local fine : adviceBlackness 3.5
|
local fine : adviceBlackness 3
|
||||||
local p 0.85
|
local p 0.85
|
||||||
local l 0.05
|
local l 0.05
|
||||||
local pr 0.85
|
local pr 0.85
|
||||||
|
|
|
@ -11,7 +11,7 @@ PREFIX = $(VARIANTNAME)iosevka$(SUFFIX)
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
SHELL = C:\\Windows\\System32\\cmd.exe
|
SHELL = C:\\Windows\\System32\\cmd.exe
|
||||||
SUPPRESS_ERRORS = 2> NUL
|
SUPPRESS_ERRORS = 2> NUL
|
||||||
NODE = node --noincremental_marking --max_executable_size=1024
|
NODE = node --max_executable_size=4096
|
||||||
else
|
else
|
||||||
SUPPRESS_ERRORS = 2> /dev/null
|
SUPPRESS_ERRORS = 2> /dev/null
|
||||||
NODE = node
|
NODE = node
|
||||||
|
|
|
@ -141,7 +141,7 @@ rbalance = 60
|
||||||
[x-slab-bold]
|
[x-slab-bold]
|
||||||
style = 'Bold'
|
style = 'Bold'
|
||||||
sb = 55
|
sb = 55
|
||||||
rbalance = 80
|
rbalance = 50
|
||||||
|
|
||||||
[x-slab-italic]
|
[x-slab-italic]
|
||||||
style = 'Italic'
|
style = 'Italic'
|
||||||
|
@ -153,7 +153,7 @@ style = 'Bold Italic'
|
||||||
ebalance = 0.375
|
ebalance = 0.375
|
||||||
sbalance = 0.53
|
sbalance = 0.53
|
||||||
sb = 55
|
sb = 55
|
||||||
rbalance = 80
|
rbalance = 50
|
||||||
|
|
||||||
# Variants
|
# Variants
|
||||||
[v-l-hooky.variantSelector]
|
[v-l-hooky.variantSelector]
|
||||||
|
|
|
@ -84,13 +84,21 @@ define [Glyph.prototype.tag-contour tag n] : begin
|
||||||
local lastContour this.contours.(this.contours.length - 1)
|
local lastContour this.contours.(this.contours.length - 1)
|
||||||
if lastContour : if tag : set lastContour.tag tag
|
if lastContour : if tag : set lastContour.tag tag
|
||||||
return this
|
return this
|
||||||
|
define [Glyph.prototype.retag-contour oldtag newtag] : begin
|
||||||
|
if this.contours : foreach [c : items-of this.contours] : if (c.tag === oldtag) : set c.tag newtag
|
||||||
|
return this
|
||||||
define [Glyph.prototype.eject-contour tag] : begin
|
define [Glyph.prototype.eject-contour tag] : begin
|
||||||
set this.contours : this.contours.filter : lambda [c] (c.tag !== tag)
|
set this.contours : this.contours.filter : lambda [c] (c.tag !== tag)
|
||||||
return this
|
return this
|
||||||
|
|
||||||
define [Glyph.prototype.include component copyAnchors] : begin
|
define [Glyph.prototype.include component copyAnchors] : begin
|
||||||
local glyph : match component
|
local glyph : match component
|
||||||
[aFunction it] : return : component.call this
|
[aFunction it] : begin
|
||||||
|
local t this.defaultTag
|
||||||
|
set this.defaultTag component.tag
|
||||||
|
component.call this
|
||||||
|
set this.defaultTag t
|
||||||
|
return this
|
||||||
{:: contours} {.contours contours}
|
{:: contours} {.contours contours}
|
||||||
otherwise component
|
otherwise component
|
||||||
local contours glyph.contours
|
local contours glyph.contours
|
||||||
|
@ -130,7 +138,7 @@ define [Glyph.prototype.include component copyAnchors] : begin
|
||||||
foreach [contour : items-of contours] : begin
|
foreach [contour : items-of contours] : begin
|
||||||
local c {}
|
local c {}
|
||||||
foreach [point : items-of contour] : c.push : tp transform point
|
foreach [point : items-of contour] : c.push : tp transform point
|
||||||
set c.tag : contour.tag || t.defaultTag
|
set c.tag : contour.tag || component.tag || t.defaultTag
|
||||||
this.contours.push c
|
this.contours.push c
|
||||||
if (([not contours] || copyAnchors) && glyph.anchors) : set this.anchors : let [a {.}] [anchors glyph.anchors] [keys : Object.keys glyph.anchors] : begin
|
if (([not contours] || copyAnchors) && glyph.anchors) : set this.anchors : let [a {.}] [anchors glyph.anchors] [keys : Object.keys glyph.anchors] : begin
|
||||||
foreach k [items-of keys] [set a.(k) anchors.(k)]
|
foreach k [items-of keys] [set a.(k) anchors.(k)]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user