Skip to content

Commit

Permalink
Merge branch 'master' into releases
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis committed Apr 22, 2019
2 parents c7b60a7 + ab01481 commit 33f552f
Show file tree
Hide file tree
Showing 17 changed files with 121 additions and 81 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ To build Iosevka you should:

1. Ensure that [`nodejs`](http://nodejs.org) (≥ 8.4), [`ttfautohint`](http://www.freetype.org/ttfautohint/), [`otfcc`](https://github.com/caryll/otfcc) (≥ 0.9.3).
2. Install necessary libs by `npm install`. If you’ve installed them, upgrade to the latest.
3. `npm run build -- contents:iosevka`.
3. `npm run build -- contents::iosevka`.


You will find TTFs, as well as WOFF(2) web fonts and one Webfont CSS in the `dist/` directory.
Expand Down
75 changes: 38 additions & 37 deletions glyphs/letters-unified-basic.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -707,43 +707,44 @@ export : define [apply] : begin
g4 (m1 - fineOffsetOuter) 0 [widths.lhs fineOuter]

# bottom cap 1
start-from (m1 + fineOffsetInner) 0
line-to (m1 - fineOffsetOuter) 0
line-to m1 fineHeight

include : difference
union
dispiro
widths.lhs fineInner
flat (middle - fineOffsetInner) wheight
#quadcontrols 0 0.1 6 unimportant
g4 (m1 + fineOffsetInner) 0 [widths.rhs fineInner]
dispiro
widths.rhs fineInner
flat (middle + fineOffsetInner) wheight
#quadcontrols 0 0.1 6 unimportant
curl (m2 - fineOffsetInner) 0 [widths.lhs fineInner]
union
spiro-outline
corner 0 0
corner (WIDTH * div) 0
corner (WIDTH * div) (-WIDTH * div)
corner 0 (-WIDTH * div)
spiro-outline
corner 0 wheight
corner (WIDTH * div) wheight
corner (WIDTH * div) (wheight + WIDTH * div)
corner 0 (wheight + WIDTH * div)

# middle cap
start-from (middle + fineOffsetInner) wheight
line-to middle (wheight - fineHeight)
line-to (middle - fineOffsetInner) wheight

# bottom cap 2
start-from (m2 + fineOffsetOuter) 0
line-to (m2 - fineOffsetInner) 0
line-to m2 fineHeight
define [InnerShapes] : union
spiro-outline
corner (m1 + fineOffsetInner) 0
corner (m1 - fineOffsetOuter) 0
corner m1 fineHeight
spiro-outline
corner (middle + fineOffsetInner) wheight
corner middle (wheight - fineHeight)
corner (middle - fineOffsetInner) wheight
spiro-outline
corner (m2 + fineOffsetOuter) 0
corner (m2 - fineOffsetInner) 0
corner m2 fineHeight

dispiro
widths.lhs fineInner
flat (middle - fineOffsetInner) wheight
#quadcontrols 0 0.1 6 unimportant
curl (m1 + fineOffsetInner) 0 [widths.rhs fineInner]
dispiro
widths.rhs fineInner
flat (middle + fineOffsetInner) wheight
#quadcontrols 0 0.1 6 unimportant
curl (m2 - fineOffsetInner) 0 [widths.lhs fineInner]

define [InnerStrokeMask] : union
spiro-outline
corner 0 0
corner (WIDTH * div) 0
corner (WIDTH * div) (-WIDTH * div)
corner 0 (-WIDTH * div)
spiro-outline
corner 0 wheight
corner (WIDTH * div) wheight
corner (WIDTH * div) (wheight + WIDTH * div)
corner 0 (wheight + WIDTH * div)

include : difference [InnerShapes] [InnerStrokeMask]

if barStraight : begin
include : dispiro
Expand Down
4 changes: 2 additions & 2 deletions glyphs/symbol-geometric.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -974,12 +974,12 @@ export : define [apply] : begin

sketch # lightshade
set-width FULLWIDTH
include : Shade 2 (1 / 8)
include : Shade 4 (1 / 8)
save 'lightshade' 0x2591

sketch # mediumshade
set-width FULLWIDTH
include : Shade 4 (1 / 4)
include : Shade 8 (1 / 4)
save 'mediumshade' 0x2592

sketch # heavyshade
Expand Down
Binary file modified images/charvars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/download-options.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/family.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/languages.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/ligations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/matrix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/preview-all.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/stylesets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/variants.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/weights.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
95 changes: 64 additions & 31 deletions meta/feature/ligation.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,16 @@ local hyphen {'hyphen'}
local equal {'equal'}
local exclam {'exclam'}
local greater {'greater'}
local alphabet {
'a' 'a.doublestorey' 'a.singlestorey' 'b' 'c' 'd' 'e' 'f' 'g' 'g.doublestorey' 'g.singlestorey'
'g.opendoublestorey' 'h' 'i' 'i.hooky' 'i.serifed' 'i.italic' 'i.zshaped' 'j' 'j.straight' 'j.serifed'
'k' 'l' 'l.serifed' 'l.italic' 'l.hooky' 'l.zshaped' 'l.tailed' 'l.hookybottom' 'm' 'm.longleg'
'm.shortleg' 'n' 'o' 'p' 'q' 'r' 's' 't' 't.standard' 't.cross' 'u' 'v' 'w' 'x' 'y' 'z' 'A' 'B' 'C'
'D' 'E' 'F' 'G' 'H' 'I' 'J' 'K' 'L' 'M' 'N' 'O' 'P' 'Q' 'Q.straight' 'Q.taily' 'R' 'S' 'T' 'U' 'V' 'W'
'X' 'Y' 'Z' 'zero' 'zero.slashed' 'zero.dotted' 'zero.unslashed' 'one' 'two' 'three' 'four' 'five' 'six'
'seven' 'eight' 'nine' 'underscore' 'underscore.high' 'underscore.low'
local alphabetRaw {
'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm'
'n' 'o' 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' 'x' 'y' 'z'
'A' 'B' 'C' 'D' 'E' 'F' 'G' 'H' 'I' 'J' 'K' 'L' 'M'
'N' 'O' 'P' 'Q' 'R' 'S' 'T' 'U' 'V' 'W' 'X' 'Y' 'Z'
'zero' 'one' 'two' 'three' 'four' 'five' 'six'
'seven' 'eight' 'nine' 'underscore'
}


local [acops] {'less' 'greater' 'hyphen' 'equal' 'plus'}
local [acskip] {
'slash' 'bar' 'at' 'ampersand' 'percent'
Expand All @@ -55,7 +56,17 @@ local [no_period_center] ({'period.center'} ~> {'period'})
define preserved null
define advance : lambda [t] : t.map : lambda [x] x

export : define [buildLigations chain-rule lookupOrder commonList features lookups plm] : foreach [ ligationFeatureName : items-of : Object.keys plm] : do
export : define [buildLigations chain-rule lookupOrder commonList features lookups plm glyphs] : foreach [ ligationFeatureName : items-of : Object.keys plm] : do

local alphabet : do
local g {}
foreach [gid : items-of alphabetRaw] : begin
g.push gid
if (glyphs.(gid) && glyphs.(gid).featureSelector) : begin
foreach [{k v} : pairs-of glyphs.(gid).featureSelector] : begin
g.push v
* g

local mappedFeature : plm.(ligationFeatureName) || {}
local ligationLookupName : 'lig_' + ligationFeatureName + '-' + mappedFeature

Expand Down Expand Up @@ -367,28 +378,6 @@ export : define [buildLigations chain-rule lookupOrder commonList features looku
includeLookup
.type 'gsub_chaining'
.subtables : list
chain-rule # <<<<<
less ~> [only 'llgg' : lsx 'shiftN0t']
less ~> preserved
less ~> preserved
less ~> preserved
less ~> [only 'llgg' : lsx 'shift0t']
chain-rule # >>>>>
greater ~> [only 'llgg' : lsx 'shift0t']
greater ~> preserved
greater ~> preserved
greater ~> preserved
greater ~> [only 'llgg' : lsx 'shiftN0t']
chain-rule # <<<<
less ~> [only 'llgg' : lsx 'shiftN0t']
less ~> preserved
less ~> preserved
less ~> [only 'llgg' : lsx 'shift0t']
chain-rule # >>>>
greater ~> [only 'llgg' : lsx 'shift0t']
greater ~> preserved
greater ~> preserved
greater ~> [only 'llgg' : lsx 'shiftN0t']
chain-rule # <<<
less ~> [only 'llgg' : lsx 'shiftN0t']
less ~> preserved
Expand All @@ -403,6 +392,50 @@ export : define [buildLigations chain-rule lookupOrder commonList features looku
chain-rule # >>
greater ~> [only 'llgg' : lsx 'shift0t']
greater ~> [only 'llgg' : lsx 'shiftN0t']

# Cancel alternates of < and > shapes if there are more after them
local lAll {"less" "ligless.shift0t" "ligless.shiftN0t"}
local lNeut {"less" "less" "less"}
local gAll {"greater" "liggreater.shift0t" "liggreater.shiftN0t"}
local gNeut {"greater" "greater" "greater"}
local lgAll : lAll.concat gAll
local lgNeut : lNeut.concat gNeut
includeLookup
.type 'gsub_chaining'
.subtables : list
chain-rule
lgAll ~> [only 'llgg' lgNeut]
lgAll ~> [only 'llgg' lgNeut]
lgAll ~> [only 'llgg' lgNeut]
lgAll ~> preserved
includeLookup
.type 'gsub_chaining'
.subtables : list
chain-rule
lgAll ~> preserved
lgAll ~> preserved
lgAll ~> preserved
lgAll ~> [only 'llgg' lgNeut]
includeLookup # Cleanup mixes
.type 'gsub_chaining'
.subtables : list
chain-rule
lAll ~> [only 'llgg' lNeut]
lAll ~> [only 'llgg' lNeut]
gAll ~> [only 'llgg' gNeut]
chain-rule
gAll ~> [only 'llgg' gNeut]
gAll ~> [only 'llgg' gNeut]
lAll ~> [only 'llgg' lNeut]
chain-rule
lAll ~> [only 'llgg' lNeut]
gAll ~> [only 'llgg' gNeut]
gAll ~> [only 'llgg' gNeut]
chain-rule
gAll ~> [only 'llgg' gNeut]
lAll ~> [only 'llgg' lNeut]
lAll ~> [only 'llgg' lNeut]

# Extended arrow sticks
# --------------------->
includeLookup
Expand Down
14 changes: 7 additions & 7 deletions meta/features.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ define-operator "~>" 880 'right' : syntax-rules
`(@l ~> @r) `{.left @l .right @r}

# GSUB
define [buildGSUB para glyphList markGlyphs] : begin
define [buildGSUB para glyphs glyphList markGlyphs] : begin
local commonList {}
local languages
.DFLT_DFLT {.features commonList}
Expand Down Expand Up @@ -69,7 +69,7 @@ define [buildGSUB para glyphList markGlyphs] : begin
if [not para.disableLigation] : do
define plm : progLigNameMap
set plm.calt : para.customLigSet || plm.(para.defLigSet) || plm.calt
buildLigations chain-rule lookupOrder commonList features lookups plm
buildLigations chain-rule lookupOrder commonList features lookups plm glyphs
if (para.spacing > 0 && [not para.noCJKV]) : begin
buildOPBD chain-rule lookupOrder commonList features lookups

Expand Down Expand Up @@ -132,7 +132,7 @@ define [buildGSUB para glyphList markGlyphs] : begin
return {.languages languages .features features .lookups lookups .lookupOrder [topsort lookupOrder]}

# GPOS
define [buildGPOS para glyphList markGlyphs] : begin
define [buildGPOS para glyphs glyphList markGlyphs] : begin
local lookup_mark
.type 'gpos_mark_to_base'
.subtables {}
Expand Down Expand Up @@ -197,7 +197,7 @@ define [buildGPOS para glyphList markGlyphs] : begin
.l_mkmk lookup_mkmk

# GDEF
define [buildGDEF para glyphList markGlyphs] : begin
define [buildGDEF para glyphs glyphList markGlyphs] : begin
local GDEF {.glyphClassDef {.}}
foreach glyph [items-of glyphList] : begin
set GDEF.glyphClassDef.(glyph.name) : if [[regex '_'].test glyph.name] GDEF_LIGATURE GDEF_SIMPLE
Expand Down Expand Up @@ -261,9 +261,9 @@ define [interpretLookupAt gs j lut] : match lut.type

export : define [apply para glyphs glyphList unicodeGlyphs] : begin
local markGlyphs {.all {} }
local GPOS : buildGPOS para glyphList markGlyphs
local GDEF : buildGDEF para glyphList markGlyphs
local GSUB : buildGSUB para glyphList markGlyphs
local GPOS : buildGPOS para glyphs glyphList markGlyphs
local GDEF : buildGDEF para glyphs glyphList markGlyphs
local GSUB : buildGSUB para glyphs glyphList markGlyphs

# Build compatibility ligatures
if (para.spacing > 0 && para.compLig) : foreach [cldef : items-of para.compLig] : do
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iosevka",
"version": "2.2.0",
"version": "2.2.1",
"main": "./generate.js",
"engines": {
"node": ">=8.4.0"
Expand Down
10 changes: 8 additions & 2 deletions verdafile.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const PRIVATE_BUILD_PLANS = path.relative(

// Save journal to build/
build.setJournal(`${BUILD}/.verda-build-journal`);
// Enable self-tracking
build.setSelfTracking();

///////////////////////////////////////////////////////////
Expand Down Expand Up @@ -374,7 +375,11 @@ const Pages = task(`pages`, async target => {
});

const SampleImagesPre = task(`sample-images:pre`, async target => {
const [sans, slab] = await target.need(GroupContents`iosevka`, GroupContents`iosevka-slab`);
const [sans, slab] = await target.need(
GroupContents`iosevka`,
GroupContents`iosevka-slab`,
de`images`
);
await cp(`${DIST}/${sans}`, `snapshot/${sans}`);
await cp(`${DIST}/${slab}`, `snapshot/${slab}`);
});
Expand Down Expand Up @@ -422,7 +427,8 @@ phony(`clean`, async () => {
build.deleteJournal(); // Disable journal
});
phony(`release`, async target => {
await target.need(AllArchives, SampleImages, Pages);
await target.need(AllArchives);
await target.need(SampleImages, Pages);
});

///////////////////////////////////////////////////////////
Expand Down

0 comments on commit 33f552f

Please sign in to comment.