Merge branch 'master' into releases

This commit is contained in:
be5invis 2016-08-03 20:40:57 +08:00
commit b86791e83d
28 changed files with 128 additions and 67 deletions

16
ISSUE_TEMPLATE.md Normal file
View File

@ -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.

View File

@ -38,10 +38,13 @@ Iosevkas 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 youve 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.

View File

@ -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

View File

@ -61,7 +61,7 @@ if (argv.svg) (function () {
}
return buf;
}
var svg = '<?xml version="1.0" standalone="no"?>'
var svg = '<?xml version="1.0" encoding="utf-8"?>'
+ '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >'
+ '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">'
+ '<defs><font id="' + font.name.postScriptName + '">';
@ -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 += '</font></defs></svg>';

View File

@ -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)
for [local j 0] (j < font.glyf.length) [inc j] : set glyphList.(j) font.glyf.(j)

View File

@ -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

View File

@ -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

View File

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 409 KiB

After

Width:  |  Height:  |  Size: 408 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 668 KiB

After

Width:  |  Height:  |  Size: 686 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 354 KiB

After

Width:  |  Height:  |  Size: 354 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 KiB

After

Width:  |  Height:  |  Size: 260 KiB

View File

@ -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

View File

@ -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'}

View File

@ -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 $< $@

View File

@ -1,6 +1,6 @@
{
"name": "iosevka",
"version": "1.9.0",
"version": "1.9.2",
"main": "./generate.js",
"dependencies": {
"bezier-js": "^2.0.0",

View File

@ -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'

View File

@ -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()

View File

@ -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');
});

View File

@ -147,10 +147,6 @@
<span class="tag">cv12</span><span class="description"></span>
<span class="sample" style="font-feature-settings:'cv12'">g</span><span class="sample italic" style="font-feature-settings:'cv12'">g</span>
</li>
<li>
<span class="tag">cv24</span><span class="description"></span>
<span class="sample" style="font-feature-settings:'cv24'">g</span><span class="sample italic" style="font-feature-settings:'cv24'">g</span>
</li>
<li>
<span class="tag">cv13</span><span class="description"></span>
<span class="sample" style="font-feature-settings:'cv13'">0</span><span class="sample italic" style="font-feature-settings:'cv13'">0</span>
@ -195,6 +191,18 @@
<span class="tag">cv23</span><span class="description"></span>
<span class="sample" style="font-feature-settings:'cv23'"></span><span class="sample italic" style="font-feature-settings:'cv23'"></span>
</li>
<li>
<span class="tag">cv24</span><span class="description"></span>
<span class="sample" style="font-feature-settings:'cv24'">g</span><span class="sample italic" style="font-feature-settings:'cv24'">g</span>
</li>
<li>
<span class="tag">cv25</span><span class="description"></span>
<span class="sample" style="font-feature-settings:'cv25'">m</span><span class="sample italic" style="font-feature-settings:'cv25'">m</span>
</li>
<li>
<span class="tag">cv26</span><span class="description"></span>
<span class="sample" style="font-feature-settings:'cv26'">m</span><span class="sample italic" style="font-feature-settings:'cv26'">m</span>
</li>
</ol>
</section>
<section id="matrix">
@ -314,13 +322,13 @@
<tr class="first"><th>Feature Tags</th><th>Designed For</th><th>Sample</th></tr>
<tr><td><i>No Ligation</i></td><td>&nbsp;</td><td class="nolig"><pre>-&lt;&lt; -&lt; &lt;-- &lt;&lt;- &lt;- -&gt; -&gt;&gt; --&gt; &gt;- &gt;&gt;- &lt;-&gt; &lt;--&gt; &lt;!--
=&lt;&lt; =&lt; &lt;== &lt;&lt;= &lt;= =&gt; =&gt;&gt; ==&gt; &gt;= &gt;&gt;= &lt;=&gt; &lt;==&gt;
:= :- :+ :&lt; :&gt; &lt;: &gt;: +: -: =:</pre></td></tr>
:= :- :+ :&lt; :&gt; &lt;: &gt;: +: -: =: a:b a::b a:::b</pre></td></tr>
<tr><td>calt</td><td><i>Default setting in editors</i></td><td><pre><s>-&lt;&lt;</s> <s>-&lt;</s> &lt;-- <s>&lt;&lt;-</s> &lt;- -&gt; <s>-&gt;&gt;</s> --&gt; <s>&gt;-</s> <s>&gt;&gt;-</s> &lt;-&gt; &lt;--&gt; &lt;!--
<s>=&lt;&lt;</s> <s>=&lt;</s> &lt;== <s>&lt;&lt;=</s> <s>&lt;=</s> =&gt; <s>=&gt;&gt;</s> ==&gt; <s>&gt;=</s> <s>&gt;&gt;=</s> &lt;=&gt; &lt;==&gt;
:= :- :+ :&lt; :&gt; &lt;: &gt;: +: -: =:</pre></td></tr>
:= :- :+ :&lt; :&gt; &lt;: &gt;: +: -: =: a:b a::b a:::b</pre></td></tr>
<tr><td>XHS_, XPTL</td><td>Haskell, PatEL</td><td style="font-feature-settings: &quot;XHS_&quot; 1"><pre>-&lt;&lt; -&lt; &lt;-- &lt;&lt;- &lt;- -&gt; -&gt;&gt; --&gt; &gt;- &gt;&gt;- &lt;-&gt; &lt;--&gt; &lt;!--
=&lt;&lt; =&lt; &lt;== &lt;&lt;= <s>&lt;=</s> =&gt; =&gt;&gt; ==&gt; <s>&gt;=</s> &gt;&gt;= &lt;=&gt; &lt;==&gt;
:= :- :+ :&lt; :&gt; &lt;: &gt;: +: -: =:</pre></td></tr>
:= :- :+ :&lt; :&gt; &lt;: &gt;: +: -: =: a:b a::b a:::b</pre></td></tr>
</table>
</section>

View File

@ -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

View File

@ -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) {

View File

@ -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)