remove useless imports

This commit is contained in:
be5invis 2016-06-14 12:39:37 +08:00
parent 95b0ceee17
commit 6680f589cb
15 changed files with 25 additions and 144 deletions

View File

@ -1,5 +1,3 @@
import 'unorm' as unorm
import './support/glyph' as Glyph import './support/glyph' as Glyph
import './support/point' as Point import './support/point' as Point
import './support/spirokit' as spirokit import './support/spirokit' as spirokit
@ -8,7 +6,7 @@ import './support/anchor' as Anchor
import './support/monotonic-interpolate' as smoothreg import './support/monotonic-interpolate' as smoothreg
import './support/fairify' as fairify import './support/fairify' as fairify
import [mix linreg clamp fallback TempFont includeGlyphPart compsiteMarkSet suggestGC] from './support/utils' import [mix linreg clamp fallback TempFont includeGlyphPart compsiteMarkSet] from './support/utils'
import [calculateMetrics setFontMetrics] from './meta/aesthetics' import [calculateMetrics setFontMetrics] from './meta/aesthetics'
import [nameFont] from './meta/naming' import [nameFont] from './meta/naming'
import './meta/features' as Features import './meta/features' as Features
@ -181,7 +179,7 @@ export as build : define [buildFont para recursive recursiveCodes] : begin
include markset.e include markset.e
save 'space' ' ' save 'space' ' '
define capture : object metrics $NamedParameterPair$ $donothing$ para recursive recursiveCodes variantSelector font glyphs glyphList unicodeGlyphs create-glyph $save$ spirofns markset MARK BASE AS_BASE ALSO_METRICS pickHash dependencyProfile getDependencyProfile buildFont newtemp tagged define capture : object metrics $NamedParameterPair$ $donothing$ para recursive recursiveCodes variantSelector font glyphs glyphList unicodeGlyphs create-glyph $save$ spirofns markset MARK BASE AS_BASE ALSO_METRICS pickHash dependencyProfile getDependencyProfile buildFont newtemp tagged TempFont includeGlyphPart compsiteMarkSet
### HERE WE GO ### HERE WE GO
set capture.commonShapes : [import './glyphs/common-shapes.js'].apply.call capture set capture.commonShapes : [import './glyphs/common-shapes.js'].apply.call capture

View File

@ -2,16 +2,7 @@
$$include '../meta/macros.ptl' $$include '../meta/macros.ptl'
import 'unorm' as unorm import 'unorm' as unorm
import [mix linreg clamp fallback suggestGC] from '../support/utils'
import '../support/glyph' as Glyph
import '../support/point' as Point
import '../support/spirokit' as spirokit
import '../support/transform' as : Transform && [object [transformPoint tp] [untransform utp] inverse]
import '../support/anchor' as Anchor
import '../support/monotonic-interpolate' as smoothreg
import '../support/fairify' as fairify
import [mix linreg clamp fallback TempFont includeGlyphPart compsiteMarkSet suggestGC] from '../support/utils'
define customDecompositions : object define customDecompositions : object
# Latvians use comma instead of cedillas in several letters. # Latvians use comma instead of cedillas in several letters.

View File

@ -1,16 +1,9 @@
$$include '../meta/macros.ptl' $$include '../meta/macros.ptl'
import 'unorm' as unorm
import '../support/glyph' as Glyph
import '../support/point' as Point
import '../support/spirokit' as spirokit
import '../support/transform' as : Transform && [object [transformPoint tp] [untransform utp] inverse] import '../support/transform' as : Transform && [object [transformPoint tp] [untransform utp] inverse]
import '../support/anchor' as Anchor
import '../support/monotonic-interpolate' as smoothreg
import '../support/fairify' as fairify import '../support/fairify' as fairify
import [mix linreg clamp fallback TempFont includeGlyphPart compsiteMarkSet suggestGC] from '../support/utils' import [mix linreg clamp fallback] from '../support/utils'
export : define [apply] : begin export : define [apply] : begin
glyph-module-entry glyph-module-entry

View File

@ -4,17 +4,8 @@
$$include '../meta/macros.ptl' $$include '../meta/macros.ptl'
import 'unorm' as unorm
import '../support/glyph' as Glyph
import '../support/point' as Point
import '../support/spirokit' as spirokit
import '../support/transform' as : Transform && [object [transformPoint tp] [untransform utp] inverse] import '../support/transform' as : Transform && [object [transformPoint tp] [untransform utp] inverse]
import '../support/anchor' as Anchor import [mix linreg clamp fallback] from '../support/utils'
import '../support/monotonic-interpolate' as smoothreg
import '../support/fairify' as fairify
import [mix linreg clamp fallback TempFont includeGlyphPart compsiteMarkSet suggestGC] from '../support/utils'
export : define [apply] : begin export : define [apply] : begin
glyph-module-entry commonShapes overmarks glyph-module-entry commonShapes overmarks

View File

@ -1,16 +1,6 @@
$$include '../meta/macros.ptl' $$include '../meta/macros.ptl'
import 'unorm' as unorm import [mix linreg clamp fallback] from '../support/utils'
import '../support/glyph' as Glyph
import '../support/point' as Point
import '../support/spirokit' as spirokit
import '../support/transform' as : Transform && [object [transformPoint tp] [untransform utp] inverse]
import '../support/anchor' as Anchor
import '../support/monotonic-interpolate' as smoothreg
import '../support/fairify' as fairify
import [mix linreg clamp fallback TempFont includeGlyphPart compsiteMarkSet suggestGC] from '../support/utils'
export : define [apply] : begin export : define [apply] : begin
glyph-module-entry commonShapes overmarks letterBasic glyph-module-entry commonShapes overmarks letterBasic

View File

@ -1,17 +1,6 @@
$$include '../meta/macros.ptl' $$include '../meta/macros.ptl'
import 'unorm' as unorm import [mix linreg clamp fallback] from '../support/utils'
import '../support/glyph' as Glyph
import '../support/point' as Point
import '../support/spirokit' as spirokit
import '../support/transform' as : Transform && [object [transformPoint tp] [untransform utp] inverse]
import '../support/anchor' as Anchor
import '../support/monotonic-interpolate' as smoothreg
import '../support/fairify' as fairify
import [mix linreg clamp fallback TempFont includeGlyphPart compsiteMarkSet suggestGC] from '../support/utils'
###### NUMBERS ###### NUMBERS
export : define [apply] : begin export : define [apply] : begin

View File

@ -1,16 +1,6 @@
$$include '../meta/macros.ptl' $$include '../meta/macros.ptl'
import 'unorm' as unorm import [mix linreg clamp fallback] from '../support/utils'
import '../support/glyph' as Glyph
import '../support/point' as Point
import '../support/spirokit' as spirokit
import '../support/transform' as : Transform && [object [transformPoint tp] [untransform utp] inverse]
import '../support/anchor' as Anchor
import '../support/monotonic-interpolate' as smoothreg
import '../support/fairify' as fairify
import [mix linreg clamp fallback TempFont includeGlyphPart compsiteMarkSet suggestGC] from '../support/utils'
export : define [apply] : begin export : define [apply] : begin
glyph-module-entry commonShapes glyph-module-entry commonShapes

View File

@ -1,17 +1,7 @@
###### Brailles symbols ###### Brailles symbols
$$include '../meta/macros.ptl' $$include '../meta/macros.ptl'
import 'unorm' as unorm import [mix linreg clamp fallback] from '../support/utils'
import '../support/glyph' as Glyph
import '../support/point' as Point
import '../support/spirokit' as spirokit
import '../support/transform' as : Transform && [object [transformPoint tp] [untransform utp] inverse]
import '../support/anchor' as Anchor
import '../support/monotonic-interpolate' as smoothreg
import '../support/fairify' as fairify
import [mix linreg clamp fallback TempFont includeGlyphPart compsiteMarkSet suggestGC] from '../support/utils'
export : define [apply] : begin export : define [apply] : begin
glyph-module-entry commonShapes overmarks glyph-module-entry commonShapes overmarks

View File

@ -1,17 +1,8 @@
###### GEOMETRIC SHAPES ###### GEOMETRIC SHAPES
$$include '../meta/macros.ptl' $$include '../meta/macros.ptl'
import 'unorm' as unorm
import '../support/glyph' as Glyph
import '../support/point' as Point
import '../support/spirokit' as spirokit
import '../support/transform' as : Transform && [object [transformPoint tp] [untransform utp] inverse] import '../support/transform' as : Transform && [object [transformPoint tp] [untransform utp] inverse]
import '../support/anchor' as Anchor import [mix linreg clamp fallback] from '../support/utils'
import '../support/monotonic-interpolate' as smoothreg
import '../support/fairify' as fairify
import [mix linreg clamp fallback TempFont includeGlyphPart compsiteMarkSet suggestGC] from '../support/utils'
export : define [apply] : begin export : define [apply] : begin
glyph-module-entry commonShapes overmarks glyph-module-entry commonShapes overmarks

View File

@ -2,17 +2,7 @@
$$include '../meta/macros.ptl' $$include '../meta/macros.ptl'
import 'unorm' as unorm import [mix linreg clamp fallback] from '../support/utils'
import '../support/glyph' as Glyph
import '../support/point' as Point
import '../support/spirokit' as spirokit
import '../support/transform' as : Transform && [object [transformPoint tp] [untransform utp] inverse]
import '../support/anchor' as Anchor
import '../support/monotonic-interpolate' as smoothreg
import '../support/fairify' as fairify
import [mix linreg clamp fallback TempFont includeGlyphPart compsiteMarkSet suggestGC] from '../support/utils'
export : define [apply] : begin export : define [apply] : begin
glyph-module-entry commonShapes overmarks letterBasic glyph-module-entry commonShapes overmarks letterBasic

View File

@ -1,17 +1,7 @@
###### Mathematical symbols ###### Mathematical symbols
$$include '../meta/macros.ptl' $$include '../meta/macros.ptl'
import 'unorm' as unorm import [mix linreg clamp fallback] from '../support/utils'
import '../support/glyph' as Glyph
import '../support/point' as Point
import '../support/spirokit' as spirokit
import '../support/transform' as : Transform && [object [transformPoint tp] [untransform utp] inverse]
import '../support/anchor' as Anchor
import '../support/monotonic-interpolate' as smoothreg
import '../support/fairify' as fairify
import [mix linreg clamp fallback TempFont includeGlyphPart compsiteMarkSet suggestGC] from '../support/utils'
export : define [apply] : begin export : define [apply] : begin
glyph-module-entry commonShapes overmarks letterBasic letterExt glyph-module-entry commonShapes overmarks letterBasic letterExt

View File

@ -1,17 +1,7 @@
###### Other symbols ###### Other symbols
$$include '../meta/macros.ptl' $$include '../meta/macros.ptl'
import 'unorm' as unorm import [mix linreg clamp fallback] from '../support/utils'
import '../support/glyph' as Glyph
import '../support/point' as Point
import '../support/spirokit' as spirokit
import '../support/transform' as : Transform && [object [transformPoint tp] [untransform utp] inverse]
import '../support/anchor' as Anchor
import '../support/monotonic-interpolate' as smoothreg
import '../support/fairify' as fairify
import [mix linreg clamp fallback TempFont includeGlyphPart compsiteMarkSet suggestGC] from '../support/utils'
export : define [apply] : begin export : define [apply] : begin
glyph-module-entry commonShapes overmarks geometricSymbols glyph-module-entry commonShapes overmarks geometricSymbols

View File

@ -1,17 +1,7 @@
### Punctuation symbols ### Punctuation symbols
$$include '../meta/macros.ptl' $$include '../meta/macros.ptl'
import 'unorm' as unorm import [mix linreg clamp fallback] from '../support/utils'
import '../support/glyph' as Glyph
import '../support/point' as Point
import '../support/spirokit' as spirokit
import '../support/transform' as : Transform && [object [transformPoint tp] [untransform utp] inverse]
import '../support/anchor' as Anchor
import '../support/monotonic-interpolate' as smoothreg
import '../support/fairify' as fairify
import [mix linreg clamp fallback TempFont includeGlyphPart compsiteMarkSet suggestGC] from '../support/utils'
export : define [apply] : begin export : define [apply] : begin
glyph-module-entry commonShapes overmarks letterBasic glyph-module-entry commonShapes overmarks letterBasic

View File

@ -9,20 +9,18 @@ snapshot/assets :
PATELC = node ./node_modules/patel/bin/patel-c PATELC = node ./node_modules/patel/bin/patel-c
GLYPH_SEGMENTS = glyphs/common-shapes.js glyphs/overmarks.js glyphs/letters-unified-basic.js glyphs/letters-unified-extended.js glyphs/numbers.js glyphs/symbol-punctuation.js glyphs/symbol-math.js glyphs/symbol-letter.js glyphs/symbol-geometric.js glyphs/symbol-other.js glyphs/symbol-braille.js glyphs/autobuilds.js GLYPH_SEGMENTS = glyphs/common-shapes.js glyphs/overmarks.js glyphs/letters-unified-basic.js glyphs/letters-unified-extended.js glyphs/numbers.js glyphs/symbol-punctuation.js glyphs/symbol-math.js glyphs/symbol-letter.js glyphs/symbol-geometric.js glyphs/symbol-other.js glyphs/symbol-braille.js glyphs/autobuilds.js buildglyphs.js
SUPPORT_FILES_FROM_PTL = support/glyph.js support/spiroexpand.js support/spirokit.js parameters.js support/anchor.js support/point.js support/transform.js support/utils.js meta/aesthetics.js meta/naming.js meta/features.js
SUPPORT_FILES_FROM_PTL = support/glyph.js support/spiroexpand.js support/spirokit.js parameters.js support/anchor.js support/point.js support/transform.js support/utils.js meta/aesthetics.js meta/naming.js meta/features.js $(GLYPH_SEGMENTS) SUPPORT_FILES_JS = generator.js emptyfont.toml parameters.toml support/fairify.js
SUPPORT_FILES = $(SUPPORT_FILES_FROM_PTL) $(SUPPORT_FILES_JS)
SUPPORT_FILES = $(SUPPORT_FILES_FROM_PTL) generator.js emptyfont.toml parameters.toml support/fairify.js SCRIPTS = $(SUPPORT_FILES) $(GLYPH_SEGMENTS)
SCRIPTS = $(SUPPORT_FILES) buildglyphs.js SCRIPTS_FROM_PTL = $(SUPPORT_FILES_FROM_PTL) $(GLYPH_SEGMENTS)
SCRIPTS_FROM_aki = $(SUPPORT_FILES_FROM_PTL) buildglyphs.js
buildglyphs.js : buildglyphs.ptl $(GLYPH_SEGMENTS)
$(PATELC) --strict $< -o $@
$(SUPPORT_FILES_FROM_PTL) : %.js : %.ptl meta/macros.ptl $(SUPPORT_FILES_FROM_PTL) : %.js : %.ptl meta/macros.ptl
$(PATELC) --optimize --strict $< -o $@ $(PATELC) --optimize --strict $< -o $@
$(GLYPH_SEGMENTS) : %.js : %.ptl meta/macros.ptl $(subst .js,.ptl,$(SUPPORT_FILES_FROM_PTL)) $(SUPPORT_FILES_JS)
$(PATELC) --optimize --strict $< -o $@
cleanscripts : cleanscripts :
-@rm $(SCRIPTS_FROM_aki) -@rm $(SCRIPTS_FROM_PTL)
scripts : $(SCRIPTS) scripts : $(SCRIPTS)

View File

@ -148,7 +148,7 @@ define-macro glyph-module-entry : syntax-rules
for [local j 0] (j < opts.length) [inc j] : if optionalImports.(opts.(j)) : optionalImportStatements.push optionalImports.(opts.(j)) for [local j 0] (j < opts.length) [inc j] : if optionalImports.(opts.(j)) : optionalImportStatements.push optionalImports.(opts.(j))
dirty `[begin \\ dirty `[begin \\
define $capture this define $capture this
define [object metrics $NamedParameterPair$ $donothing$ para recursive recursiveCodes variantSelector font glyphs glyphList unicodeGlyphs create-glyph $save$ spirofns markset MARK BASE AS_BASE ALSO_METRICS pickHash dependencyProfile getDependencyProfile buildFont newtemp tagged] $capture define [object metrics $NamedParameterPair$ $donothing$ para recursive recursiveCodes variantSelector font glyphs glyphList unicodeGlyphs create-glyph $save$ spirofns markset MARK BASE AS_BASE ALSO_METRICS pickHash dependencyProfile getDependencyProfile buildFont newtemp tagged TempFont includeGlyphPart compsiteMarkSet] $capture
define [object define [object
UPM WIDTH SB CAP XH DESCENDER CONTRAST UPM WIDTH SB CAP XH DESCENDER CONTRAST
parenMid parenTop parenBot operTop operBot operMid Italify Upright Scale Translate Rotate globalTransform parenMid parenTop parenBot operTop operBot operMid Italify Upright Scale Translate Rotate globalTransform