The preparation for ULTRA THIN variants is near there.

This commit is contained in:
be5invis 2015-12-14 07:19:54 +08:00
parent 1449401097
commit ac6d52bea4
9 changed files with 42 additions and 36 deletions

View File

@ -319,6 +319,7 @@ export as build : define [buildFont para recursive recursiveCodes] : begin
`[@actions] : begin
local glyphObject [new Glyph ('.temp-' + [set nTemp (nTemp + 1)])]
glyphObject.set-width WIDTH
glyphObject.gizmo = globalTransform
actions.call glyphObject
return glyphObject
@ -334,10 +335,14 @@ export as build : define [buildFont para recursive recursiveCodes] : begin
### Metadata
# Font names
set font.name.fontFamily para.family
set font.name.fontSubFamily para.style
set font.name.preferredFamily para.family
set font.name.preferredSubFamily para.style
if (para.style == 'Regular' || para.style == 'Bold' || para.style == 'Italic' || para.style == "Bold Italic") : then
set font.name.fontFamily para.family
set font.name.fontSubFamily para.style
: else
set font.name.fontFamily : para.family + ' ' + [para.style.replace [regex ' Italic$'] '']
set font.name.fontSubFamily : if [[regex ' Italic$'].test para.style] 'Italic' 'Regular'
set font.name.uniqueSubFamily "\(para.family) \(para.style) \(para.version) (\(para.codename))"
set font.name.version para.version
set font.name.fullName : if (para.style != 'Regular') (para.family + ' ' + para.style) para.family

View File

@ -507,7 +507,8 @@ symbol-block 'A'
include : VShape CAP
include : FlipAround MIDDLE (CAP / 2)
include : HBarTop (SB + STROKE) (RIGHTSB - STROKE) (XH / 2)
local p : linreg 18 0.075 108 0.075 STROKE
include : HBarTop [mix SB RIGHTSB p] [mix RIGHTSB SB p] (XH / 2)
alias 'Alpha' 0x391 'A'
alias 'cyrA' 0x410 'A'
turned nothing 0x2C6F 'A' MIDDLE (CAP / 2)

View File

@ -1374,15 +1374,16 @@ symbol-block 'Digraphs'
create-glyph 'ou' : glyph-construction
assign-unicode 0x223
include bMarks
include : OShape XH 0 SB RIGHTSB
local bar : linreg 18 (XH * 0.9) 108 XH STROKE
include : OShape bar 0 SB RIGHTSB
include : dispiro
widths.lhs
flat SB CAP [heading DOWNWARD]
curl SB (XH - O - STROKE + SMOOTHB)
curl SB (bar - O - STROKE + SMOOTHB)
arcvh
g4 (MIDDLE + CORRECTION_OMIDS) (XH - O - STROKE + (STROKE * (1 - CTHIN))) [widths.lhs (STROKE * CTHIN)]
g4 (MIDDLE + CORRECTION_OMIDS) (bar - O - STROKE + (STROKE * (1 - CTHIN))) [widths.lhs (STROKE * CTHIN)]
archv
flat RIGHTSB (XH - O - STROKE + SMOOTHA) [widths.lhs]
flat RIGHTSB (bar - O - STROKE + SMOOTHA) [widths.lhs]
curl RIGHTSB CAP [heading UPWARD]
create-glyph 'IJ' : glyph-construction

View File

@ -107,16 +107,16 @@ symbol-block 'Above marks'
local top : ttop + (markFine * 2)
local bot : tbot - (markFine * 2)
local tildeWave [linreg 40 1.52 52 1.33 markStress]
local tildeWave [linreg 16 2.5 90 1.33 (markHalfStroke * 2)]
local tildeWaveX 0.52
local tildeWaveEnd 0
local tildeWaveEnd [linreg 16 (-0.01) 90 0 (markHalfStroke * 2)]
local s : new Stroke
local outlines : s.set-transform globalTransform
:.start-from leftEnd [mix tbot ttop tildeWaveEnd]
:.set-width markHalfStroke markHalfStroke
:.cubic-to [mix leftEnd rightEnd tildeWaveX] [mix bot top tildeWave] [mix leftEnd rightEnd (1 - tildeWaveX)] [mix bot top (1 - tildeWave)] rightEnd [mix tbot ttop (1 - tildeWaveEnd)]
:.set-samples 11
:.set-samples 22
:.to-outline
include outlines
@ -245,9 +245,8 @@ symbol-block 'Above marks'
local radius : adviceBlackness 6
include : Ring aboveMarkTop (aboveMarkTop - radius * 2) (markMiddle - radius) (markMiddle + radius)
include : dispiro
widths.rhs (markFine * 1.75)
flat (markMiddle + radius) (aboveMarkTop - radius)
curl (markMiddle + radius) (aboveMarkTop - radius - 1)
widths.rhs : Math.min radius (markFine * 1.75)
straight.down.start (markMiddle + radius) (aboveMarkTop - radius)
quadcontrols 0 0.6
g4 [mix markMiddle (markMiddle - radius) 0.2] (aboveMarkBot - radius)
apply-transform : Upright
@ -271,9 +270,8 @@ symbol-block 'Above marks'
local radius : adviceBlackness 6
include : Ring aboveMarkTop (aboveMarkTop - radius * 2) (markMiddle - radius) (markMiddle + radius)
include : dispiro
widths.lhs (markFine * 1.75)
flat (markMiddle - radius) (aboveMarkTop - radius)
curl (markMiddle - radius) (aboveMarkTop - radius - 1)
widths.lhs : Math.min radius (markFine * 1.75)
straight.down.start (markMiddle - radius) (aboveMarkTop - radius)
quadcontrols 0 0.6
g4 [mix markMiddle (markMiddle + radius) 0.2] (aboveMarkBot - radius)
apply-transform : Upright
@ -317,9 +315,9 @@ symbol-block 'Above marks'
assign-unicode 0x310
local fine : adviceBlackness 6.5
local yc : XH + ACCENT
local radius : fine * 1.35
local radius : Math.max (markExtend - DOTRADIUS) (fine * 1.35)
include : dispiro
widths.rhs (fine * 1.25)
widths.rhs : Math.min (markHalfStroke * 2) (fine * 1.25)
g4.down.start (markMiddle - radius) yc [heading DOWNWARD]
arcvh
g4.right.mid markMiddle (yc - radius)
@ -873,13 +871,14 @@ symbol-block 'Greek Polytonic Marks'
GreekLRDoubleMark 'dasiavaria' 0x1FDD glyphs.revCommaAbove glyphs.variaAbove
GreekLRDoubleMark 'dasiaoxia' 0x1FDE glyphs.revCommaAbove glyphs.oxiaAbove
local yc : aboveMarkTop - [adviceBlackness 6] + DOTRADIUS * 0.3
create-glyph 'psiliperispomeni' : glyph-construction
set-width 0
include glyphs.commaAbove
local yc : XH + ACCENT + DOTRADIUS * 0.3 - O
local radius : [adviceBlackness 6] * 1.5
local radius : Math.max (markExtend - [adviceBlackness 6]) ([adviceBlackness 6] * 1.5)
include : dispiro
widths.lhs : Math.min STROKE ([adviceBlackness 6.5] * 1.25)
widths.lhs : Math.min (markHalfStroke * 2) ([adviceBlackness 6.5] * 1.25)
g4.up.start (markMiddle - radius) yc [heading UPWARD]
arcvh
g4.right.mid markMiddle (yc + radius)
@ -895,10 +894,9 @@ symbol-block 'Greek Polytonic Marks'
create-glyph 'dasiaperispomeni' : glyph-construction
set-width 0
include glyphs.revCommaAbove
local yc : XH + ACCENT + DOTRADIUS * 0.3 - O
local radius : [adviceBlackness 6] * 1.5
local radius : Math.max (markExtend - [adviceBlackness 6]) ([adviceBlackness 6] * 1.5)
include : dispiro
widths.lhs : Math.min STROKE ([adviceBlackness 6.5] * 1.25)
widths.lhs : Math.min (markHalfStroke * 2) ([adviceBlackness 6.5] * 1.25)
g4.up.start (markMiddle - radius) yc [heading UPWARD]
arcvh
g4.right.mid markMiddle (yc + radius)

View File

@ -239,7 +239,6 @@ symbol-block 'Block Shapes'
line-to [mix 0 WIDTH ((j + 1) / segx)] [mix bottom top (k / segy)]
include g
if (FULLWIDTH > WIDTH) : begin
local cc this.contours
apply-transform : Translate (FULLWIDTH - WIDTH) 0
include g
create-glyph 'lightshade' : glyph-construction

View File

@ -96,7 +96,7 @@ symbol-block 'Letterlike Symbols'
assign-unicode 0x2113
include bMarks
local fine : adviceBlackness 3.5
local radius : Math.max fine (WIDTH * 0.1)
local radius : Math.max fine (WIDTH * 0.15)
local middle : MIDDLE - fine / 2
local left : middle - radius * 1.25
local right : middle + radius * 1.5

View File

@ -142,23 +142,25 @@ symbol-block 'Small Punctuations'
assign-unicode ','
include glyphs.period
local sw : PERIODSIZE * 0.5
local sw : Math.min STROKE (PERIODSIZE * 0.5)
include : dispiro
widths.rhs sw
g4.down.start (MIDDLE + PERIODRADIUS - O) [mix O (PERIODSIZE - O) 0.5]
quadcontrols 0 0.5
g4 (MIDDLE + PERIODRADIUS - O) [mix O (PERIODSIZE - O) 0.5]
g4 (MIDDLE + PERIODRADIUS - O + 0.1 * globalTransform.yx) ([mix O (PERIODSIZE - O) 0.5] - 0.1)
quadcontrols (0.9 * globalTransform.yx * DESCENDER / (1.7 * PERIODRADIUS - O)) 0.5 12
g4 [mix MIDDLE (MIDDLE - PERIODRADIUS) 0.3] DESCENDER
create-glyph 'invertComma' : glyph-construction
set-width WIDTH
include glyphs.period
local sw : PERIODSIZE * 0.5
local sw : Math.min STROKE (PERIODSIZE * 0.5)
include : dispiro
widths.lhs sw
g4.down.start (MIDDLE - PERIODRADIUS + O) [mix O (PERIODSIZE - O) 0.5]
quadcontrols 0 0.5
g4 [mix MIDDLE (MIDDLE + PERIODRADIUS) 0.3] DESCENDER
g4 (MIDDLE - PERIODRADIUS + O) [mix O (PERIODSIZE - O) 0.5]
g4 (MIDDLE - PERIODRADIUS + O + 0.1 * globalTransform.yx) ([mix O (PERIODSIZE - O) 0.5] - 0.1)
quadcontrols (-0.3 * globalTransform.yx * DESCENDER / ((1.3 + globalTransform.yx * 2) * PERIODRADIUS - O)) 0.5 12
g4 [mix MIDDLE (MIDDLE + PERIODRADIUS) (0.3 + globalTransform.yx * 2)] DESCENDER
create-glyph 'colon' : glyph-construction
set-width WIDTH

View File

@ -33,8 +33,8 @@ SVG0 = $(subst .ttf,.svg,$(subst $(OBJDIR)/,$(OBJDIR)/.pass0-,$(TARGETS)))
PASS0 = $(subst $(OBJDIR)/,$(OBJDIR)/.pass0-,$(TARGETS))
ABFEAT = $(subst .ttf,.ab.fea,$(subst $(OBJDIR)/,$(OBJDIR)/.pass0-,$(TARGETS)))
FEATURE = $(subst .ttf,.fea,$(subst $(OBJDIR)/,$(OBJDIR)/.pass0-,$(UPRIGHT)))
FEATITA = $(subst .ttf,.fea,$(subst $(OBJDIR)/,$(OBJDIR)/.pass0-,$(ITALIC)))
FEATURE = $(subst .ttf,.fea,$(subst $(OBJDIR)/,$(OBJDIR)/.pass0-,$(UPRIGHT) $(EXTUPRG)))
FEATITA = $(subst .ttf,.fea,$(subst $(OBJDIR)/,$(OBJDIR)/.pass0-,$(ITALIC) $(EXTITAL)))
PASS1 = $(subst $(OBJDIR)/,$(OBJDIR)/.pass0-,$(TARGETS))
PASS1 = $(subst $(OBJDIR)/,$(OBJDIR)/.pass1-,$(TARGETS))
PASS2 = $(subst $(OBJDIR)/,$(OBJDIR)/.pass2-,$(TARGETS))

View File

@ -78,7 +78,7 @@ family = 'CC'
# Weights
[w-hair]
weight = 100
style = 'hair'
style = 'Ultralight'
stroke = 18
sb = 80