From ac6d52bea46c70baecc1db4a040688ca022eaba9 Mon Sep 17 00:00:00 2001 From: be5invis Date: Mon, 14 Dec 2015 07:19:54 +0800 Subject: [PATCH] The preparation for ULTRA THIN variants is near there. --- buildglyphs.aki | 9 ++++++-- glyphs/letters-unified-basic.aki | 3 ++- glyphs/letters-unified-extended.aki | 9 ++++---- glyphs/overmarks.aki | 32 ++++++++++++++--------------- glyphs/symbol-geometric.aki | 1 - glyphs/symbol-letter.aki | 2 +- glyphs/symbol-punctuation.aki | 16 ++++++++------- onegroup.mk | 4 ++-- parameters.toml | 2 +- 9 files changed, 42 insertions(+), 36 deletions(-) diff --git a/buildglyphs.aki b/buildglyphs.aki index d65e31e..28a0714 100644 --- a/buildglyphs.aki +++ b/buildglyphs.aki @@ -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 diff --git a/glyphs/letters-unified-basic.aki b/glyphs/letters-unified-basic.aki index 8dd74d6..ba21ccb 100644 --- a/glyphs/letters-unified-basic.aki +++ b/glyphs/letters-unified-basic.aki @@ -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) diff --git a/glyphs/letters-unified-extended.aki b/glyphs/letters-unified-extended.aki index 871ca1c..0f6d5f0 100644 --- a/glyphs/letters-unified-extended.aki +++ b/glyphs/letters-unified-extended.aki @@ -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 diff --git a/glyphs/overmarks.aki b/glyphs/overmarks.aki index ce20b37..9e7d7bb 100644 --- a/glyphs/overmarks.aki +++ b/glyphs/overmarks.aki @@ -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) diff --git a/glyphs/symbol-geometric.aki b/glyphs/symbol-geometric.aki index 502d59a..8523afa 100644 --- a/glyphs/symbol-geometric.aki +++ b/glyphs/symbol-geometric.aki @@ -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 diff --git a/glyphs/symbol-letter.aki b/glyphs/symbol-letter.aki index 8f38bb3..22bc4f1 100644 --- a/glyphs/symbol-letter.aki +++ b/glyphs/symbol-letter.aki @@ -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 diff --git a/glyphs/symbol-punctuation.aki b/glyphs/symbol-punctuation.aki index 35bafc3..7b4c893 100644 --- a/glyphs/symbol-punctuation.aki +++ b/glyphs/symbol-punctuation.aki @@ -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 diff --git a/onegroup.mk b/onegroup.mk index 26a7913..6f5020c 100644 --- a/onegroup.mk +++ b/onegroup.mk @@ -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)) diff --git a/parameters.toml b/parameters.toml index cc78216..2ad5a3c 100644 --- a/parameters.toml +++ b/parameters.toml @@ -78,7 +78,7 @@ family = 'CC' # Weights [w-hair] weight = 100 -style = 'hair' +style = 'Ultralight' stroke = 18 sb = 80