diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..7a49069 --- /dev/null +++ b/ISSUE_TEMPLATE.md @@ -0,0 +1,16 @@ +* Your font version: (Release or git, version) +* Your font variant: +* Your operating system (name and version): +* Your application using Iosevka: (some Java applications may have problem in showing Iosevka properly. It is a bug in Java's GUI components.) + +If you have problem when building Iosevka, please provide these informations: + +* Your Node.js version: +* Your results of `npm list` +* Your _otfcc_ version: +* Your FontForge version: +* Your `parameters.toml`: + +--- + +Describe your problem here. Provide pictures and files if necessary. diff --git a/README.md b/README.md index df018b2..725545f 100644 --- a/README.md +++ b/README.md @@ -38,10 +38,13 @@ Iosevka’s default ligation set is assigned to `calt` feature, though not all o To build Iosevka you should: -1. Ensure that [`node`](http://nodejs.org) (≥ 5.0), [`FontForge`](http://fontforge.org) (with Python scripting support, ≥ Aug. 2015 release), [`ttfautohint`](http://www.freetype.org/ttfautohint/), [`otfcc`](https://github.com/caryll/otfcc) (≥ 0.1.6) and `make` are runnable in your terminal. +1. Ensure that [`node`](http://nodejs.org) (≥ 6.0), [`FontForge`](http://fontforge.org) (with Python scripting support, ≥ Aug. 2015 release), [`ttfautohint`](http://www.freetype.org/ttfautohint/), [`otfcc`](https://github.com/caryll/otfcc) (≥ 0.2.3) and `make` are runnable in your terminal. - Windows users may need to install MinGW and make \*nix utilities accessible (`mkdir.exe`, `cp.exe`, `cat.exe` and `rm.exe`, in particular) from Command Prompt. Utilities provided by [Git for Windows](https://git-for-windows.github.io/) works fine. -2. Install necessary libs by `npm install`. +2. Install necessary libs by `npm install`. If you’ve installed them, upgrade to the latest. 3. `make`. + - Use `make DONTHINT=1` to disable hinting. + - Use `make DONTREF=1` to turn off reference-ify (will increase file size but provide better compatibility). + You will find TTFs in the `dist/` directory. @@ -86,6 +89,9 @@ The current avaliable styles are: * `v-g-doublestorey` : Double-storey `g` (default). * `v-g-singlestorey` : Single-storey `g`. * `v-g-opendoublestorey` : Open Single-storey `g`. +* Styles for letter `m`: + * `v-m-longleg` : `m` with long middle leg (default). + * `v-m-shortleg` : `m` with shorter middle leg. * Styles for letter `0`: * `v-zero-slashed` : Slashed Zero `0` (default). * `v-zero-dotted` : Dotted Zero `0`. @@ -103,6 +109,8 @@ The current avaliable styles are: ## Release Notes +* **1.9.2** + - Added short-legged `m` (assigned to `cv26`). * **1.9.1** - Added /latinayin. - Added more symbols. diff --git a/buildglyphs.ptl b/buildglyphs.ptl index eeee79a..aedb719 100644 --- a/buildglyphs.ptl +++ b/buildglyphs.ptl @@ -101,9 +101,6 @@ export as build : define [buildFont para recursive recursiveCodes] : begin return dp define [create-glyph] : match [Array.prototype.slice.call arguments 0] `[@name @actions] : begin - if (pickHash && nPending <= 0) : begin - if para.verbose : console.log " *** Done recursive build for \[if (recursive.length > 3) [recursive.slice 0 3 :.concat {'...'} :.join ','] [recursive.join ',']] in \(font.name.uniqueSubFamily)" - throw {.glyfMap glyphs} if (pickHash && [not pickHash.(name)]) : return nothing if para.verbose : console.log name @@ -179,7 +176,8 @@ export as build : define [buildFont para recursive recursiveCodes] : begin include markset.e 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 TempFont includeGlyphPart compsiteMarkSet + # IDKY, but wrapping "metrics" prevents Node.js on Arch modifying it. + define capture : object [metrics : Object.create 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 set capture.commonShapes : [import './glyphs/common-shapes.js'].apply.call capture diff --git a/generator.js b/generator.js index 92e321b..3173334 100644 --- a/generator.js +++ b/generator.js @@ -61,7 +61,7 @@ if (argv.svg) (function () { } return buf; } - var svg = '' + var svg = '' + '' + '' + ''; @@ -92,7 +92,7 @@ if (argv.svg) (function () { + ' glyph-name="' + g.name + '" horiz-adv-x="' + g.advanceWidth + '" ' + (g.unicode && g.unicode.length ? 'unicode="&#x' + g.unicode[0].toString(16) + ';"' : '') - + ' d="' + toSVGPath(g) + '" />'; + + ' d="' + toSVGPath(g) + '" />\n'; svg += gd; } svg += ''; diff --git a/glyphs/autobuilds.ptl b/glyphs/autobuilds.ptl index 1451d9c..4a4e228 100644 --- a/glyphs/autobuilds.ptl +++ b/glyphs/autobuilds.ptl @@ -854,4 +854,4 @@ export : define [apply] : begin if (para.spacing == 0) : begin set font.glyf : font.glyf.filter [lambda [g] : g.advanceWidth <= WIDTH] set glyphList.length font.glyf.length - for [local j 0] (j < font.glyf.length) [inc j] : set glyphList.(j) font.glyf.(j) \ No newline at end of file + for [local j 0] (j < font.glyf.length) [inc j] : set glyphList.(j) font.glyf.(j) diff --git a/glyphs/common-shapes.ptl b/glyphs/common-shapes.ptl index 4b0e3e5..c6be0c8 100644 --- a/glyphs/common-shapes.ptl +++ b/glyphs/common-shapes.ptl @@ -16,6 +16,7 @@ export : define [apply] : begin include chosenGlyph AS_BASE ALSO_METRICS if unicode : assign-unicode unicode if featureSelector : set currentGlyph.featureSelector featureSelector + set this.cmpPriority chosenGlyph.cmpPriority define [italic-variant name unicode] : create-glyph name : glyph-construction if para.isItalic @@ -29,6 +30,7 @@ export : define [apply] : begin include glyphs.(oldid) AS_BASE set-width glyphs.(oldid).advanceWidth set this.featureSelector glyphs.(oldid).featureSelector + set this.cmpPriority glyphs.(oldid).cmpPriority define [composite newid] : let [parts : {}.slice.call arguments 1] : begin create-glyph [fallback newid ('glyph' + [newtemp])] : glyph-construction @@ -574,7 +576,8 @@ export : define [apply] : begin local shouldBuildUnicodes : shouldBuildList.map ([x] => [if (glyphs.(x) && glyphs.(x).unicode) glyphs.(x).unicode.0 nothing]) :.filter ([x] => [not [not x]]) - local p : Object.create ps + local p {.} + foreach [{k v} : pairs-of all ps] : set p.(k) v try : begin local forkFont : buildFont.call [TempFont] p shouldBuildList shouldBuildUnicodes : ex diff --git a/glyphs/letters-unified-basic.ptl b/glyphs/letters-unified-basic.ptl index 32e2071..1f20d56 100644 --- a/glyphs/letters-unified-basic.ptl +++ b/glyphs/letters-unified-basic.ptl @@ -2324,14 +2324,14 @@ export : define [apply] : begin save 'cyrem' 0x43C ### m - define [SmallMShape top bot] : glyph-construction + define [SmallMShape top bot mbot] : glyph-construction local m1 : mix (SB + O) (MIDDLE + MVERTSTROKE / 2 * HVCONTRAST) 0.5 local m2 : mix (RIGHTSB - O) (MIDDLE - MVERTSTROKE / 2 * HVCONTRAST) 0.5 include : mShoulderSpiro left -- (SB + O + MVERTSTROKE * HVCONTRAST) right -- (MIDDLE + MVERTSTROKE / 2 * HVCONTRAST) top -- top - bottom -- bot + bottom -- mbot width -- MVERTSTROKE fine -- (MVERTSTROKE * SHOULDERFINE / STROKE) include : mShoulderSpiro @@ -2352,9 +2352,18 @@ export : define [apply] : begin sketch # m set-width WIDTH include markset.e - include : SmallMShape XH 0 - save 'm' 'm' + include : SmallMShape XH 0 0 + save 'm.longleg' save 'cyrte.italic' + sketch # m + set-width WIDTH + include markset.e + include : SmallMShape XH 0 [XH * 0.2] + save 'm.shortleg' + select-variant 'm' 'm' 'longleg' { + .'cv25' 'm.longleg' + .'cv26' 'm.shortleg' + } composite 'cyrtedescender.italic' glyphs.'cyrte.italic' [CyrDescender RIGHTSB] markset.e sketch # mltail diff --git a/glyphs/symbol-punctuation.ptl b/glyphs/symbol-punctuation.ptl index 2bed5b2..e0a6c32 100644 --- a/glyphs/symbol-punctuation.ptl +++ b/glyphs/symbol-punctuation.ptl @@ -168,11 +168,19 @@ export : define [apply] : begin include glyphs.period include glyphs.xhdot save 'colon' ':' + save 'colon.dmid' - apply-transform : Upright - apply-transform : Translate 0 (parenMid - XH / 2) - apply-transform : Italify - save 'colon.mid' + branch + apply-transform : Upright + apply-transform : Translate 0 (parenMid - XH / 2) + apply-transform : Italify + save 'colon.mid' + branch + local delta : Math.max 0 : WIDTH / 2 - (XH - PERIODSIZE) / 2 + apply-transform : Translate delta 0 + save 'colon.dright' + apply-transform : Translate (-2 * delta) 0 + save 'colon.dleft' sketch # semicolon include glyphs.comma diff --git a/images/download-options.png b/images/download-options.png index b679aec..ac7463e 100644 Binary files a/images/download-options.png and b/images/download-options.png differ diff --git a/images/family.png b/images/family.png index 39ab747..3b361d7 100644 Binary files a/images/family.png and b/images/family.png differ diff --git a/images/languages.png b/images/languages.png index 829a822..5ef3b29 100644 Binary files a/images/languages.png and b/images/languages.png differ diff --git a/images/ligations.png b/images/ligations.png index 56616c3..face383 100644 Binary files a/images/ligations.png and b/images/ligations.png differ diff --git a/images/matrix.png b/images/matrix.png index be13614..b8155f6 100644 Binary files a/images/matrix.png and b/images/matrix.png differ diff --git a/images/opentype.png b/images/opentype.png index b8babe2..10d58c9 100644 Binary files a/images/opentype.png and b/images/opentype.png differ diff --git a/images/preview-all.png b/images/preview-all.png index 9c1bee5..447f403 100644 Binary files a/images/preview-all.png and b/images/preview-all.png differ diff --git a/images/variants.png b/images/variants.png index 9d74623..b6547e5 100644 Binary files a/images/variants.png and b/images/variants.png differ diff --git a/images/weights.png b/images/weights.png index ecb391f..7c8e3b3 100644 Binary files a/images/weights.png and b/images/weights.png differ diff --git a/makefile b/makefile index 360f425..614879c 100644 --- a/makefile +++ b/makefile @@ -72,7 +72,6 @@ PARAM = SUFFIX='$(SUFFIX)' VERSION='$(VERSION)' endif export VERSION -export FAST export VARNAME export STYLE_COMMON export STYLE_UPRIGHT @@ -81,6 +80,7 @@ export VERSION export ARCPREFIX export NOCHARMAP export NOLIG +export DONTREF export DONTHINT ### Sometimes make will freak out and report ACCESS VIOLATION for me... so i have to add some repeation diff --git a/meta/features.ptl b/meta/features.ptl index 2ed8dec..33a5d10 100644 --- a/meta/features.ptl +++ b/meta/features.ptl @@ -219,6 +219,11 @@ export : define [apply para glyphList] : begin chain-rule ({'colon'} ~> {'colon.mid'}) ({'colon'} ~> {'colon.mid'}) {'greater' 'less' 'hyphen' 'equal' 'plus' 'colon.mid'} # ::> ::- ::= ::< ::+ chain-rule ({'colon'} ~> {'colon.mid'}) ({'colon'} ~> {'colon.mid'}) ({'colon'} ~> {'colon.mid'}) {'greater' 'less' 'hyphen' 'equal' 'plus' 'colon.mid'} # :::> :::- :::= :::< :::+ chain-rule {'greater' 'less' 'hyphen' 'equal' 'plus' 'colon.mid'} ({'colon'} ~> {'colon.mid'}) # <: >: -: =: +: + + # Colon chains + chain-rule {'colon.dright' 'colon.dmid'} ({'colon'} ~> {'colon.dmid'}) {'colon'} + chain-rule {'colon.dright' 'colon.dmid'} ({'colon'} ~> {'colon.dleft'}) + chain-rule ({'colon'} ~> {'colon.dright'}) {'colon'} #opbd local fwclose {'fwlcloseDoubleQuote' 'fwlcloseSingleQuote' 'dwlcjkSingleQuoteRight' 'dwlcjkDoubleQuoteRight' 'dwlparenRight'} diff --git a/onegroup.mk b/onegroup.mk index 2d931e3..df4161f 100644 --- a/onegroup.mk +++ b/onegroup.mk @@ -12,6 +12,12 @@ else HINT = ttfautohint --increase-x-height=0 endif +ifdef DONTREF +_DONTREF = true +else +_DONTREF = +endif + # Change this when an error reports # On windows, maybe `2> NUL`. @@ -106,13 +112,12 @@ $(MAPS) : $(OBJDIR)/%.charmap : $(OBJDIR)/.pass0-%.fdt # Pass 1 : Outline cleanup and merge features $(PASS1) : $(OBJDIR)/.pass1-%.ttf : pass1-cleanup.py $(OBJDIR)/.pass0-%.svg - @fontforge -quiet -script $^ $@.a.ttf $(if $(findstring italic,$@),10,$(if $(findstring oblique,$@),10,0)) $(FAST) $(SUPPRESS_ERRORS) + @fontforge -quiet -script $^ $@.a.ttf $(if $(findstring italic,$@),10,$(if $(findstring oblique,$@),10,0)) $(_DONTREF) $(SUPPRESS_ERRORS) @$(HINT) $@.a.ttf $@ @-rm $@.a.ttf # Pass 2 : add metadata -# IDKY, but converting into TTX and convert back dramatically reduces the file size $(TARGETS) : $(OBJDIR)/%.ttf : pass2-finalize.js $(OBJDIR)/.pass1-%.ttf $(OBJDIR)/.pass0-%.fdt - @otfccdump $(word 2,$^) | $(NODE) $< $(word 3,$^) | otfccbuild -o $@ --ignore-glyph-order --keep-average-char-width --dummy-dsig --short-post $(HINT_SUFFIX) + @otfccdump $(word 2,$^) | $(NODE) $< $(word 3,$^) | otfccbuild -s -O3 -o $@ --keep-average-char-width $(HINT_SUFFIX) $(DISTTARGETS) : $(DISTDIR)/%.ttf : $(OBJDIR)/%.ttf @cp $< $@ diff --git a/package.json b/package.json index 4953af8..cdc0fea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iosevka", - "version": "1.9.0", + "version": "1.9.2", "main": "./generate.js", "dependencies": { "bezier-js": "^2.0.0", diff --git a/parameters.toml b/parameters.toml index e813ac3..753f8e5 100644 --- a/parameters.toml +++ b/parameters.toml @@ -1,6 +1,6 @@ [iosevka] family = 'Iosevka' -version = '1.9.1' +version = '1.9.2' codename = 'Ingrid' copyright = 'Copyright (c) 2015-2016 Belleve Invis.' licence = '''This font software is licenced under the SIL Open Font Licence, Version 1.1. This is licence is avaliable with a FAQ at: http://scripts.sil.org/OFL. This font software is distributes on an 'AS IS' basis, without warranties or conditions of any kind, either express or implied. See the SIL Open Font licence fot the specific language, premissions and limitations governing your use of this font software.''' @@ -592,3 +592,7 @@ underscore = 'low' paragraph = 'high' [v-paragraph-low.variantSelector] paragraph = 'low' +[v-m-longleg] +m = 'longleg' +[v-m-shortleg] +m = 'shortleg' diff --git a/pass1-cleanup.py b/pass1-cleanup.py index 33b2925..a462631 100644 --- a/pass1-cleanup.py +++ b/pass1-cleanup.py @@ -5,14 +5,16 @@ import sys source = sys.argv[1] font = fontforge.open(source) -# Replace accented characters into references -font.selection.select(("ranges", None), ".notdef", "nonmarkingreturn") -font.replaceWithReference() -font.selection.select("braille1", "braille13", "braille12", "braille17", "braille123", "braille127", "braille137", "braille1237") -for i in font.selection: - glyph = font[i] - glyph.unlinkRef() +if len(sys.argv) < 5 or sys.argv[4] != "true": + # Replace accented characters into references + font.selection.select(("ranges", None), ".notdef", "nonmarkingreturn") + font.replaceWithReference() + + font.selection.select("braille1", "braille13", "braille12", "braille17", "braille123", "braille127", "braille137", "braille1237") + for i in font.selection: + glyph = font[i] + glyph.unlinkRef() # Remove overlapped area font.selection.all() diff --git a/pass2-finalize.js b/pass2-finalize.js index 217bb4d..ae333aa 100644 --- a/pass2-finalize.js +++ b/pass2-finalize.js @@ -18,5 +18,5 @@ process.stdin.on('end', function () { ttf.cvt_ = glyfs.cvt_; ttf.maxp = glyfs.maxp; ttf.gasp = glyfs.gasp; - process.stdout.write(JSON.stringify(ttf)); + process.stdout.write(JSON.stringify(ttf) + '\n'); }); \ No newline at end of file diff --git a/snapshot/index.html b/snapshot/index.html index 9b3db9e..c84631f 100644 --- a/snapshot/index.html +++ b/snapshot/index.html @@ -147,10 +147,6 @@ cv12 gg -
  • - cv24 - gg -
  • cv13 00 @@ -195,6 +191,18 @@ cv23
  • +
  • + cv24 + gg +
  • +
  • + cv25 + mm +
  • +
  • + cv26 + mm +
  • @@ -314,13 +322,13 @@ Feature TagsDesigned ForSample No Ligation 
    -<< -< <-- <<- <- -> ->> --> >- >>- <-> <--> <!--
     =<< =< <== <<= <= => =>> ==> >= >>= <=> <==>
    -:= :- :+ :< :>     <: >: +: -: =:
    +:= :- :+ :< :> <: >: +: -: =: a:b a::b a:::b caltDefault setting in editors
    -<< -< <-- <<- <- -> ->> --> >- >>- <-> <--> <!--
     =<< =< <== <<= <= => =>> ==> >= >>= <=> <==>
    -:= :- :+ :< :>     <: >: +: -: =:
    +:= :- :+ :< :> <: >: +: -: =: a:b a::b a:::b XHS_, XPTLHaskell, PatEL
    -<< -< <-- <<- <- -> ->> --> >- >>- <-> <--> <!--
     =<< =< <== <<= <= => =>> ==> >= >>= <=> <==>
    -:= :- :+ :< :>     <: >: +: -: =:
    +:= :- :+ :< :> <: >: +: -: =: a:b a::b a:::b
    diff --git a/snapshot/index.styl b/snapshot/index.styl index eaa6887..277c0da 100644 --- a/snapshot/index.styl +++ b/snapshot/index.styl @@ -115,7 +115,7 @@ section#matrix > div > row > span { } section#opentype - width: 34.5em + width: 35.5em padding: 0 8em > h2 { display: none } > div.hr @@ -176,10 +176,12 @@ section#opentype &.italic { margin-top: 0.25em } &.narrow display flex - justify-content space-between + justify-content center flex-wrap wrap + width: 35em; + margin-left: ((35.5em - 35em) / 2); > li - margin 0 0 0.5em + margin 0 0.5em 0.5em border none width 4em flex none diff --git a/support/fairify.js b/support/fairify.js index f9162a0..2b5e971 100644 --- a/support/fairify.js +++ b/support/fairify.js @@ -74,27 +74,28 @@ function fineAllExtrema(z1, z2, z3, z4, angles) { return exs.sort(ASCEND); } function mix(z1, z2, t) { - return { - x: (1 - t) * z1.x + t * z2.x, - y: (1 - t) * z1.y + t * z2.y - }; + if (t <= 0) return z1; + if (t >= 1) return z2; + var x = (1 - t) * z1.x + t * z2.x, y = (1 - t) * z1.y + t * z2.y + return { x: x, y: y }; } function bez2(z1, z2, z3, t) { + if (t <= 0) return z1; + if (t >= 1) return z3; + var c1 = (1 - t) * (1 - t), c2 = 2 * (1 - t) * t, c3 = t * t; return { - x: (1 - t) * (1 - t) * z1.x + 2 * (1 - t) * t * z2.x + t * t * z3.x, - y: (1 - t) * (1 - t) * z1.y + 2 * (1 - t) * t * z2.y + t * t * z3.y + x: c1 * z1.x + c2 * z2.x + c3 * z3.x, + y: c1 * z1.y + c2 * z2.y + c3 * z3.y }; } function bez3(z1, z2, z3, z4, t) { + if (t <= 0) return z1; + if (t >= 1) return z4; + var c1 = (1 - t) * (1 - t) * (1 - t), c2 = 3 * t * (1 - t) * (1 - t), + c3 = 3 * t * t * (1 - t), c4 = t * t * t; return { - x: (1 - t) * (1 - t) * (1 - t) * z1.x - + 3 * t * (1 - t) * (1 - t) * z2.x - + 3 * t * t * (1 - t) * z3.x - + t * t * t * z4.x, - y: (1 - t) * (1 - t) * (1 - t) * z1.y - + 3 * t * (1 - t) * (1 - t) * z2.y - + 3 * t * t * (1 - t) * z3.y - + t * t * t * z4.y + x: c1 * z1.x + c2 * z2.x + c3 * z3.x + c4 * z4.x, + y: c1 * z1.y + c2 * z2.y + c3 * z3.y + c4 * z4.y }; } function splitBefore(z1, z2, z3, z4, t) { diff --git a/support/glyph.ptl b/support/glyph.ptl index 6d92c58..9514e14 100644 --- a/support/glyph.ptl +++ b/support/glyph.ptl @@ -241,17 +241,9 @@ export all : class Glyph foreach [k : range 0 (ts.length - 1)] : begin local s : strand.split ts.(k) ts.(k + 1) if s.points : begin - local quads : cubic2quad - * s.points.0.x ; * s.points.0.y - * s.points.1.x ; * s.points.1.y - * s.points.2.x ; * s.points.2.y - * s.points.3.x ; * s.points.3.y - * 0.05 - local m 2 - while (m < quads.length) : begin - contour.push : new Point quads.(m) quads.(m + 1) false - contour.push : new Point quads.(m + 2) quads.(m + 3) true - inc m 4 + contour.push : new Point s.points.1.x s.points.1.y false true + contour.push : new Point s.points.2.x s.points.2.y false true + contour.push : new Point s.points.3.x s.points.3.y true set flag 2 true : begin local p0 contour.(contour.length - 1)