Added "hair", "light" and "thin" weights.
This commit is contained in:
parent
ac6d52bea4
commit
b26ba95258
|
@ -335,6 +335,8 @@ export as build : define [buildFont para recursive recursiveCodes] : begin
|
||||||
|
|
||||||
### Metadata
|
### Metadata
|
||||||
# Font names
|
# Font names
|
||||||
|
set para.family [para.family.trim]
|
||||||
|
set para.style : [para.style.trim] || "Regular"
|
||||||
set font.name.preferredFamily para.family
|
set font.name.preferredFamily para.family
|
||||||
set font.name.preferredSubFamily para.style
|
set font.name.preferredSubFamily para.style
|
||||||
if (para.style == 'Regular' || para.style == 'Bold' || para.style == 'Italic' || para.style == "Bold Italic") : then
|
if (para.style == 'Regular' || para.style == 'Bold' || para.style == 'Italic' || para.style == "Bold Italic") : then
|
||||||
|
|
|
@ -399,10 +399,10 @@ define [VBar x ydown yup _fine] : glyph-construction
|
||||||
define [VBarLeft x yd yu _fine] : VBar (x + [fallback _fine STROKE] * 0.5 * CORRECTION_HX) yd yu _fine
|
define [VBarLeft x yd yu _fine] : VBar (x + [fallback _fine STROKE] * 0.5 * CORRECTION_HX) yd yu _fine
|
||||||
define [VBarRight x yd yu _fine] : VBar (x - [fallback _fine STROKE] * 0.5 * CORRECTION_HX) yd yu _fine
|
define [VBarRight x yd yu _fine] : VBar (x - [fallback _fine STROKE] * 0.5 * CORRECTION_HX) yd yu _fine
|
||||||
|
|
||||||
define [VerticalHook x y extend depth fine] : glyph-construction
|
define [VerticalHook x y extend depth fine strg] : glyph-construction
|
||||||
include : dispiro
|
include : dispiro
|
||||||
widths.center [fallback fine STROKE]
|
widths.center [fallback fine STROKE]
|
||||||
flat x y [heading [if (depth > 0) DOWNWARD UPWARD]]
|
flat x (y + [fallback strg 0]) [heading [if (depth > 0) DOWNWARD UPWARD]]
|
||||||
curl x (y - [if (depth > 0) 0.01 (-0.01)]) [heading [if (depth > 0) DOWNWARD UPWARD]]
|
curl x (y - [if (depth > 0) 0.01 (-0.01)]) [heading [if (depth > 0) DOWNWARD UPWARD]]
|
||||||
flat (x + extend - [if (extend > 0) 0.01 (-0.01)]) (y - depth)
|
flat (x + extend - [if (extend > 0) 0.01 (-0.01)]) (y - depth)
|
||||||
curl (x + extend) (y - depth)
|
curl (x + extend) (y - depth)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
define [CyrDescender x shift] : glyph-construction
|
define [CyrDescender x shift] : glyph-construction
|
||||||
local descenderOverflow : if SLAB SIDEJUT ((RIGHTSB - SB) * [fallback shift 0.1])
|
local descenderOverflow : if SLAB SIDEJUT ((RIGHTSB - SB) * [fallback shift 0.1])
|
||||||
include : VBarRight (x + descenderOverflow + 0.25 * STROKE) (HALFSTROKE - LONGJUT) STROKE
|
include : VBarRight (x + descenderOverflow + 0.25 * STROKE) (HALFSTROKE - LONGJUT) STROKE
|
||||||
if (descenderOverflow > HALFSTROKE) : include : HBarTop (x - HALFSTROKE * CORRECTION_HX) (x + descenderOverflow) STROKE
|
if (descenderOverflow > STROKE * 0.75) : include : HBarTop (x - HALFSTROKE * CORRECTION_HX) (x + descenderOverflow) STROKE
|
||||||
|
|
||||||
###########################################################################################
|
###########################################################################################
|
||||||
# UNIFIED LETTERFORMS : LATIN ORIGINALS
|
# UNIFIED LETTERFORMS : LATIN ORIGINALS
|
||||||
|
@ -1146,9 +1146,9 @@ symbol-block 'd'
|
||||||
create-glyph 'dcurlytail' : glyph-construction
|
create-glyph 'dcurlytail' : glyph-construction
|
||||||
assign-unicode 0x221
|
assign-unicode 0x221
|
||||||
local fine : adviceBlackness 4
|
local fine : adviceBlackness 4
|
||||||
local rinner : clamp (WIDTH * 0.05) (XH * 0.05) (fine * 0.35)
|
local rinner : clamp (WIDTH * 0.065) (XH * 0.05) (fine * 0.35)
|
||||||
local wide STROKE
|
local wide STROKE
|
||||||
local m1 : RIGHTSB - rinner * 2
|
local m1 : Math.min RIGHTSB (WIDTH - rinner * 2 - fine - OX)
|
||||||
local x2 : mix SB m1 0.5
|
local x2 : mix SB m1 0.5
|
||||||
local y2 : 0 - fine - rinner * 1.25
|
local y2 : 0 - fine - rinner * 1.25
|
||||||
include eMarks
|
include eMarks
|
||||||
|
@ -1597,13 +1597,13 @@ symbol-block 'G'
|
||||||
assign-unicode 0x193
|
assign-unicode 0x193
|
||||||
include glyphs.G AS_BASE
|
include glyphs.G AS_BASE
|
||||||
include : VBarRight (RIGHTSB - OXHOOK) (CAP - HOOK) CAP
|
include : VBarRight (RIGHTSB - OXHOOK) (CAP - HOOK) CAP
|
||||||
include : VerticalHook (RIGHTSB - HALFSTROKE * CORRECTION_HX - OXHOOK) CAP HOOKX (-HOOK)
|
include : VerticalHook (RIGHTSB - HALFSTROKE * CORRECTION_HX - OXHOOK) CAP HOOKX (-HOOK) nothing O
|
||||||
|
|
||||||
create-glyph 'smcpGhooktop' : glyph-construction
|
create-glyph 'smcpGhooktop' : glyph-construction
|
||||||
assign-unicode 0x29B
|
assign-unicode 0x29B
|
||||||
include glyphs.smcpG AS_BASE
|
include glyphs.smcpG AS_BASE
|
||||||
include : VBarRight (RIGHTSB - OXHOOK) (XH - HOOK) XH
|
include : VBarRight (RIGHTSB - OXHOOK) (XH - HOOK) XH
|
||||||
include : VerticalHook (RIGHTSB - HALFSTROKE * CORRECTION_HX - OXHOOK) XH HOOKX (-HOOK)
|
include : VerticalHook (RIGHTSB - HALFSTROKE * CORRECTION_HX - OXHOOK) XH HOOKX (-HOOK) nothing O
|
||||||
|
|
||||||
create-glyph 'Gbar' : glyph-construction
|
create-glyph 'Gbar' : glyph-construction
|
||||||
assign-unicode 0x1E4
|
assign-unicode 0x1E4
|
||||||
|
@ -1666,7 +1666,7 @@ symbol-block 'g'
|
||||||
assign-unicode 0x260
|
assign-unicode 0x260
|
||||||
include glyphs.scriptg AS_BASE
|
include glyphs.scriptg AS_BASE
|
||||||
eject-contour 'serifRT'
|
eject-contour 'serifRT'
|
||||||
include : VerticalHook (RIGHTSB - HALFSTROKE * CORRECTION_HX) XH HOOKX (-HOOK)
|
include : VerticalHook (RIGHTSB - HALFSTROKE * CORRECTION_HX) XH HOOKX (-HOOK) nothing O
|
||||||
|
|
||||||
create-glyph 'gbar' : glyph-construction
|
create-glyph 'gbar' : glyph-construction
|
||||||
assign-unicode 0x1E5
|
assign-unicode 0x1E5
|
||||||
|
@ -1716,13 +1716,13 @@ symbol-block 'O'
|
||||||
create-glyph 'Obar' : glyph-construction
|
create-glyph 'Obar' : glyph-construction
|
||||||
assign-unicode 0x19F
|
assign-unicode 0x19F
|
||||||
include glyphs.O AS_BASE
|
include glyphs.O AS_BASE
|
||||||
include : HOverlayBar (SB - O) (RIGHTSB + O) (CAP * 0.5)
|
include : HOverlayBar (SB + OX + 1) (RIGHTSB - OX - 1) (CAP * 0.5)
|
||||||
alias 'cyrOe' 0x4E8 'Obar'
|
alias 'cyrOe' 0x4E8 'Obar'
|
||||||
|
|
||||||
create-glyph 'obar' : glyph-construction
|
create-glyph 'obar' : glyph-construction
|
||||||
assign-unicode 0x275
|
assign-unicode 0x275
|
||||||
include glyphs.o AS_BASE
|
include glyphs.o AS_BASE
|
||||||
include : HOverlayBar (SB - O) (RIGHTSB + O) (XH * 0.5)
|
include : HOverlayBar (SB + OX + 1) (RIGHTSB - OX - 1) (XH * 0.5)
|
||||||
alias 'cyroe' 0x4E9 'obar'
|
alias 'cyroe' 0x4E9 'obar'
|
||||||
|
|
||||||
create-glyph 'bulleye' : glyph-construction
|
create-glyph 'bulleye' : glyph-construction
|
||||||
|
@ -1913,9 +1913,9 @@ symbol-block 'n'
|
||||||
create-glyph 'ncurlytail' : glyph-construction
|
create-glyph 'ncurlytail' : glyph-construction
|
||||||
assign-unicode 0x235
|
assign-unicode 0x235
|
||||||
local fine : adviceBlackness 4
|
local fine : adviceBlackness 4
|
||||||
local rinner : clamp (WIDTH * 0.05) (XH * 0.05) (fine * 0.35)
|
local rinner : clamp (WIDTH * 0.065) (XH * 0.05) (fine * 0.35)
|
||||||
local wide STROKE
|
local wide STROKE
|
||||||
local m1 : RIGHTSB - rinner * 2
|
local m1 : Math.min RIGHTSB (WIDTH - rinner * 2 - fine - OX)
|
||||||
local x2 : mix SB m1 0.5
|
local x2 : mix SB m1 0.5
|
||||||
local y2 : -fine
|
local y2 : -fine
|
||||||
include eMarks
|
include eMarks
|
||||||
|
@ -2472,7 +2472,7 @@ symbol-block 'E'
|
||||||
### e
|
### e
|
||||||
define {SmallEShape} : symbol-block 'e'
|
define {SmallEShape} : symbol-block 'e'
|
||||||
define [SmallEShape top stroke barpos curly] : glyph-construction
|
define [SmallEShape top stroke barpos curly] : glyph-construction
|
||||||
local barbottom (top * [fallback barpos EBARPOS])
|
local barbottom (top * [fallback barpos EBARPOS] - HALFSTROKE)
|
||||||
local hookx (RIGHTSB - OXHOOK + TAILADJX * globalTransform.yx)
|
local hookx (RIGHTSB - OXHOOK + TAILADJX * globalTransform.yx)
|
||||||
local hookmiddle : [mix (SB + O) hookx 0.55] + CORRECTION_OMIDS
|
local hookmiddle : [mix (SB + O) hookx 0.55] + CORRECTION_OMIDS
|
||||||
|
|
||||||
|
@ -2487,7 +2487,7 @@ define {SmallEShape} : symbol-block 'e'
|
||||||
[if (top <= XH) curl.ai curl] (SB + OX) (0 + SMALLSMOOTHB)
|
[if (top <= XH) curl.ai curl] (SB + OX) (0 + SMALLSMOOTHB)
|
||||||
hookend O nothing stroke
|
hookend O nothing stroke
|
||||||
g4 (RIGHTSB - OX * 0.5) AHOOK
|
g4 (RIGHTSB - OX * 0.5) AHOOK
|
||||||
include : HBarBottom (SB + (stroke / 2)) (RIGHTSB - (stroke / 2)) barbottom stroke
|
include : HBarBottom (SB + (stroke / 2) + OX) (RIGHTSB - (stroke / 2) - OX) barbottom stroke
|
||||||
|
|
||||||
create-glyph 'e' : glyph-construction
|
create-glyph 'e' : glyph-construction
|
||||||
set-width WIDTH
|
set-width WIDTH
|
||||||
|
@ -2509,7 +2509,7 @@ define {SmallEShape} : symbol-block 'e'
|
||||||
alias 'cyrschwa' 0x4D9 'schwa'
|
alias 'cyrschwa' 0x4D9 'schwa'
|
||||||
|
|
||||||
define [RevSmallEShape top stroke barpos] : glyph-construction
|
define [RevSmallEShape top stroke barpos] : glyph-construction
|
||||||
local barbottom (top * [fallback barpos EBARPOS])
|
local barbottom (top * [fallback barpos EBARPOS] - HALFSTROKE)
|
||||||
local hookx SB
|
local hookx SB
|
||||||
local hookmiddle : [mix (RIGHTSB - O) hookx 0.55] + CORRECTION_OMIDS
|
local hookmiddle : [mix (RIGHTSB - O) hookx 0.55] + CORRECTION_OMIDS
|
||||||
|
|
||||||
|
@ -2887,7 +2887,7 @@ symbol-block 'Z'
|
||||||
include eMarks
|
include eMarks
|
||||||
|
|
||||||
local fine : adviceBlackness 4
|
local fine : adviceBlackness 4
|
||||||
local rinner : Math.max (XH * 0.035) (fine * 0.3)
|
local rinner : Math.max (XH * 0.04) (fine * 0.3)
|
||||||
local x2 : mix (SB + STROKE) RIGHTSB 0.3
|
local x2 : mix (SB + STROKE) RIGHTSB 0.3
|
||||||
local x1 : mix x2 (RIGHTSB - fine - rinner * 1.5) 0.45
|
local x1 : mix x2 (RIGHTSB - fine - rinner * 1.5) 0.45
|
||||||
local y2 : -XH * 0.2
|
local y2 : -XH * 0.2
|
||||||
|
|
|
@ -284,12 +284,12 @@ symbol-block 'zeta and xi'
|
||||||
include : dispiro
|
include : dispiro
|
||||||
widths.rhs
|
widths.rhs
|
||||||
g4 (RIGHTSB + O) (CAP - STROKE)
|
g4 (RIGHTSB + O) (CAP - STROKE)
|
||||||
bezcontrols 0.7 0.37 1 0.62
|
bezcontrols 0.7 0.35 1 0.64
|
||||||
g4 (SB + STROKE * CORRECTION_HX) [mix 0 CAP 0.27]
|
g4.down.mid (SB + STROKE * CORRECTION_HX) [mix 0 CAP 0.27]
|
||||||
alsothru 0.5 0.8
|
arcvh
|
||||||
g4 [mix SB RIGHTSB 0.5] STROKE
|
g4 [mix SB RIGHTSB 0.55] STROKE
|
||||||
archv
|
archv
|
||||||
g4.down.mid RIGHTSB [mix DESCENDER STROKE 0.5] [heading DOWNWARD]
|
g4.down.mid RIGHTSB [mix DESCENDER STROKE 0.525] [heading DOWNWARD]
|
||||||
arcvh
|
arcvh
|
||||||
flat (RIGHTSB - (STROKE - [mix DESCENDER STROKE 0.5]) * 1.1) DESCENDER
|
flat (RIGHTSB - (STROKE - [mix DESCENDER STROKE 0.5]) * 1.1) DESCENDER
|
||||||
curl [mix SB RIGHTSB 0.5] DESCENDER [heading LEFTWARD]
|
curl [mix SB RIGHTSB 0.5] DESCENDER [heading LEFTWARD]
|
||||||
|
|
|
@ -117,6 +117,6 @@ symbol-block 'Letterlike Symbols'
|
||||||
|
|
||||||
create-glyph 'estimated' : glyph-construction
|
create-glyph 'estimated' : glyph-construction
|
||||||
assign-unicode 0x212E
|
assign-unicode 0x212E
|
||||||
include : SmallEShape CAP [adviceBlackness 4] (0.5 - [adviceBlackness 4] / CAP / 2)
|
include : SmallEShape CAP [adviceBlackness 4] 0.5
|
||||||
|
|
||||||
turned 'turniota' 0x2129 'iota' MIDDLE (XH / 2)
|
turned 'turniota' 0x2129 'iota' MIDDLE (XH / 2)
|
16
onegroup.mk
16
onegroup.mk
|
@ -19,10 +19,10 @@ endif
|
||||||
NODE_FDT = node --expose-gc
|
NODE_FDT = node --expose-gc
|
||||||
NODE = node
|
NODE = node
|
||||||
|
|
||||||
UPRIGHT = $(OBJDIR)/$(PREFIX)-regular.ttf $(OBJDIR)/$(PREFIX)-bold.ttf
|
UPRIGHT = $(OBJDIR)/$(PREFIX)-hair.ttf $(OBJDIR)/$(PREFIX)-thin.ttf $(OBJDIR)/$(PREFIX)-light.ttf $(OBJDIR)/$(PREFIX)-regular.ttf $(OBJDIR)/$(PREFIX)-bold.ttf
|
||||||
ITALIC = $(OBJDIR)/$(PREFIX)-italic.ttf $(OBJDIR)/$(PREFIX)-bolditalic.ttf
|
ITALIC = $(OBJDIR)/$(PREFIX)-hairitalic.ttf $(OBJDIR)/$(PREFIX)-thinitalic.ttf $(OBJDIR)/$(PREFIX)-lightitalic.ttf $(OBJDIR)/$(PREFIX)-italic.ttf $(OBJDIR)/$(PREFIX)-bolditalic.ttf
|
||||||
EXTUPRG = $(OBJDIR)/$(PREFIX)-hair.ttf
|
EXTUPRG =
|
||||||
EXTITAL = $(OBJDIR)/$(PREFIX)-hairitalic.ttf
|
EXTITAL =
|
||||||
OUTPUTS = $(UPRIGHT) $(ITALIC)
|
OUTPUTS = $(UPRIGHT) $(ITALIC)
|
||||||
TARGETS = $(UPRIGHT) $(ITALIC) $(EXTUPRG) $(EXTITAL)
|
TARGETS = $(UPRIGHT) $(ITALIC) $(EXTUPRG) $(EXTITAL)
|
||||||
MAPS = $(subst .ttf,.charmap,$(TARGETS))
|
MAPS = $(subst .ttf,.charmap,$(TARGETS))
|
||||||
|
@ -55,6 +55,14 @@ $(OBJDIR)/.pass0-$(PREFIX)-hair.fdt : $(SCRIPTS) | $(OBJDIR)
|
||||||
$(NODE_FDT) generate -o $@ iosevka $(STYLE_COMMON) w-hair s-upright $(STYLE_UPRIGHT) $(STYLE_SUFFIX)
|
$(NODE_FDT) generate -o $@ iosevka $(STYLE_COMMON) w-hair s-upright $(STYLE_UPRIGHT) $(STYLE_SUFFIX)
|
||||||
$(OBJDIR)/.pass0-$(PREFIX)-hairitalic.fdt : $(SCRIPTS) | $(OBJDIR)
|
$(OBJDIR)/.pass0-$(PREFIX)-hairitalic.fdt : $(SCRIPTS) | $(OBJDIR)
|
||||||
$(NODE_FDT) generate -o $@ iosevka $(STYLE_COMMON) w-hair s-italic $(STYLE_UPRIGHT) $(STYLE_SUFFIX)
|
$(NODE_FDT) generate -o $@ iosevka $(STYLE_COMMON) w-hair s-italic $(STYLE_UPRIGHT) $(STYLE_SUFFIX)
|
||||||
|
$(OBJDIR)/.pass0-$(PREFIX)-thin.fdt : $(SCRIPTS) | $(OBJDIR)
|
||||||
|
$(NODE_FDT) generate -o $@ iosevka $(STYLE_COMMON) w-thin s-upright $(STYLE_UPRIGHT) $(STYLE_SUFFIX)
|
||||||
|
$(OBJDIR)/.pass0-$(PREFIX)-thinitalic.fdt : $(SCRIPTS) | $(OBJDIR)
|
||||||
|
$(NODE_FDT) generate -o $@ iosevka $(STYLE_COMMON) w-thin s-italic $(STYLE_UPRIGHT) $(STYLE_SUFFIX)
|
||||||
|
$(OBJDIR)/.pass0-$(PREFIX)-light.fdt : $(SCRIPTS) | $(OBJDIR)
|
||||||
|
$(NODE_FDT) generate -o $@ iosevka $(STYLE_COMMON) w-light s-upright $(STYLE_UPRIGHT) $(STYLE_SUFFIX)
|
||||||
|
$(OBJDIR)/.pass0-$(PREFIX)-lightitalic.fdt : $(SCRIPTS) | $(OBJDIR)
|
||||||
|
$(NODE_FDT) generate -o $@ iosevka $(STYLE_COMMON) w-light s-italic $(STYLE_UPRIGHT) $(STYLE_SUFFIX)
|
||||||
$(OBJDIR)/.pass0-$(PREFIX)-regular.fdt : $(SCRIPTS) | $(OBJDIR)
|
$(OBJDIR)/.pass0-$(PREFIX)-regular.fdt : $(SCRIPTS) | $(OBJDIR)
|
||||||
$(NODE_FDT) generate -o $@ iosevka $(STYLE_COMMON) w-book s-upright $(STYLE_UPRIGHT) $(STYLE_SUFFIX)
|
$(NODE_FDT) generate -o $@ iosevka $(STYLE_COMMON) w-book s-upright $(STYLE_UPRIGHT) $(STYLE_SUFFIX)
|
||||||
$(OBJDIR)/.pass0-$(PREFIX)-italic.fdt : $(SCRIPTS) | $(OBJDIR)
|
$(OBJDIR)/.pass0-$(PREFIX)-italic.fdt : $(SCRIPTS) | $(OBJDIR)
|
||||||
|
|
|
@ -11,6 +11,5 @@ export : define [build parametersData styles] : begin
|
||||||
#if hive.styleSuffix : set param.style "\(param.style)\(hive.styleSuffix)"
|
#if hive.styleSuffix : set param.style "\(param.style)\(hive.styleSuffix)"
|
||||||
if hive.variantSelector : foreach [k : items-of : Object.keys hive.variantSelector] : begin
|
if hive.variantSelector : foreach [k : items-of : Object.keys hive.variantSelector] : begin
|
||||||
set variantSelector.(k) hive.variantSelector.(k)
|
set variantSelector.(k) hive.variantSelector.(k)
|
||||||
if [not param.style] : set param.style 'Regular'
|
|
||||||
set param.variantSelector variantSelector
|
set param.variantSelector variantSelector
|
||||||
return param
|
return param
|
|
@ -31,7 +31,7 @@ superness = 2.2 # Superness of arcs
|
||||||
|
|
||||||
barpos = 0.52 # Position of the middle bar in most letters, like `E`
|
barpos = 0.52 # Position of the middle bar in most letters, like `E`
|
||||||
overlaypos = 0.52 # Position of the overlay mark
|
overlaypos = 0.52 # Position of the overlay mark
|
||||||
ebarpos = 0.45 # Position of the middle bar in `e`
|
ebarpos = 0.50 # Position of the middle bar in `e`
|
||||||
gbarpos = 0.42
|
gbarpos = 0.42
|
||||||
pbarpos = 0.53
|
pbarpos = 0.53
|
||||||
fivebarpos = 0.63
|
fivebarpos = 0.63
|
||||||
|
@ -90,6 +90,32 @@ cthin = 0.9
|
||||||
cthinb = 0.9
|
cthinb = 0.9
|
||||||
shoulderfine = 0.75
|
shoulderfine = 0.75
|
||||||
|
|
||||||
|
[w-thin]
|
||||||
|
weight = 200
|
||||||
|
style = 'Thin'
|
||||||
|
|
||||||
|
stroke = 36
|
||||||
|
sb = 72
|
||||||
|
dotsize = 70
|
||||||
|
periodsize = 77
|
||||||
|
essx = 1.12
|
||||||
|
|
||||||
|
cthin = 0.75
|
||||||
|
cthinb = 0.75
|
||||||
|
|
||||||
|
[w-light]
|
||||||
|
weight = 300
|
||||||
|
style = 'Light'
|
||||||
|
|
||||||
|
stroke = 54
|
||||||
|
sb = 63
|
||||||
|
dotsize = 90
|
||||||
|
periodsize = 99
|
||||||
|
essx = 1.12
|
||||||
|
|
||||||
|
cthin = 0.75
|
||||||
|
cthinb = 0.75
|
||||||
|
|
||||||
[w-book]
|
[w-book]
|
||||||
isBold = false
|
isBold = false
|
||||||
weight = 400
|
weight = 400
|
||||||
|
@ -115,7 +141,7 @@ jut = 90
|
||||||
vjut = 165
|
vjut = 165
|
||||||
|
|
||||||
barpos = 0.51
|
barpos = 0.51
|
||||||
ebarpos = 0.4
|
#ebarpos = 0.4
|
||||||
fivebarpos = 0.64
|
fivebarpos = 0.64
|
||||||
oxhook = -5
|
oxhook = -5
|
||||||
ahook = 120
|
ahook = 120
|
||||||
|
|
|
@ -30,7 +30,7 @@ font.replaceWithReference(1)
|
||||||
print " Simplify: ", font.fontname
|
print " Simplify: ", font.fontname
|
||||||
font.selection.all()
|
font.selection.all()
|
||||||
font.transform(psMat.scale(5))
|
font.transform(psMat.scale(5))
|
||||||
font.simplify(0.05, ("smoothcurves", "choosehv"), 0.1)
|
font.simplify(0.025, ("smoothcurves", "choosehv"), 0.1)
|
||||||
font.transform(psMat.scale(0.2))
|
font.transform(psMat.scale(0.2))
|
||||||
font.simplify(0.2, ("smoothcurves", "choosehv"), 0.1)
|
font.simplify(0.2, ("smoothcurves", "choosehv"), 0.1)
|
||||||
|
|
||||||
|
|
|
@ -231,9 +231,21 @@ define [Glyph.prototype.cleanup t] : begin
|
||||||
set cleanedContour {}
|
set cleanedContour {}
|
||||||
foreach j [range 0 contour.length] : if ([not contour.(j).cubic] && [not contour.(j).unimportant]) : begin
|
foreach j [range 0 contour.length] : if ([not contour.(j).cubic] && [not contour.(j).unimportant]) : begin
|
||||||
local found false
|
local found false
|
||||||
for [local k : j + 1] ((k < contour.length) && [not contour.(k).cubic] && [closepoint contour.(j) contour.(k) t]) [inc k] : begin
|
for [local k : j + 1] ((k < contour.length) && (
|
||||||
|
[not contour.(k).cubic] && [closepoint contour.(j) contour.(k) t]
|
||||||
|
|| contour.(k).cubic && contour.(k + 1).cubic
|
||||||
|
&& [closepoint contour.(j) contour.(k) t]
|
||||||
|
&& [closepoint contour.(j) contour.(k) t]
|
||||||
|
&& [closepoint contour.(j) contour.(k + 2) t])) [inc k] : begin
|
||||||
set contour.(k).unimportant true
|
set contour.(k).unimportant true
|
||||||
set found true
|
set found true
|
||||||
|
if (contour.(k).cubic && contour.(k + 1).cubic
|
||||||
|
&& [closepoint contour.(j) contour.(k) t]
|
||||||
|
&& [closepoint contour.(j) contour.(k) t]
|
||||||
|
&& [closepoint contour.(j) contour.(k + 2) t]) : begin
|
||||||
|
set contour.(k + 1).unimportant true
|
||||||
|
set contour.(k + 2).unimportant true
|
||||||
|
set k : k + 2
|
||||||
if found : begin
|
if found : begin
|
||||||
set contour.(j).onCurve true
|
set contour.(j).onCurve true
|
||||||
set j (k - 1)
|
set j (k - 1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user