Merge branch 'master' into releases

This commit is contained in:
be5invis 2017-01-25 16:43:51 +08:00
commit 170fc1a282
31 changed files with 1166 additions and 783 deletions

461
.esformatter Normal file
View File

@ -0,0 +1,461 @@
{
"indent" : {
"ReturnStatement": ">=1",
"value": "\t",
"alignComments": true,
"ArrayExpression": 1,
"ArrayPattern": 1,
"ArrowFunctionExpression": 1,
"AssignmentExpression": 1,
"AssignmentExpression.BinaryExpression": 1,
"AssignmentExpression.LogicalExpression": 1,
"AssignmentExpression.UnaryExpression": 1,
"CallExpression": 1,
"CallExpression.BinaryExpression": 1,
"CallExpression.LogicalExpression": 1,
"CallExpression.UnaryExpression": 1,
"CatchClause": 1,
"ConditionalExpression": 1,
"CommentInsideEmptyBlock": 1,
"ClassDeclaration": 1,
"DoWhileStatement": 1,
"ForInStatement": 1,
"ForOfStatement": 1,
"ForStatement": 1,
"FunctionDeclaration": 1,
"FunctionExpression": 1,
"IfStatement": 1,
"MemberExpression": 1,
"MultipleVariableDeclaration": 1,
"NewExpression": 1,
"ObjectExpression": 1,
"ObjectExpression.BinaryExpression": 1,
"ObjectExpression.LogicalExpression": 1,
"ObjectExpression.UnaryExpression": 1,
"ObjectPattern": 1,
"ParameterList": 1,
"SingleVariableDeclaration": 0,
"SwitchCase": 1,
"SwitchStatement": 1,
"TopLevelFunctionBlock": 1,
"TryStatement": 1,
"VariableDeclaration.BinaryExpression": 1,
"VariableDeclaration.LogicalExpression": 1,
"VariableDeclaration.UnaryExpression": 1,
"WhileStatement": 1
},
"lineBreak" : {
"value" : "\n",
"before" : {
"AssignmentExpression" : -1,
"AssignmentOperator": -1,
"AssignmentPattern" : 0,
"ArrayPatternOpening": 0,
"ArrayPatternClosing": 0,
"ArrayPatternComma": 0,
"ArrowFunctionExpressionArrow": 0,
"ArrowFunctionExpressionOpeningBrace": 0,
"ArrowFunctionExpressionClosingBrace": "<=1",
"BlockStatement" : -1,
"BreakKeyword": ">=1",
"CallExpression" : -1,
"CallExpressionOpeningParentheses" : 0,
"CallExpressionClosingParentheses" : -1,
"ClassDeclaration" : ">=1",
"ClassDeclarationOpeningBrace" : 0,
"ClassDeclarationClosingBrace" : "<=1",
"ConditionalExpression" : ">=1",
"CatchOpeningBrace" : 0,
"CatchClosingBrace" : "<=1",
"CatchKeyword": 0,
"DeleteOperator" : -1,
"DoWhileStatement" : -1,
"DoWhileStatementOpeningBrace" : 0,
"DoWhileStatementClosingBrace" : "<=1",
"EndOfFile" : 1,
"EmptyStatement" : -1,
"FinallyKeyword" : -1,
"FinallyOpeningBrace" : 0,
"FinallyClosingBrace" : "<=1",
"ForInStatement" : -1,
"ForInStatementExpressionOpening" : -1,
"ForInStatementExpressionClosing" : -1,
"ForInStatementOpeningBrace" : 0,
"ForInStatementClosingBrace" : "<=1",
"ForOfStatement" : ">=1",
"ForOfStatementExpressionOpening" : 0,
"ForOfStatementExpressionClosing" : 0,
"ForOfStatementOpeningBrace" : 0,
"ForOfStatementClosingBrace" : "<=1",
"ForStatement" : -1,
"ForStatementExpressionOpening" : -1,
"ForStatementExpressionClosing" : -1,
"ForStatementOpeningBrace" : 0,
"ForStatementClosingBrace" : "<=1",
"FunctionExpression" : -1,
"FunctionExpressionOpeningBrace" : 0,
"FunctionExpressionClosingBrace" : "<=1",
"FunctionDeclaration" : -1,
"FunctionDeclarationOpeningBrace" : 0,
"FunctionDeclarationClosingBrace" : "<=1",
"IIFEClosingParentheses" : 0,
"IfStatement" : -1,
"IfStatementOpeningBrace" : 0,
"IfStatementClosingBrace" : "<=1",
"ElseIfStatement" : -1,
"ElseIfStatementOpeningBrace" : 0,
"ElseIfStatementClosingBrace" : "<=1",
"ElseStatement" : 0,
"ElseStatementOpeningBrace" : 0,
"ElseStatementClosingBrace" : "<=1",
"LogicalExpression" : -1,
"MethodDefinition": ">=1",
"MemberExpressionOpening": 0,
"MemberExpressionClosing": 0,
"MemberExpressionPeriod": -1,
"ObjectExpressionClosingBrace" : -1,
"ObjectPatternOpeningBrace": 0,
"ObjectPatternClosingBrace": 0,
"ObjectPatternComma": 0,
"Property" : -1,
"PropertyValue" : 0,
"ReturnStatement" : -1,
"SwitchOpeningBrace" : 0,
"SwitchClosingBrace" : -1,
"ThisExpression" : -1,
"ThrowStatement" : -1,
"TryKeyword": -1,
"TryOpeningBrace" : 0,
"TryClosingBrace" : "<=1",
"VariableName" : -1,
"VariableValue" : -1,
"VariableDeclaration" : -1,
"VariableDeclarationSemiColon": -1,
"VariableDeclarationWithoutInit" : -1,
"WhileStatement" : -1,
"WhileStatementOpeningBrace" : 0,
"WhileStatementClosingBrace" : "<=1"
},
"after" : {
"AssignmentExpression" : -1,
"AssignmentOperator" : -1,
"AssignmentPattern" : 0,
"ArrayPatternOpening": 0,
"ArrayPatternClosing": 0,
"ArrayPatternComma": 0,
"ArrowFunctionExpressionArrow": 0,
"ArrowFunctionExpressionOpeningBrace": ">=1",
"ArrowFunctionExpressionClosingBrace": -1,
"BlockStatement" : -1,
"BreakKeyword": -1,
"CallExpression" : -1,
"CallExpressionOpeningParentheses" : -1,
"CallExpressionClosingParentheses" : -1,
"ClassDeclaration" : ">=1",
"ClassDeclarationOpeningBrace" : ">=1",
"ClassDeclarationClosingBrace" : ">=1",
"CatchOpeningBrace" : "<=1",
"CatchClosingBrace" : -1,
"CatchKeyword": 0,
"ConditionalExpression" : -1,
"DeleteOperator" : -1,
"DoWhileStatement" : -1,
"DoWhileStatementOpeningBrace" : "<=1",
"DoWhileStatementClosingBrace" : -1,
"EmptyStatement" : 1,
"FinallyKeyword" : -1,
"FinallyOpeningBrace" : "<=2",
"FinallyClosingBrace" : -1,
"ForInStatement" : -1,
"ForInStatementExpressionOpening" : -1,
"ForInStatementExpressionClosing" : -1,
"ForInStatementOpeningBrace" : "<=1",
"ForInStatementClosingBrace" : -1,
"ForOfStatement" : -1,
"ForOfStatementExpressionOpening" : "<2",
"ForOfStatementExpressionClosing" : -1,
"ForOfStatementOpeningBrace" : ">=1",
"ForOfStatementClosingBrace" : ">=1",
"ForStatement" : -1,
"ForStatementExpressionOpening" : -1,
"ForStatementExpressionClosing" : -1,
"ForStatementOpeningBrace" : "<=1",
"ForStatementClosingBrace" : -1,
"FunctionExpression" : -1,
"FunctionExpressionOpeningBrace" : "<=1",
"FunctionExpressionClosingBrace" : -1,
"FunctionDeclaration" : -1,
"FunctionDeclarationOpeningBrace" : "<=1",
"FunctionDeclarationClosingBrace" : -1,
"IIFEOpeningParentheses" : 0,
"IfStatement" : -1,
"IfStatementOpeningBrace" : "<=1",
"IfStatementClosingBrace" : -1,
"ElseIfStatement" : -1,
"ElseIfStatementOpeningBrace" : "<=1",
"ElseIfStatementClosingBrace" : -1,
"ElseStatement" : -1,
"ElseStatementOpeningBrace" : "<=1",
"ElseStatementClosingBrace" : -1,
"LogicalExpression" : -1,
"MethodDefinition": ">=1",
"MemberExpressionOpening": 0,
"MemberExpressionClosing" : ">=0",
"MemberExpressionPeriod": 0,
"ObjectExpressionOpeningBrace" : "<=1",
"ObjectPatternOpeningBrace": 0,
"ObjectPatternClosingBrace": 0,
"ObjectPatternComma": 0,
"Property" : -1,
"PropertyName" : 0,
"ReturnStatement" : -1,
"SwitchOpeningBrace" : "<=1",
"SwitchClosingBrace" : -1,
"SwitchCaseColon": ">=1",
"ThisExpression" : -1,
"ThrowStatement" : -1,
"TryKeyword": -1,
"TryOpeningBrace" : "<=1",
"TryClosingBrace" : -1,
"VariableValue" : -1,
"VariableDeclaration" : -1,
"VariableDeclarationSemiColon" : ">=1",
"WhileStatement" : -1,
"WhileStatementOpeningBrace" : "<=1",
"WhileStatementClosingBrace" : -1
}
},
"whiteSpace" : {
"value" : " ",
"removeTrailing" : 1,
"before" : {
"AssignmentPattern" : 1,
"ArrayExpressionOpening" : -1,
"ArrayExpressionClosing" : -1,
"ArrayExpressionComma" : -1,
"ArrayPatternOpening": 1,
"ArrayPatternClosing": 0,
"ArrayPatternComma": 0,
"ArrowFunctionExpressionArrow": 1,
"ArrowFunctionExpressionOpeningBrace": 1,
"ArrowFunctionExpressionClosingBrace": 0,
"ArgumentComma" : -1,
"ArgumentList" : 0,
"AssignmentOperator" : 1,
"BinaryExpression": -1,
"BinaryExpressionOperator" : 1,
"BlockComment" : 1,
"CallExpression" : -1,
"CallExpressionOpeningParentheses" : 0,
"CallExpressionClosingParentheses" : -1,
"CatchParameterList" : 0,
"CatchOpeningBrace" : 1,
"CatchClosingBrace" : 1,
"CatchKeyword" : 1,
"CommaOperator" : 0,
"ClassDeclarationOpeningBrace" : 1,
"ClassDeclarationClosingBrace" : 1,
"ConditionalExpressionConsequent" : 1,
"ConditionalExpressionAlternate" : 1,
"DoWhileStatementOpeningBrace" : 1,
"DoWhileStatementClosingBrace" : 1,
"DoWhileStatementConditional" : 1,
"EmptyStatement" : 0,
"ExpressionClosingParentheses": 0,
"FinallyKeyword" : -1,
"FinallyOpeningBrace" : 1,
"FinallyClosingBrace" : 1,
"ForInStatement" : 1,
"ForInStatementExpressionOpening" : 1,
"ForInStatementExpressionClosing" : 0,
"ForInStatementOpeningBrace" : 1,
"ForInStatementClosingBrace" : 1,
"ForOfStatement" : 1,
"ForOfStatementExpressionOpening" : 1,
"ForOfStatementExpressionClosing" : 0,
"ForOfStatementOpeningBrace" : 1,
"ForOfStatementClosingBrace" : 1,
"ForStatement" : 1,
"ForStatementExpressionOpening" : 1,
"ForStatementExpressionClosing" : 0,
"ForStatementOpeningBrace" : 1,
"ForStatementClosingBrace" : -1,
"ForStatementSemicolon" : 0,
"FunctionDeclarationOpeningBrace" : 1,
"FunctionDeclarationClosingBrace" : 1,
"FunctionExpressionOpeningBrace" : 1,
"FunctionExpressionClosingBrace" : 1,
"FunctionGeneratorAsterisk": 1,
"FunctionName" : 1,
"IIFEClosingParentheses" : 0,
"IfStatementConditionalOpening" : 1,
"IfStatementConditionalClosing" : 0,
"IfStatementOpeningBrace" : 1,
"IfStatementClosingBrace" : -1,
"ModuleSpecifierClosingBrace": 1,
"ElseStatementOpeningBrace" : 1,
"ElseStatementClosingBrace" : -1,
"ElseIfStatementOpeningBrace" : 1,
"ElseIfStatementClosingBrace" : -1,
"LineComment" : 1,
"LogicalExpressionOperator" : 1,
"MemberExpressionOpening": 0,
"MemberExpressionClosing" : -1,
"MemberExpressionPeriod": 0,
"ObjectExpressionOpeningBrace": -1,
"ObjectExpressionClosingBrace": -1,
"ObjectPatternOpeningBrace": -1,
"ObjectPatternClosingBrace": -1,
"ObjectPatternComma": 0,
"Property" : -1,
"PropertyValue" : 1,
"ParameterComma" : -1,
"ParameterList" : 0,
"SwitchDiscriminantOpening" : 1,
"SwitchDiscriminantClosing" : -1,
"SwitchCaseColon": 0,
"ThrowKeyword": -1,
"TryKeyword": -1,
"TryOpeningBrace" : 1,
"TryClosingBrace" : -1,
"UnaryExpressionOperator": -1,
"VariableName" : -1,
"VariableValue" : 1,
"VariableDeclarationSemiColon" : 0,
"WhileStatementConditionalOpening" : -1,
"WhileStatementConditionalClosing" : -1,
"WhileStatementOpeningBrace" : -1,
"WhileStatementClosingBrace" : -1
},
"after" : {
"AssignmentPattern" : 1,
"ArrayExpressionOpening" : -1,
"ArrayExpressionClosing" : -1,
"ArrayExpressionComma" : 1,
"ArrayPatternOpening": 0,
"ArrayPatternClosing": 1,
"ArrayPatternComma": 1,
"ArrowFunctionExpressionArrow": 1,
"ArrowFunctionExpressionOpeningBrace": 0,
"ArrowFunctionExpressionClosingBrace": 0,
"ArgumentComma" : 1,
"ArgumentList" : 0,
"AssignmentOperator" : 1,
"BinaryExpression": -1,
"BinaryExpressionOperator" : 1,
"BlockComment" : -1,
"CallExpression" : -1,
"CallExpressionOpeningParentheses" : -1,
"CallExpressionClosingParentheses" : -1,
"CatchParameterList" : -1,
"CatchOpeningBrace" : -1,
"CatchClosingBrace" : -1,
"CatchKeyword" : -1,
"ClassDeclarationOpeningBrace" : 1,
"ClassDeclarationClosingBrace" : 1,
"CommaOperator" : 1,
"ConditionalExpressionConsequent" : 1,
"ConditionalExpressionTest" : 1,
"DoWhileStatementOpeningBrace" : -1,
"DoWhileStatementClosingBrace" : -1,
"DoWhileStatementBody" : -1,
"EmptyStatement" : -1,
"ExpressionOpeningParentheses" : 0,
"FinallyKeyword" : -1,
"FinallyOpeningBrace" : -1,
"FinallyClosingBrace" : -1,
"ForInStatement" : -1,
"ForInStatementExpressionOpening" : -1,
"ForInStatementExpressionClosing" : -1,
"ForInStatementOpeningBrace" : -1,
"ForInStatementClosingBrace" : -1,
"ForStatement" : -1,
"ForStatementExpressionOpening" : -1,
"ForStatementExpressionClosing" : -1,
"ForStatementClosingBrace" : -1,
"ForStatementOpeningBrace" : -1,
"ForStatementSemicolon" : -1,
"FunctionReservedWord": 1,
"FunctionName" : 0,
"FunctionExpressionOpeningBrace" : 1,
"FunctionExpressionClosingBrace" : -1,
"FunctionDeclarationOpeningBrace" : 1,
"FunctionDeclarationClosingBrace" : -1,
"IIFEOpeningParentheses" : 0,
"IfStatementConditionalOpening" : 0,
"IfStatementConditionalClosing" : -1,
"IfStatementOpeningBrace" : -1,
"IfStatementClosingBrace" : 1,
"ModuleSpecifierOpeningBrace": 1,
"ElseStatementOpeningBrace" : -1,
"ElseStatementClosingBrace" : -1,
"ElseIfStatementOpeningBrace" : -1,
"ElseIfStatementClosingBrace" : -1,
"MemberExpressionOpening" : -1,
"MemberExpressionClosing": 0,
"MemberExpressionPeriod": 0,
"MethodDefinitionName" : 0,
"LogicalExpressionOperator" : 1,
"ObjectExpressionOpeningBrace": -1,
"ObjectExpressionClosingBrace": -1,
"ObjectPatternOpeningBrace": -1,
"ObjectPatternClosingBrace": -1,
"ObjectPatternComma": 1,
"PropertyName" : 0,
"PropertyValue" : -1,
"ParameterComma" : 1,
"ParameterList" : 0,
"SwitchDiscriminantOpening" : -1,
"SwitchDiscriminantClosing" : 1,
"ThrowKeyword": -1,
"TryKeyword": -1,
"TryOpeningBrace" : -1,
"TryClosingBrace" : -1,
"UnaryExpressionOperator": -1,
"VariableName" : 1,
"VariableValue" : 0,
"VariableDeclarationSemiColon": -1,
"WhileStatementConditionalOpening" : -1,
"WhileStatementConditionalClosing" : -1,
"WhileStatementOpeningBrace" : -1,
"WhileStatementClosingBrace" : -1
}
},
"jsx": {
"formatJSX": true,
"attrsOnSameLineAsTag": false,
"maxAttrsOnTag": 3,
"firstAttributeOnSameLine": false,
"alignWithFirstAttribute": false,
"spaceInJSXExpressionContainers": "",
"htmlOptions": {
"brace_style": "collapse",
"indent_char": " ",
"indent_size": 2,
"max_preserve_newlines": 2,
"preserve_newlines": true
}
},
"plugins": [
"esformatter-quotes",
"esformatter-literal-notation",
"esformatter-spaced-lined-comment",
"esformatter-semicolons",
"esformatter-semicolon-first",
"esformatter-jsx"
],
"quotes": {
"type": "double",
"avoidEscape": true
}
}

174
README.md
View File

@ -38,7 +38,7 @@ 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) (≥ 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.4.4) and `make` are runnable in your terminal.
1. Ensure that [`nodejs`](http://nodejs.org) (≥ 6.0), [`ttfautohint`](http://www.freetype.org/ttfautohint/), [`otfcc`](https://github.com/caryll/otfcc) (≥ 0.4.4) 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`. If youve installed them, upgrade to the latest.
3. `make`.
@ -54,24 +54,36 @@ The `webfonts/` directory is used to build Iosevka for web font uses. To build t
1. Build Iosevka.
2. Ensure that `sfnt2woff` and `woff2_compress` are installed and runnable.
3. `make webfonts`.
3. Run `make web` .
The web fonts will be generated into `dist/webfonts`.
The web fonts will be generated into `dist/iosevka/web` and `dist/iosevka-slab/web`.
## Build Your Own Style
![Styles Preview](https://raw.githubusercontent.com/be5invis/Iosevka/master/images/variants.png)
Iosevka comes with several visual styles, however they are inactive using the default build. To build these variants you should use style variables in the `make` procedure:
Iosevka comes with several visual styles, however they are inactive using the default build. To build these variants, you should perform custom build:
* `STYLE_COMMON` for both uprights and italics,
* `STYLE_UPRIGHT` for upright and oblique, and
* `STYLE_ITALIC` for itaics only.
1. `make custom-config [set=<name>]` with the parameters listed below to create a configuration. The `set=<name>` part is optional, it will be set to `custom` when absent.
2. `make custom [set=<name>]` to acquire your custom font.
- `make custom-web [set=<name>]` is for web fonts.
You can add arbitary styles for these variables, for example, `make STYLE_UPRIGHT='v-l-zshaped v-i-zshaped'` to create a variant with Z-shaped letter `l` and `i` for uprights.
The first step, `make custom-config` takes following parameters to set styles of your custom build. All of them are optional, and would default to Iosevkas default configuration:
* `design='<styles>'`, styles for your custom font set.
* `upright='<styles>'`, styles for uprights only.
* `italic='<styles>'`, styles for italics only.
* `oblique='<styles>'`, styles for obliques only.
You can add arbitary styles for these variables, for example, `make custom-config upright='v-l-zshaped v-i-zshaped' && make custom` will create a variant with Z-shaped letter `l` and `i` for uprights.
The current avaliable styles are:
* Styles for general shape:
* `sans` : Sans serif (default).
* `slab` : Slab serif. When present, the family of your font would be `Iosevka Slab`.
* Styles related to ligations
- `term` : Disable ligations. When this style is present, the font built will not contain ligatures, and its family name will be set to `Iosevka Term`. In case of your OS or editor cannot handle ligatures correctly, you can disable ligations with it.
* Styles for letter `l`:
* `v-l-hooky` : Hooky `l`.
* `v-l-zshaped` : Z-shaped `l`.
@ -117,151 +129,5 @@ The current avaliable styles are:
* Styles for curly brackets ({})
* `v-brace-straight` : More straight braces.
* `v-brace-curly` : More curly braces (default).
* Styles related to ligations
* `term` : Disable ligations. When this style is present, the font built will not contain ligatures, and its family name will be set to `Iosevka Term`. In case of your OS or editor cannot handle ligatures correctly, you can disable ligations using it.
## Release Notes
* **1.10.5**
- Added a Sulzbacher-style Eszet (`ß`), assigned to `cv35`/`v-eszet-sulzbacher`. The old, traditional Eszet is assigned to `cv34`/`v-eszet-traditional`.
- Made braces more curly. It is assigned to `cv37`/`v-brace-curly`. The old straight braces are assigned to `cv36`/`v-brace-straight`.
- Added several symbols.
- Fixed incorrect shapes of /capitalTurnm (`Ɯ`), /lrtail(`ɭ`) and /suplrtail (`ᶩ`).
* **1.10.4**
- Added feature tag for ML (`XML_`), Idris (`XIDR`), F# (`XFS_`), F\* (`XFST`), Elm (`XELM`), PureScript (`PURS`), Swift (`SWFT`) and Coq (`XV__`).
- Added ligation for `/\` and `\/`.
- Added arbitary-length ligations, like `***********>` or `<-------------`.
* **1.10.3**
- Improved ligations, including `<*>`, etc.
* **1.10.2**
- Complete APL Support.Optimize shape of overlay symbols.
* **1.10.1**
- Add APL symbols.
* **1.10.0**
- Added `cv29` and `cv30` for `^`.
- Added two new `@` glyphs, assigned to `cv32` and `cv33`, while the old `@` is assigned to `cv31`.
- Made `S` and `$` more distinctive.
* **1.9.6**
- Make the font conformal with MS FontVal.
- Make backslash less slant.
* **1.9.5**
- Fixed the bug that FireFox reject to display.
* **1.9.4**
- Add two styles of `l`.
* **1.9.3**
- Minor symbol additions.
* **1.9.2**
- Added short-legged `m` (assigned to `cv26`).
* **1.9.1**
- Added /latinayin.
- Added more symbols.
* **1.9.0**
- Added open double-storey `g` (assigned to `cv24`).
- Redesigned single-storey `a`.
- Reassigned the `ss**` styles. Now they are designed to simulate existing fonts.
* **1.8.6**
- Added Bulgarian and Macedonian Cyrillic variants
- Added ligations about colons
* **1.8.5**
- Added `XHS_` and `XPTL` feature tags for Language-Specific ligations.
- Added `/bolt`, `/blackflag`, `/circlestar` and `/heavyballotcross` symbols.
* **1.8.4**
- Added `opbd` feature for punctuation compression.
* **1.8.3**
- Added Kome symbol (`※`).
- Reorganized pre-built release packages. The “IosevkaNL” is renamed to “Iosevka Term”.
* **1.8.2**
- Iosevka now provides a new variant family “IosevkaNL”, with ligation disabled to avoid typesetting issues under some Linux environments.
* **1.8.1**
- Added more ligations.
- Fixed the incorrectly-sized symbol `∞` in the CC variants.
* **1.8.0**
- Added a lower paragraph symbol (`¶`) shape, and two OpenType features (`cv22` and `cv23`) to enable them.
- Most mathematical operators, like `≤`, will be full-width in the CC variants.
- Added experimental ligatures support. Currently the ligatures are assigned to feature “`calt`” and contains these figures only: `-> --> <- <-- <-> <!--` . Note that Iosevka does not contain "real" ligature glyphs, these figures are implemented using chained substitution and long dashes.
* **1.7.5**
- Reduced the weight of Bold, and increased the size of periods of Medium.
* **1.7.4**
- The lower tilde (`~`) is used by default.
- Added slanted inequality symbol (U+2A7D and U+2A7E) and corrected the shape of `≤` and `≥`.
* **1.7.3**
- Optimize the shapes of three-like glyphs, including `3`, `ε` and `з`.
* **1.7.2**
- Entallen upright letter `f`.
- Reverted shape of `π` to the 1.3.x.
- Added `Ѧ` and `Ѫ`.
* **1.7.1**
- Fixed incorrect outline of braced glyphs under heavy weights.
* **1.7.0**
- Added more tie marks and combining marks.
- Fixed the incorrect weights created by `[turned]` and `[composite]`.
* **1.6.3**
- Fixed the missing vertical stroke of `¬`.
- Fixed the dot position of `ij`.
- Added several combining marks : `o͐`, `o͚`, etc.
- Redesigned the tilde `~` for better consistency.
* **1.6.2**
- Added braced letters and numbers, like `⑴` and `⒜`.
- Added several Greek letterforms, including `Ϸ` and `ϸ`.
- Rebuild the script into [sketch]es.
* **1.6.1**
- Added `ꭤ` U+AB64, `Ɑ` U+2C6D, `Ɒ` U+2C70, `ꬰ` U+AB30, etc.
* **1.6.0**
- Fixed the broken `Æ` at thin weights.
- Increased the length of the bottom serif in `T`.
- Made `Ђ` and `Ћ` wider to balance Cyrillic letters.
* **1.5.5**
- Adjusted the outlines of `f`, `2` and `&`, as well as full-width symbol `~`.
* **1.5.4**
- Fixed the distortion of letter `s` under several situations, for example, full-width.
* **1.5.3**
- Fixed the slanted bottom tip of `y` in Slab oblique.
* **1.5.2**
- Told OS X not to increase line height for bold weights.
- Pushed the `i` and `l` undef hooky variants rightward slightly.
* **1.5.1**
- Added `cv20` and `cv21` for underscore variants (https://github.com/be5invis/Iosevka/pull/44)
- Reorganized `ss01`, `ss02` and `ss03`. The less-frequent style (`cv04` and `cv08`) is moved to `ss03`, while `ss01` is for hooky shapes.
* **1.5.0**
- The new "fairizer" now replaces FontForge's outline simplification. It will create smooth and fair outline curves now.
- Introduced centered asterisk (`*`) and tilde (`~`). They can be enabled by OpenType features `ss10`.
- `cv**` and `ss**` features introduced in 1.4.0 now supports accented letters.
* **1.4.3**
- Added the "oblique" variant.
- Corrected the stroke width in italic variants. It will reduce the file size of italics and improve its outline quality.
* **1.4.2**
- The shape of lowercase `y` is improved. Its slab version is redesigned.
- Rebalanced italic `l` and `i`.
- Enwiden `/t`.
* **1.4.1**
- Fixed the incorrectly-shaped `/nine` in the thin variant.
- Fixed the broken serif of `/yhooktop`.
* **1.4.0**
- Added five new weights: *thin*, *extralight*, *light*, *medium* and *heavy*.
- Shape optimizations for MANY letters, including `/s`, `/r`, `/a`, `/beta`, `/cyryeri` and their derived characters.
* **1.3.0**
- Shape optimizations: `/f`, `/r`, `/a`, `/s`, `/epsilon`, `/cyrze` and their derived glyphs.
- Narrowed slab-serif variants.
- Added `/overlineTieAbove`, `/underlineTieBelow` and `/turnTieAbove`.
* **1.2.0**
- Glyphs added: `/cyrGhayn`, `/cyrghayn`, `/cyrChevbar`, `/cyrchevbar`, `/turnoe`, `/voicedlaryngenalspirant`, `/oupperhalf`, `/olowerhalf` and their derived glyphs.
- Shape optimization: `/eight`, `/propto`, `/J`, `/j`, `/epsilon`, `/cyrze`, `/taillessphi`, `/smcpPsi` and their derived glyphs.
- Added the missing marks of `/longs`.
- Introduced a new SVG-based outline exporting mechanism. Now I am finally free from the rounding nightmare.
* **1.1.2**
- Improved the balancing of `/longs`, `/f` and `/eszet`.
- The strokes of `/A`, `/V` and `/v` in Iosevka Slab is straightened.
* **1.1.1**
- Added the missing serifs for `/cyrdzhe`.
- Balanced `/pi` in bold weights.
- Moved the descender lines of Cyrillic letters rightward a little in italics.
* **1.1.0**
- Enwiden the boldfaces. This will improve the consistency between regular and bold weights.
- The curves in `/xi` are optimized.
* **1.0.2**
- Fixed the incorrect `/yhooktop`.
- The digaphs defined in Unicode is now single-width.
- Reorganized subfamilies: Now the default Iosevka does not contain full-width glyphs any more.
![Family Matrix](https://raw.githubusercontent.com/be5invis/Iosevka/master/images/matrix.png)

View File

@ -8,10 +8,15 @@ var parameters = require("./parameters");
var toml = require("toml");
var Glyph = require("./support/glyph");
var autoref = require("./support/autoref");
var caryllShapeOps = require("caryll-shapeops");
var c2q = require("otfcc-c2q");
function hasv(obj) {
if (!obj) return false;
for (var k in obj) if (obj[k]) return true;
for (var k in obj)
if (obj[k]) return true;
return false;
}
@ -29,7 +34,13 @@ var font = function () {
font.glyf = font.glyf.sort(function (a, b) {
var pri1 = a.cmpPriority || 0;
var pri2 = b.cmpPriority || 0;
return (pri2 !== pri1 ? pri2 - pri1 : a.contours.length !== b.contours.length ? a.contours.length - b.contours.length : (a.unicode && b.unicode && a.unicode[0] !== b.unicode[0]) ? a.unicode[0] - b.unicode[0] : (a.name < b.name) ? (-1) : (a.name > b.name) ? 1 : 0);
if (a.contours && b.contours && a.contours.length < b.contours.length) return 1;
if (a.contours && b.contours && a.contours.length > b.contours.length) return (-1);
if (a.unicode && a.unicode[0] && !b.unicode || !b.unicode[0]) return (-1);
if (b.unicode && b.unicode[0] && !a.unicode || !a.unicode[0]) return (+1);
if (a.unicode && a.unicode[0] && b.unicode && b.unicode[0] && a.unicode[0] < b.unicode[0]) return (-1);
if (a.unicode && a.unicode[0] && b.unicode && b.unicode[0] && a.unicode[0] > b.unicode[0]) return (+1);
return (a.name < b.name) ? (-1) : (a.name > b.name) ? 1 : 0;
});
return font;
}();
@ -41,75 +52,84 @@ if (argv.charmap) {
return [
glyph.name,
glyph.unicode,
glyph.advanceWidth === 0 ? hasv(glyph.anchors) ? 1 : (glyph.contours && glyph.contours.length) ? 2 : 0 : 0
glyph.advanceWidth === 0 ? (hasv(glyph.anchors) ? 1 : (glyph.contours && glyph.contours.length) ? 2 : 0) : 0
];
})), "utf8");
})();
}
if (argv.svg) {
(function () {
console.log(" Writing outline as SVG -> " + argv.svg);
var foundNaN = false;
var glyfname = "";
function mix(a, b, p) { return a + (b - a) * p; }
function toSVGPath(glyph) {
var buf = "";
foundNaN = false;
glyfname = glyph.name;
if (glyph.contours) for (var j = 0; j < glyph.contours.length; j++) {
buf += Glyph.contourToSVGPath(glyph.contours[j], false);
}
return buf;
}
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 + '">';
var skew = (argv.uprightify ? 1 : 0) * Math.tan((font.post.italicAngle || 0) / 180 * Math.PI);
var scale = (argv.upm || 1000) / 1000;
svg += '<font-face font-family="' + font.name.fontFamily
+ '" font-weight="' + font.OS_2.usWeightClass
+ '" font-stretch="normal" units-per-em="'
+ (1000 * scale) + '"/>';
for (var j = 0; j < font.glyf.length; j++) {
var g = font.glyf[j];
if (g.contours) {
for (var k = 0; k < g.contours.length; k++) {
var contour = g.contours[k];
for (var p = 0; p < contour.length; p++) {
contour[p].x += contour[p].y * skew;
contour[p].x *= scale;
contour[p].y *= scale;
if (argv.o) {
console.log(" Writing output -> " + argv.o);
var o_glyf = {};
var cmap = {};
var skew = (argv.uprightify ? 1 : 0) * Math.tan((font.post.italicAngle || 0) / 180 * Math.PI);
// autoref
autoref(font.glyf);
// regulate
font.glyf.forEach((g) => {
if (g.contours) {
for (var k = 0; k < g.contours.length; k++) {
var contour = g.contours[k];
for (var p = 0; p < contour.length; p++) {
contour[p].x += contour[p].y * skew;
if (contour[p].on) {
contour[p].x = Math.round(contour[p].x);
}
}
var offJ = null, mx = null;
for (var p = 0; p < contour.length; p++) {
if (contour[p].on) {
if (offJ) {
var origx = contour[p].x;
var rx = Math.round(contour[p].x * 4) / 4;
var origx0 = mx;
var rx0 = contour[offJ - 1].x;
if (origx != origx0) {
for (var poff = offJ; poff < p; poff++) {
contour[poff].x = (contour[poff].x - origx0) / (origx - origx0) * (rx - rx0) + rx0;
}
}
}
mx = contour[p].x;
contour[p].x = Math.round(contour[p].x * 4) / 4;
offJ = p + 1;
}
}
g.advanceWidth *= scale;
Glyph.prototype.cleanup.call(g, 0.25);
}
var gd = "<" + (j === 0 ? "missing-glyph" : "glyph")
+ ' glyph-name="' + g.name
+ '" horiz-adv-x="' + g.advanceWidth + '" '
+ (g.unicode && g.unicode.length ? 'unicode="&#x' + g.unicode[0].toString(16) + ';"' : "")
+ ' d="' + toSVGPath(g) + '" />\n';
svg += gd;
var c1 = [];
for (var k = 0; k < g.contours.length; k++) {
c1.push(Glyph.contourToStandardCubic(g.contours[k]));
}
g.contours = c1;
}
svg += "</font></defs></svg>";
fs.writeFileSync(argv.svg, svg, "utf-8");
})();
}
});
// overlap removal
font.glyf.forEach((g) => {
if (g.contours) {
g.contours = caryllShapeOps.removeOverlap(g.contours, 1, 2048, true);
}
});
// finalize
font.glyf.forEach((g) => {
if (g.contours) {
Glyph.prototype.cleanup.call(g, 0.25);
g.contours = c2q.contours(g.contours);
for (var k = 0; k < g.contours.length; k++) {
var contour = g.contours[k];
for (var p = 0; p < contour.length; p++) {
contour[p].x -= contour[p].y * skew;
}
}
}
o_glyf[g.name] = g;
if (g.unicode && g.unicode.length) {
cmap[g.unicode[0]] = g.name;
}
});
if (argv.meta) {
(function () {
console.log(" Writing metadata as JSON -> " + argv.meta);
if (argv.svg) {
font.glyf = null;
font.glyfMap = null;
}
fs.writeFileSync(argv.meta, JSON.stringify(font));
})();
font.glyf = o_glyf;
font.cmap = cmap;
font.glyfMap = null;
fs.writeFileSync(argv.o, JSON.stringify(font));
}

View File

@ -81,33 +81,35 @@ export : define [apply] : begin
apply-transform : Translate 0 (spacing / 2)
apply-transform : Italify
# Full-width derivatives
define [fwl newid unicode id] : create-glyph [fallback newid : 'fwl' + id] : glyph-construction
define [fwl newid unicode id shift] : create-glyph [fallback newid : 'fwl' + id] : glyph-construction
if unicode : assign-unicode unicode
include glyphs.(id)
set-width FULLWIDTH
apply-transform : Translate [fallback shift 0] 0
define [fwr newid unicode id] : create-glyph [fallback newid : 'fwr' + id] : glyph-construction
define [fwr newid unicode id shift] : create-glyph [fallback newid : 'fwr' + id] : glyph-construction
if unicode : assign-unicode unicode
include glyphs.(id)
set-width FULLWIDTH
apply-transform : Translate (FULLWIDTH - WIDTH) 0
apply-transform : Translate (FULLWIDTH - WIDTH + [fallback shift 0]) 0
define [dwl newid unicode id] : create-glyph [fallback newid : 'dwl' + id] : glyph-construction
define [dwl newid unicode id shift] : create-glyph [fallback newid : 'dwl' + id] : glyph-construction
if unicode : assign-unicode unicode
include glyphs.(id)
set-width UPM
apply-transform : Translate [fallback shift 0] 0
define [dwr newid unicode id] : create-glyph [fallback newid : 'dwr' + id] : glyph-construction
define [dwr newid unicode id shift] : create-glyph [fallback newid : 'dwr' + id] : glyph-construction
if unicode : assign-unicode unicode
include glyphs.(id)
set-width UPM
apply-transform : Translate (UPM - WIDTH) 0
apply-transform : Translate (UPM - WIDTH + [fallback shift 0]) 0
define [dwc newid unicode id] : create-glyph [fallback newid : 'dwc' + id] : glyph-construction
define [dwc newid unicode id shift] : create-glyph [fallback newid : 'dwc' + id] : glyph-construction
if unicode : assign-unicode unicode
include glyphs.(id)
set-width UPM
apply-transform : Translate ((UPM - WIDTH) / 2) 0
apply-transform : Translate ((UPM - WIDTH) / 2 + [fallback shift 0]) 0
@ -193,10 +195,7 @@ export : define [apply] : begin
local mt : [mix left RIGHTSB 0.5] + (st - CORRECTION_OMIDX) * STROKE
local mb : [mix left RIGHTSB 0.5] + (sb + CORRECTION_OMIDX) * STROKE
include : dispiro
widths.lhs
g4 (mt) (top - O) [heading {.y (-1) .x (-st)}]
archv
flat (left + (STROKE - fine) * HVCONTRAST) (top - SMALLSMOOTHA) [widths fine 0]
flat (left + (STROKE - fine) * HVCONTRAST) (top - SMALLSMOOTHA - 0.01) [widths fine 0]
curl (left + (STROKE - fine) * HVCONTRAST) (0 + SMALLSMOOTHB) [widths fine 0]
arcvh
g4 (mb) O [widths.heading STROKE 0 {.y (1) .x (-sb)}]
@ -204,7 +203,10 @@ export : define [apply] : begin
[if ((SMALLSMOOTHA + SMALLSMOOTHB) / top > 0.75) flat.ai flat] (RIGHTSB - OX) (0 + SMALLSMOOTHA)
[if ((SMALLSMOOTHA + SMALLSMOOTHB) / top > 0.75) curl.ai curl] (RIGHTSB - OX) (top - SMALLSMOOTHB)
arcvh
close
g4 (mt) (top - O) [widths.heading STROKE 0 {.y (-1) .x (-st)}]
archv
flat (left + (STROKE - fine) * HVCONTRAST) (top - SMALLSMOOTHA) [widths fine 0]
curl (left + (STROKE - fine) * HVCONTRAST) (top - SMALLSMOOTHA - 0.01) [widths fine 0]
define [OBarRightShape top right] : glyph-construction
include : create-glyph [OBarLeftShape top (WIDTH - [fallback right RIGHTSB])]

View File

@ -2564,11 +2564,11 @@ export : define [apply] : begin
save 'cyrtshe' 0x45B
### F
define [FShape top y] : glyph-construction
define [FShape top y noserif] : glyph-construction
include : VBarLeft (SB * 1.5) 0 [fallback top CAP]
include : HBarTop (SB * 1.5 - O) RIGHTSB [fallback top CAP]
include : HBar (SB * 1.5 - O) (RIGHTSB - [Math.max HALFSTROKE ((RIGHTSB - SB) * 0.15)] - [if SLAB (STROKE * 0.25) 0]) ([fallback top CAP] * [fallback y [if SLAB 0.52 0.54]])
if SLAB : begin
if (SLAB && !noserif) : begin
include : LeftwardTopSerif (SB * 1.5) [fallback top CAP] SIDEJUT
include : CenterBottomSerif (SB * 1.5 + HALFSTROKE * HVCONTRAST) 0 JUT
tag-contour 'serifBottom'
@ -2778,9 +2778,13 @@ export : define [apply] : begin
### E
define [EShape top] : glyph-construction
include : FShape top
include : FShape top nothing true
include : HBarBottom (SB * 1.5 - O) RIGHTSB 0
if SLAB : begin
include : LeftwardTopSerif (SB * 1.5) [fallback top CAP] SIDEJUT
include : CenterBottomSerif (SB * 1.5 + HALFSTROKE * HVCONTRAST) 0 JUT
tag-contour 'serifBottom'
include : DownwardRightSerif RIGHTSB [fallback top CAP] VJUT
include : LeftwardBottomSerif (SB * 1.5) 0 SIDEJUT
include : UpwardRightSerif RIGHTSB 0 VJUT

View File

@ -1338,7 +1338,8 @@ export : define [apply] : begin
do
local ymiddle : [mix 0 CAP 0.5] - HALFSTROKE
local xmiddle : RIGHTSB - ymiddle / 2 - STROKE * 0.75
local xfinal : Math.min (RIGHTSB - ymiddle / 2 - HALFSTROKE - 1 - STROKE * TANSLANT) (SB + STROKE * 1.75)
local xfinal : Math.min (RIGHTSB - ymiddle / 2 - HALFSTROKE - 1 - STROKE * TANSLANT)
Math.max (SB + STROKE * 2) [mix SB RIGHTSB (1 / 4)]
sketch # eszet
set-width WIDTH
include markset.if

View File

@ -138,12 +138,20 @@ export : define [apply] : begin
sketch # six
include markset.capital
include : OShape (CAP * 0.6) 0 SB RIGHTSB
local ymiddlea : (CAP * 0.6 - SMALLSMOOTHA + SMALLSMOOTHB) / 2
local top (CAP * 0.6)
local ymiddlea : (top - SMALLSMOOTHA + SMALLSMOOTHB) / 2
local ymiddleb : (top - SMALLSMOOTHB + SMALLSMOOTHA) / 2
include : dispiro
widths.rhs
g4.up.start (SB + OX) ymiddlea
g4.up.start (SB + OX + STROKE * 0.5 * HVCONTRAST) ymiddlea [widths.heading 0 (STROKE * 0.5) UPWARD]
arcvh
g4 (MIDDLE - CORRECTION_OMIDS) (top - O) [widths.rhs]
archv
g4.down.mid (RIGHTSB - OX) ymiddleb
arcvh
g4 (MIDDLE + CORRECTION_OMIDS) (O)
archv
g4.up.mid (SB + OX) ymiddlea
quadcontrols 0 0.8
g4 ([mix SB RIGHTSB 0.85] - HALFSTROKE * HVCONTRAST) CAP
save 'six' '6'

View File

@ -33,22 +33,14 @@ export : define [apply] : begin
save 'emsp' 0x2003
### 'Brackets'
local parenOutside 0.15
local parenInside 0.65
local bracketOutside 0.15
local bracketInside 0.9
local braceOutside 0.1
local braceInside 0.9
sketch # parenLeft
local p 0.6
include : dispiro
widths.lhs
g4 [mix SB RIGHTSB parenInside] parenTop
quadcontrols 1 (1 - p)
g4 [mix SB RIGHTSB parenOutside] parenMid
quadcontrols 0 p
g4 [mix SB RIGHTSB parenInside] parenBot
g4 [mix SB RIGHTSB designParameters.parenInside] [mix parenMid parenTop (1 + designParameters.parenOvershoot)]
quadcontrols 1 (1 - designParameters.parenCurliness)
g4 [mix SB RIGHTSB designParameters.parenOutside] parenMid
quadcontrols 0 designParameters.parenCurliness
g4 [mix SB RIGHTSB designParameters.parenInside] [mix parenMid parenBot (1 + designParameters.parenOvershoot)]
save 'parenLeft' '('
sketch # parenRight
@ -57,9 +49,12 @@ export : define [apply] : begin
save 'parenRight' ')'
sketch # bracketLeft
include : HBarBottom [mix SB RIGHTSB bracketOutside] [mix SB RIGHTSB bracketInside] parenBot
include : HBarTop [mix SB RIGHTSB bracketOutside] [mix SB RIGHTSB bracketInside] parenTop
include : VBarLeft [mix SB RIGHTSB bracketOutside] parenBot parenTop
local l : mix SB RIGHTSB designParameters.bracketOutside
local r : mix SB RIGHTSB designParameters.bracketInside
include : HBarBottom l r parenBot
include : HBarTop l r parenTop
include : VBarLeft l parenBot parenTop
save 'bracketLeft' '['
sketch # bracketRight
@ -68,48 +63,52 @@ export : define [apply] : begin
save 'bracketRight' ']'
sketch # braceLeft.straight
local parenCenter [mix SB RIGHTSB [mix braceInside braceOutside 0.5]]
local radius : [mix SB RIGHTSB braceInside] - parenCenter
local parenCenter [mix SB RIGHTSB [mix designParameters.braceInside designParameters.braceOutside 0.5]]
local radius : [mix SB RIGHTSB designParameters.braceInside] - parenCenter
local top : mix parenMid parenTop (1 + designParameters.braceOvershoot)
local bot : mix parenMid parenBot (1 + designParameters.braceOvershoot)
include : dispiro
straight.left.start [mix SB RIGHTSB braceInside] (parenTop - HALFSTROKE) [widths.heading HALFSTROKE HALFSTROKE LEFTWARD]
straight.left.start [mix SB RIGHTSB designParameters.braceInside] (top - HALFSTROKE) [widths.heading HALFSTROKE HALFSTROKE LEFTWARD]
archv
flat parenCenter (parenTop - radius) [heading DOWNWARD]
flat parenCenter (top - radius) [heading DOWNWARD]
curl parenCenter (parenMid + radius) [heading DOWNWARD]
arcvh
straight.left.end [mix SB RIGHTSB braceOutside] parenMid [heading LEFTWARD]
straight.left.end [mix SB RIGHTSB designParameters.braceOutside] parenMid [heading LEFTWARD]
include : dispiro
straight.left.start [mix SB RIGHTSB braceInside] (parenBot + HALFSTROKE) [widths.heading HALFSTROKE HALFSTROKE LEFTWARD]
straight.left.start [mix SB RIGHTSB designParameters.braceInside] (bot + HALFSTROKE) [widths.heading HALFSTROKE HALFSTROKE LEFTWARD]
archv
flat parenCenter (parenBot + radius) [heading UPWARD]
flat parenCenter (bot + radius) [heading UPWARD]
curl parenCenter (parenMid - radius) [heading UPWARD]
arcvh
straight.left.end [mix SB RIGHTSB braceOutside] parenMid [heading LEFTWARD]
straight.left.end [mix SB RIGHTSB designParameters.braceOutside] parenMid [heading LEFTWARD]
save 'braceLeft.straight'
sketch # braceLeft.curly
local xIns : mix SB RIGHTSB [mix braceOutside braceInside 1]
local xOus : mix SB RIGHTSB [mix braceInside braceOutside 1]
local m1 : mix SB RIGHTSB [mix braceInside braceOutside 0.6]
local m2 : mix SB RIGHTSB [mix braceInside braceOutside 0.45]
local xIns : mix SB RIGHTSB [mix designParameters.braceOutside designParameters.braceInside 1]
local xOus : mix SB RIGHTSB [mix designParameters.braceInside designParameters.braceOutside 1]
local m1 : mix SB RIGHTSB [mix designParameters.braceInside designParameters.braceOutside designParameters.braceCurlyM1]
local m2 : mix SB RIGHTSB [mix designParameters.braceInside designParameters.braceOutside designParameters.braceCurlyM2]
local braceRadiusLowLimit : (parenTop - parenMid - STROKE) * (1 / 3) + HALFSTROKE
local radius1 : Math.min (xIns - m1) braceRadiusLowLimit
local radius2 : [Math.min (m2 - xOus) braceRadiusLowLimit] - HALFSTROKE
local ess : mix STROKE ESS 0.25
local top : mix parenMid parenTop (1 + designParameters.braceOvershoot)
local bot : mix parenMid parenBot (1 + designParameters.braceOvershoot)
include : dispiro
straight.left.start xIns (parenTop - HALFSTROKE) [widths.heading HALFSTROKE HALFSTROKE LEFTWARD]
straight.left.start xIns (top - HALFSTROKE) [widths.heading HALFSTROKE HALFSTROKE LEFTWARD]
archv
g4.down.mid m1 (parenTop - radius1) [heading DOWNWARD]
g4.down.mid m1 (top - radius1) [heading DOWNWARD]
alsothru 0.5 0.5 [widths (ess / 2) (ess / 2)]
g4.down.mid m2 (parenMid + radius2) [widths.heading HALFSTROKE HALFSTROKE DOWNWARD]
arcvh
straight.left.end xOus parenMid [heading LEFTWARD]
include : dispiro
straight.left.start xIns (parenBot + HALFSTROKE) [widths.heading HALFSTROKE HALFSTROKE LEFTWARD]
straight.left.start xIns (bot + HALFSTROKE) [widths.heading HALFSTROKE HALFSTROKE LEFTWARD]
archv
g4.up.mid m1 (parenBot + radius1) [heading UPWARD]
g4.up.mid m1 (bot + radius1) [heading UPWARD]
alsothru 0.5 0.5 [widths (ess / 2) (ess / 2)]
g4.up.mid m2 (parenMid - radius2) [widths.heading HALFSTROKE HALFSTROKE UPWARD]
arcvh
@ -129,15 +128,15 @@ export : define [apply] : begin
}
sketch # angleLeft
local fatten : Math.hypot 1 (([mix SB RIGHTSB : parenInside - parenOutside] - O) / (parenTop - parenMid))
local fatten : Math.hypot 1 (([mix SB RIGHTSB : designParameters.parenInside - designParameters.parenOutside] - O) / (parenTop - parenMid))
include : dispiro
widths.lhs OPERATORSTROKE
flat [mix SB RIGHTSB parenInside] parenTop
curl ([mix SB RIGHTSB parenOutside] + O) parenMid [widths.heading (OPERATORSTROKE * fatten) 0 DOWNWARD]
flat [mix SB RIGHTSB designParameters.parenInside] parenTop
curl ([mix SB RIGHTSB designParameters.parenOutside] + O) parenMid [widths.heading (OPERATORSTROKE * fatten) 0 DOWNWARD]
include : dispiro
widths.rhs OPERATORSTROKE
flat [mix SB RIGHTSB parenInside] parenBot
curl ([mix SB RIGHTSB parenOutside] + O) parenMid [widths.heading 0 (OPERATORSTROKE * fatten) UPWARD]
flat [mix SB RIGHTSB designParameters.parenInside] parenBot
curl ([mix SB RIGHTSB designParameters.parenOutside] + O) parenMid [widths.heading 0 (OPERATORSTROKE * fatten) UPWARD]
save 'angleLeft' 0x2329
alias 'mangleLeft' 0x27E8 'angleLeft'
@ -148,13 +147,13 @@ export : define [apply] : begin
dual 'dblangleRight' 0x27EB 'angleRight' (WIDTH * 0.35)
sketch # ceilingLeft
include : HBarTop [mix SB RIGHTSB bracketOutside] [mix SB RIGHTSB bracketInside] parenTop
include : VBarLeft [mix SB RIGHTSB bracketOutside] parenBot parenTop
include : HBarTop [mix SB RIGHTSB designParameters.bracketOutside] [mix SB RIGHTSB designParameters.bracketInside] parenTop
include : VBarLeft [mix SB RIGHTSB designParameters.bracketOutside] parenBot parenTop
save 'ceilingLeft' 0x2308
sketch # floorLeft
include : HBarBottom [mix SB RIGHTSB bracketOutside] [mix SB RIGHTSB bracketInside] parenBot
include : VBarLeft [mix SB RIGHTSB bracketOutside] parenBot parenTop
include : HBarBottom [mix SB RIGHTSB designParameters.bracketOutside] [mix SB RIGHTSB designParameters.bracketInside] parenBot
include : VBarLeft [mix SB RIGHTSB designParameters.bracketOutside] parenBot parenTop
save 'floorLeft' 0x230A
turned 'floorRight' 0x230B 'ceilingLeft' MIDDLE parenMid
turned 'ceilingRight' 0x2309 'floorLeft' MIDDLE parenMid
@ -958,8 +957,8 @@ export : define [apply] : begin
dwc nothing 0xFF1B 'semicolon'
dwl nothing 0xFF0C 'comma'
dwl nothing 0xFF0E 'period'
dwr nothing 0xFF08 'parenLeft'
dwl nothing 0xFF09 'parenRight'
dwr nothing 0xFF08 'parenLeft' (-WIDTH * 0.15)
dwl nothing 0xFF09 'parenRight' (WIDTH * 0.15)
local r : Math.max PERIODRADIUS (WIDTH * 0.225)
local ry : r * 0.25
@ -985,15 +984,13 @@ export : define [apply] : begin
branch
save 'cjkcomma' 0xFF64
local bracketOutside 0.05
local bracketInside 0.95
local cjkqd 0.75
local cjkqd2 0.97
local ideotop : para.ideoMid + (parenTop - parenMid)
local ideobot : para.ideoMid - (parenTop - parenMid)
sketch # cjkSingleQuoteLeft
include : HBarTop [mix SB RIGHTSB bracketOutside] [mix SB RIGHTSB bracketInside] [mix ideobot ideotop cjkqd2]
include : VBarLeft [mix SB RIGHTSB bracketOutside] [mix ideotop ideobot cjkqd] [mix ideobot ideotop cjkqd2]
include : HBarTop [mix SB RIGHTSB designParameters.bracketOutside] [mix SB RIGHTSB designParameters.bracketInside] [mix ideobot ideotop cjkqd2]
include : VBarLeft [mix SB RIGHTSB designParameters.bracketOutside] [mix ideotop ideobot cjkqd] [mix ideobot ideotop cjkqd2]
save 'cjkSingleQuoteLeft' 0xFF62
sketch # cjkSingleQuoteRight
include glyphs.cjkSingleQuoteLeft
@ -1003,8 +1000,8 @@ export : define [apply] : begin
sketch # cjkDoubleQuoteLeft
local sw : adviceBlackness 6
local dw : [Math.max (WIDTH * 0.175) [adviceBlackness 3.25]] + sw * 2
local outside : mix SB RIGHTSB bracketOutside
local inside : mix SB RIGHTSB bracketInside
local outside : mix SB RIGHTSB designParameters.bracketOutside
local inside : mix SB RIGHTSB designParameters.bracketInside
local top : mix ideobot ideotop cjkqd2
local bottom : mix ideotop ideobot cjkqd

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 KiB

After

Width:  |  Height:  |  Size: 417 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 304 KiB

After

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 764 KiB

After

Width:  |  Height:  |  Size: 765 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 358 KiB

After

Width:  |  Height:  |  Size: 355 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: 265 KiB

After

Width:  |  Height:  |  Size: 267 KiB

315
makefile
View File

@ -1,188 +1,127 @@
default: d-fonts
ifeq ($(config),default)
TARGET=sans
ARCPREFIX =01.
else ifeq ($(config),term)
TARGET=sans
ARCPREFIX =02.
SUFFIX = -term
STYLE_COMMON = term
NOCHARMAP = true
else ifeq ($(config),cc)
TARGET=sans
ARCPREFIX = 03.
SUFFIX = -cc
STYLE_COMMON=cc
NOCHARMAP=true
else ifeq ($(config),slab)
TARGET=slab
ARCPREFIX=04.
else ifeq ($(config),term-slab)
TARGET=slab
ARCPREFIX=05.
SUFFIX=-term
STYLE_COMMON=term
NOCHARMAP=true
else ifeq ($(config),cc-slab)
TARGET=slab
ARCPREFIX=06.
SUFFIX=-cc
STYLE_COMMON=cc
NOCHARMAP=true
else ifeq ($(config),hooky)
TARGET=sans
ARCPREFIX=07.
SUFFIX=-hooky
STYLE_UPRIGHT=v-l-hooky v-i-hooky
NOCHARMAP=true
else ifeq ($(config),hooky-term)
TARGET=sans
ARCPREFIX=08.
SUFFIX=-term-hooky
STYLE_COMMON=term
STYLE_UPRIGHT=v-l-hooky v-i-hooky
NOCHARMAP=true
else ifeq ($(config),zshaped)
TARGET=sans
ARCPREFIX=09.
SUFFIX=-zshaped
STYLE_UPRIGHT=v-l-zshaped v-i-zshaped
NOCHARMAP=true
else ifeq ($(config),zshaped-term)
TARGET=sans
ARCPREFIX=10.
SUFFIX=-term-zshaped
STYLE_COMMON=term
STYLE_UPRIGHT=v-l-zshaped v-i-zshaped
NOCHARMAP=true
else ifeq ($(config),d-sans)
TARGET=sans
else ifeq ($(config),d-slab)
TARGET=slab
else
TARGET=sans
endif
include makesupport.mk
ifeq ($(TARGET),slab)
PARAM = SUFFIX='$(SUFFIX)-slab' STYLE_SUFFIX='slab'
else
PARAM = SUFFIX='$(SUFFIX)' VERSION='$(VERSION)'
endif
export VERSION
export VARNAME
export STYLE_COMMON
export STYLE_UPRIGHT
export STYLE_ITALIC
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
LOOPS = 0 1 2
# svgs
svgs : $(SCRIPTS) | $(OBJDIR) dist
@$(MAKE) -f onegroup.mk svgs $(PARAM)
# ttfs
fonts : $(SCRIPTS) | $(OBJDIR) dist
@$(MAKE) -f onegroup.mk fonts $(PARAM)
### USED FOR TESTING AND RELEASING
### DO NOT TOUCH!
# Testdrive
testdrive : fonts
@$(MAKE) -f onegroup.mk test $(PARAM)
# Webfonts
dist/webfonts : | dist
@- mkdir $@
dist/webfonts/assets : | dist/webfonts
@- mkdir $@
webfont-pkg : fonts | dist/webfonts/assets
@$(MAKE) -f onegroup.mk webfonts $(PARAM)
# Snapshot
x-snapshot : webfont-pkg | snapshot/assets
@$(MAKE) -f onegroup.mk snapshot $(PARAM)
# Pages
pages/index.css : pages/index.styl
stylus $<
pages : fonts pages/index.css
@$(MAKE) -f onegroup.mk pages $(PARAM)
# Archives
archives : fonts
@$(MAKE) -f onegroup.mk archives $(PARAM)
# Release building commands
standard-styles = default term cc slab term-slab cc-slab hooky hooky-term zshaped zshaped-term d-sans d-slab
fonts-styles = $(foreach style,$(standard-styles),fonts-$(style))
testdrive-styles = $(foreach style,$(standard-styles),testdrive-$(style))
archives-styles = $(foreach style,$(standard-styles),archives-$(style))
pages-styles = $(foreach style,$(standard-styles),pages-$(style))
webfont-pkg-styles = $(foreach style,$(standard-styles),webfont-pkg-$(style))
x-snapshot-styles = $(foreach style,$(standard-styles),x-snapshot-$(style))
$(fonts-styles) : fonts-% : $(SCRIPTS) | $(OBJDIR) dist
$(MAKE) fonts config=$(subst fonts-,,$@)
$(testdrive-styles) : testdrive-% : fonts-% $(SCRIPTS) | $(OBJDIR) dist
$(MAKE) testdrive config=$(subst testdrive-,,$@)
$(archives-styles) : archives-% : fonts-% $(SCRIPTS) | $(OBJDIR) dist
$(MAKE) archives config=$(subst archives-,,$@)
$(pages-styles) : pages-% : fonts-% $(SCRIPTS) | $(OBJDIR) dist
$(MAKE) pages config=$(subst pages-,,$@)
$(webfont-pkg-styles) : webfont-pkg-% : fonts-% $(SCRIPTS) | $(OBJDIR) dist
$(MAKE) webfont-pkg config=$(subst webfont-pkg-,,$@)
$(x-snapshot-styles) : x-snapshot-% : fonts-% $(SCRIPTS) | $(OBJDIR) dist
$(MAKE) x-snapshot config=$(subst x-snapshot-,,$@)
x-archives-bundled : release-archives/iosevka-pack-$(VERSION).zip release-archives/iosevka-pack-$(VERSION).7z
release-archives/iosevka-pack-$(VERSION).zip : fonts-default fonts-term fonts-cc fonts-slab fonts-term-slab fonts-cc-slab
7z a -tzip -mx=9 $@ ./dist/01.iosevka/* ./dist/02.iosevka-term/* ./dist/03.iosevka-cc/* ./dist/04.iosevka-slab/* ./dist/05.iosevka-term-slab/* ./dist/06.iosevka-cc-slab/*
release-archives/iosevka-pack-$(VERSION).7z : fonts-default fonts-term fonts-cc fonts-slab fonts-term-slab fonts-cc-slab
7z a -t7z -mmt=on -m0=LZMA:a=1:d=1536m:fb=256 $@ ./dist/01.iosevka/* ./dist/02.iosevka-term/* ./dist/03.iosevka-cc/* ./dist/04.iosevka-slab/* ./dist/05.iosevka-term-slab/* ./dist/06.iosevka-cc-slab/*
release-all : archives-default archives-term archives-cc \
archives-slab archives-term-slab archives-cc-slab \
archives-hooky archives-zshaped \
archives-hooky-term archives-zshaped-term \
pages-default pages-slab x-archives-bundled
fw : fonts-default fonts-cc fonts-slab fonts-cc-slab fonts-term fonts-term-slab
d-fonts : fonts-d-sans fonts-d-slab
test : testdrive-d-sans testdrive-d-slab
webfonts : d-webfonts
d-webfonts : webfont-pkg-d-sans webfont-pkg-d-slab
d-snapshot : x-snapshot-d-sans x-snapshot-d-slab
electronsnaps1: d-snapshot
cd snapshot && stylus index.styl -c
cd snapshot && electron getsnap.js --dir ../images
images/opentype.png: electronsnaps1
optipng $@
images/languages.png: electronsnaps1
optipng $@
images/preview-all.png: electronsnaps1
optipng $@
images/weights.png: electronsnaps1
optipng $@
images/variants.png: electronsnaps1
optipng $@
images/matrix.png: electronsnaps1
optipng $@
images/family.png: electronsnaps1
optipng $@
sampleimages: images/family.png images/matrix.png images/weights.png images/variants.png images/opentype.png images/languages.png images/preview-all.png
VERSION = 1.11.0
BUILD = build
DIST = dist
ARCHIVEDIR = release-archives
_start : default
$(BUILD)/ :
-@mkdir -p $@
$(DIST)/ :
-@mkdir -p $@
$(ARCHIVEDIR)/ :
-@mkdir -p $@
GENERATE = @node --expose-gc $(NODE_FDT_OPTIONS) generator
###################################################################################################
# Standard builds
$(BUILD)/targets.mk : maker.js $(SCRIPTS) | $(BUILD)/
@node maker.js > $@
include $(BUILD)/targets.mk
web : web-sans web-slab
###################################################################################################
# Custom builds
ifndef set
set = custom
endif
ifndef design
design = sans
endif
ifndef upright
upright = normal
endif
ifndef italic
italic = normal
endif
ifndef oblique
oblique = normal
endif
CREATECONFIG = node maker.js --custom $(set) --design '$(design)' --upright '$(upright)' --italic '$(italic)' --oblique '$(oblique)' > $(BUILD)/targets-$(set).mk
custom-config : | $(BUILD)/
$(CREATECONFIG)
custom :
@make fonts-customized-$(set) __IOSEVKA_CUSTOM_BUILD__=true
custom-web :
@make web-customized-$(set) __IOSEVKA_CUSTOM_BUILD__=true
ifdef __IOSEVKA_CUSTOM_BUILD__
include $(BUILD)/targets-$(set).mk
endif
###################################################################################################
# Iosevka standard release scripts
release : archive-r-sans archive-r-slab archive-r-sans-term archive-r-sans-cc archive-r-slab-term archive-r-slab-cc archive-r-hooky archive-r-hooky-term archive-r-zshaped archive-r-zshaped-term archive-ttc pages sample-images
test : fonts-sans fonts-slab
cp dist/iosevka/*.ttf testdrive/assets/
cp dist/iosevka-slab/*.ttf testdrive/assets/
cp build/iosevka-regular.charmap testdrive/assets/
cp build/iosevka-slab-regular.charmap testdrive/assets/
pages : fonts-sans fonts-slab web-sans web-slab
cp dist/iosevka/*.ttf pages/assets/
cp dist/iosevka/web/* pages/assets/
cp dist/iosevka-slab/*.ttf pages/assets/
cp dist/iosevka-slab/web/* pages/assets/
cp build/iosevka-regular.charmap pages/assets/
cp build/iosevka-slab-regular.charmap pages/assets/
fw : ttc
d-snapshot : fonts-sans fonts-slab web-sans web-slab
cp dist/iosevka/*.ttf snapshot/assets/
cp dist/iosevka/web/* snapshot/assets/
cp dist/iosevka-slab/*.ttf snapshot/assets/
cp dist/iosevka-slab/web/* snapshot/assets/
cp build/iosevka-regular.charmap snapshot/assets/
cp build/iosevka-slab-regular.charmap snapshot/assets/
electronsnaps1: d-snapshot
cd snapshot && stylus index.styl -c
cd snapshot && electron getsnap.js --dir ../images
images/opentype.png: electronsnaps1
optipng $@
images/languages.png: electronsnaps1
optipng $@
images/preview-all.png: electronsnaps1
optipng $@
images/weights.png: electronsnaps1
optipng $@
images/variants.png: electronsnaps1
optipng $@
images/matrix.png: electronsnaps1
optipng $@
images/family.png: electronsnaps1
optipng $@
sample-images: images/family.png images/matrix.png images/weights.png images/variants.png images/opentype.png images/languages.png images/preview-all.png
###################################################################################################
# Support Files
PATELC = node ./node_modules/patel/bin/patel-c
GLYPH_SEGMENTS = glyphs/common-shapes.js glyphs/overmarks.js glyphs/letters-unified-basic.js glyphs/letters-unified-extended.js glyphs/numbers.js glyphs/symbol-punctuation.js glyphs/symbol-math.js glyphs/symbol-letter.js glyphs/symbol-geometric.js glyphs/symbol-other.js glyphs/symbol-braille.js glyphs/autobuilds.js buildglyphs.js
SUPPORT_FILES_FROM_PTL = support/glyph.js support/spiroexpand.js support/spirokit.js parameters.js support/anchor.js support/point.js support/transform.js support/utils.js meta/aesthetics.js meta/naming.js meta/features.js
SUPPORT_FILES_JS = generator.js emptyfont.toml parameters.toml support/fairify.js support/autoref.js
SUPPORT_FILES = $(SUPPORT_FILES_FROM_PTL) $(SUPPORT_FILES_JS)
SCRIPTS = $(SUPPORT_FILES) $(GLYPH_SEGMENTS)
SCRIPTS_FROM_PTL = $(SUPPORT_FILES_FROM_PTL) $(GLYPH_SEGMENTS)
$(SUPPORT_FILES_FROM_PTL) : %.js : %.ptl meta/macros.ptl
$(PATELC) --optimize --strict $< -o $@
$(GLYPH_SEGMENTS) : %.js : %.ptl meta/macros.ptl $(subst .js,.ptl,$(SUPPORT_FILES_FROM_PTL)) $(SUPPORT_FILES_JS)
$(PATELC) --optimize --strict $< -o $@
cleanscripts :
-@rm $(SCRIPTS_FROM_PTL)
scripts : $(SCRIPTS)

216
maker.js Normal file
View File

@ -0,0 +1,216 @@
const fs = require("fs");
const path = require("path");
const argv = require("yargs").argv;
const weights = ["thin", "extralight", "light", "book", "medium", "bold", "heavy"];
const slantnesses = ["upright", "italic", "oblique"];
const widths = ["term", "normal", "cc"];
const designs = ["sans", "slab"];
function present(x) { return !!x; }
function tofn(a) {
return a.filter(present).join("-");
}
function getMapping(options) {
options = options || {
design: [],
width: "normal",
weight: "book",
slantness: "upright",
styles: {},
dirPrefix: "",
dirSuffix: "",
filePrefix: "",
infix: "",
fileSuffix: ""
};
let design = options.design || [];
let weight = options.weight || "book";
let slantness = options.slantness || "upright";
let hives = ["iosevka"].concat(
design,
["w-" + weight, "s-" + slantness],
(options.styles || {})[slantness] || []
);
let dir = [
options.dirPrefix || "",
"iosevka",
options.infix || tofn(design),
options.dirSuffix || ""
].filter(present).join("-");
let filename = [
options.filePrefix || "",
"iosevka",
options.infix || tofn(design),
options.fileSuffix || "",
(weight === "book" ? (slantness === "upright" ? "regular" : "") : weight) + (slantness === "upright" ? "" : slantness)
].filter(present).join("-");
return {hives, dir, filename, custom: options.custom};
}
let definedBuildSeqs = {};
function createMake(mapping) {
const {hives, dir, filename, cm, custom} = mapping;
let tfname = `$(BUILD)/${filename}.0.otd`;
let target = `$(DIST)/${dir}/${filename}.ttf`;
let cmTarget = `$(BUILD)/${filename}.charmap`;
let woffTarget = `$(DIST)/${dir}/web/${filename}.woff`;
let woff2Target = `$(DIST)/${dir}/web/${filename}.woff2`;
let buf = "";
if (!definedBuildSeqs[tfname]) {
buf += `
${tfname} : scripts ${custom || ''} | $(BUILD) $(DIST)/${dir}/
@echo Building ${filename} with ${hives.join(' ')}
$(GENERATE) ${hives.join(' ')} -o $@ ${cm ? ('--charmap $(BUILD)/'+filename+'.charmap') :''}`;
definedBuildSeqs[tfname] = true;
}
buf += `
${target} : ${tfname} | $(DIST)/${dir}/
@echo Hinting and optimizing ${tfname} '->' $@
@otfccbuild ${tfname} -o $(BUILD)/${filename}.1.ttf
@ttfautohint $(BUILD)/${filename}.1.ttf $(BUILD)/${filename}.2.ttf
@otfccdump $(BUILD)/${filename}.2.ttf -o $(BUILD)/${filename}.2.otd --pretty
@otfccbuild $(BUILD)/${filename}.2.otd -o $@ -O3 -s
@rm $(BUILD)/${filename}.1.ttf $(BUILD)/${filename}.2.ttf $(BUILD)/${filename}.2.otd`;
buf += `
${woffTarget} : ${target} | $(DIST)/${dir}/web/
sfnt2woff $<
mv $(subst .ttf,.woff,$<) $@`;
buf += `
${woff2Target} : ${target} | $(DIST)/${dir}/web/
woff2_compress $<
mv $(subst .ttf,.woff2,$<) $@`;
return {buf, target, woffTarget, woff2Target, cmTarget};
}
let designGroups = [];
if (argv.custom) {
designGroups = [
{
custom: '$(BUILD)/targets-' + argv.custom + '.mk',
name: "customized-" + argv.custom,
design: argv.design.trim().split(/ +/),
width: argv.width,
infix: argv.custom,
styles: {
upright: argv.upright.trim().split(/ +/),
italic: argv.italic.trim().split(/ +/),
oblique: argv.oblique.trim().split(/ +/)
}
}
];
} else {
designGroups = [
{name: "sans", design: [], dirPrefix: ""},
{name: "slab", design: ["slab"], dirPrefix: ""},
{name: "r-sans", design: [], dirPrefix: "01"},
{name: "r-sans-term", design: ["term"], dirPrefix: "02"},
{name: "r-sans-cc", design: ["cc"], dirPrefix: "03"},
{name: "r-slab", design: ["slab"], dirPrefix: "04"},
{name: "r-slab-term", design: ["term", "slab"], dirPrefix: "05"},
{name: "r-slab-cc", design: ["cc", "slab"], dirPrefix: "06"},
{name: "r-hooky", design: [], infix: "hooky", dirPrefix: "07", styles: {upright: ["v-l-hooky", "v-i-hooky"]}},
{name: "r-hooky-term", design: ["term"], infix: "hooky-term", dirPrefix: "08", styles: {upright: ["v-l-hooky", "v-i-hooky"]}},
{name: "r-zshaped", design: [], infix: "zshaped",dirPrefix: "09", styles: {upright: ["v-l-zshaped", "v-i-zshaped"]}},
{name: "r-zshaped-term", design: ["term"], infix: "zshaped-term", dirPrefix: "10", styles: {upright: ["v-l-zshaped", "v-i-zshaped"]}},
];
}
let makes = [];
for (let dg of designGroups) {
let groupTargets = {
ttf: [],
upright: [],
italic: [],
oblique: [],
woff: [],
woff2: []
};
const groupMapping = getMapping(dg);
makes.push(`
$(DIST)/${groupMapping.dir}/ : | $(DIST)/
-@mkdir -p $@`);
makes.push(`
$(DIST)/${groupMapping.dir}/web/ : | $(DIST)/${groupMapping.dir}/
-@mkdir -p $@`);
for (let weight of weights)
for (let slantness of slantnesses) {
let config = Object.create(dg);
config.weight = weight;
config.slantness = slantness;
const mapping = getMapping(config);
if (weight === "book" && slantness === "upright") {
mapping.cm = true;
}
let {buf, target, woffTarget, woff2Target, cmTarget} = createMake(mapping);
makes.push(buf);
groupTargets.ttf.push(target);
groupTargets[slantness].push(target);
groupTargets.woff.push(woffTarget);
groupTargets.woff2.push(woff2Target);
}
makes.push(`fonts-${dg.name} : ${groupTargets.ttf.join(' ')}`);
makes.push(`fonts-${dg.name}-upright : ${groupTargets.upright.join(' ')}`);
makes.push(`fonts-${dg.name}-italic : ${groupTargets.italic.join(' ')}`);
makes.push(`fonts-${dg.name}-oblique : ${groupTargets.oblique.join(' ')}`);
makes.push(`web-${dg.name} : ${groupTargets.woff.join(' ')} ${groupTargets.woff2.join(' ')}`);
makes.push(`$(ARCHIVEDIR)/${groupMapping.dir}-$(VERSION).zip : fonts-${dg.name} | $(ARCHIVEDIR)/
cd $(DIST)/${groupMapping.dir}/ && 7z a -tzip -mx=9 ../../$@ ./*.ttf`);
makes.push(`archive-${dg.name} : $(ARCHIVEDIR)/${groupMapping.dir}-$(VERSION).zip`);
}
if (argv.custom) {
} else {
const ttcgroups = [
{groups: [designGroups[2], designGroups[3], designGroups[4]]},
{groups: [designGroups[5], designGroups[6], designGroups[7]]}
];
// ttc
let ttcs = [];
makes.push(`
$(DIST)/ttc/ : | $(DIST)/
-@mkdir -p $@`);
for (let tg of ttcgroups) {
for (let weight of weights) {
for (let slantness of slantnesses) {
let ttctargets = [];
for (let dg of tg.groups) {
let config = Object.create(dg);
config.weight = weight;
config.slantness = slantness;
const mapping = getMapping(config);
ttctargets.push(createMake(mapping).target);
}
let config = Object.create(tg.groups[0]);
config.weight = weight;
config.slantness = slantness;
const mapping = getMapping(config);
ttcs.push(`$(DIST)/ttc/${mapping.filename}.ttc`);
makes.push(`
$(DIST)/ttc/${mapping.filename}.ttc : ${ttctargets.join(' ')} | $(DIST)/ttc/
otfcc-ttcize -o $@ ${ttctargets.join(' ')}
`);
}
}
}
makes.push(`ttc : ${ttcs.join(' ')}`);
makes.push(`$(ARCHIVEDIR)/iosevka-pack-$(VERSION).zip : ttc | $(ARCHIVEDIR)/
cd $(DIST)/ttc/ && 7z a -tzip -mx=9 ../../$@ ./*.ttc`);
makes.push(`archive-ttc : $(ARCHIVEDIR)/iosevka-pack-$(VERSION).zip`);
makes.push(`default : fonts-sans fonts-slab`);
}
console.log(makes.join("\n\n"));

View File

@ -1,26 +0,0 @@
OBJDIR = build
$(OBJDIR) :
@- mkdir $@
dist :
@- mkdir $@
snapshot/assets :
@- mkdir $@
PATELC = node ./node_modules/patel/bin/patel-c
GLYPH_SEGMENTS = glyphs/common-shapes.js glyphs/overmarks.js glyphs/letters-unified-basic.js glyphs/letters-unified-extended.js glyphs/numbers.js glyphs/symbol-punctuation.js glyphs/symbol-math.js glyphs/symbol-letter.js glyphs/symbol-geometric.js glyphs/symbol-other.js glyphs/symbol-braille.js glyphs/autobuilds.js buildglyphs.js
SUPPORT_FILES_FROM_PTL = support/glyph.js support/spiroexpand.js support/spirokit.js parameters.js support/anchor.js support/point.js support/transform.js support/utils.js meta/aesthetics.js meta/naming.js meta/features.js
SUPPORT_FILES_JS = generator.js emptyfont.toml parameters.toml support/fairify.js
SUPPORT_FILES = $(SUPPORT_FILES_FROM_PTL) $(SUPPORT_FILES_JS)
SCRIPTS = $(SUPPORT_FILES) $(GLYPH_SEGMENTS)
SCRIPTS_FROM_PTL = $(SUPPORT_FILES_FROM_PTL) $(GLYPH_SEGMENTS)
$(SUPPORT_FILES_FROM_PTL) : %.js : %.ptl meta/macros.ptl
$(PATELC) --optimize --strict $< -o $@
$(GLYPH_SEGMENTS) : %.js : %.ptl meta/macros.ptl $(subst .js,.ptl,$(SUPPORT_FILES_FROM_PTL)) $(SUPPORT_FILES_JS)
$(PATELC) --optimize --strict $< -o $@
cleanscripts :
-@rm $(SCRIPTS_FROM_PTL)
scripts : $(SCRIPTS)

View File

@ -182,4 +182,18 @@ export : define designParameters : object
logic_narrow_shrink 0.75
geometric_large_x (1 + 2 / 3)
geometric_small_x (3 / 5)
arrow_size (3 / 8)
arrow_size (3 / 8)
# ()
parenOutside 0.2
parenInside 0.9
parenCurliness 0.7
parenOvershoot 0.0375
# []
bracketOutside 0.1
bracketInside 0.95
# {}
braceOutside 0.05
braceInside 0.95
braceCurlyM1 0.6
braceCurlyM2 0.45
braceOvershoot 0.02

View File

@ -1,183 +0,0 @@
default: fonts
TARGETUPM = 1000
include makesupport.mk
PREFIX = $(VARNAME)iosevka$(SUFFIX)
ARCPREFIXB = iosevka$(SUFFIX)
ifdef DONTHINT
HINT = cp
HINT_SUFFIX = --ignore-hints
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`.
ifeq ($(OS),Windows_NT)
SHELL = C:\\Windows\\System32\\cmd.exe
SUPPRESS_ERRORS = 2> NUL
PASS = @rem
MKDIR = mkdir.exe
else
SUPPRESS_ERRORS = 2> /dev/null
PASS = @:
MKDIR = mkdir
endif
DISTDIR = dist/$(ARCPREFIX)$(ARCPREFIXB)
$(DISTDIR) : dist
@- $(MKDIR) $@
NODE_FDT = @node --expose-gc $(NODE_FDT_OPTIONS)
NODE = node
UPRIGHT = $(OBJDIR)/$(PREFIX)-thin.ttf $(OBJDIR)/$(PREFIX)-extralight.ttf $(OBJDIR)/$(PREFIX)-light.ttf $(OBJDIR)/$(PREFIX)-regular.ttf $(OBJDIR)/$(PREFIX)-medium.ttf $(OBJDIR)/$(PREFIX)-bold.ttf $(OBJDIR)/$(PREFIX)-heavy.ttf
ITALIC = $(OBJDIR)/$(PREFIX)-thinitalic.ttf $(OBJDIR)/$(PREFIX)-extralightitalic.ttf $(OBJDIR)/$(PREFIX)-lightitalic.ttf $(OBJDIR)/$(PREFIX)-italic.ttf $(OBJDIR)/$(PREFIX)-mediumitalic.ttf $(OBJDIR)/$(PREFIX)-bolditalic.ttf $(OBJDIR)/$(PREFIX)-heavyitalic.ttf
OBLIQUE = $(OBJDIR)/$(PREFIX)-thinoblique.ttf $(OBJDIR)/$(PREFIX)-extralightoblique.ttf $(OBJDIR)/$(PREFIX)-lightoblique.ttf $(OBJDIR)/$(PREFIX)-oblique.ttf $(OBJDIR)/$(PREFIX)-mediumoblique.ttf $(OBJDIR)/$(PREFIX)-boldoblique.ttf $(OBJDIR)/$(PREFIX)-heavyoblique.ttf
TARGETS = $(UPRIGHT) $(ITALIC) $(OBLIQUE)
MAPS = $(if $(NOCHARMAP),,$(OBJDIR)/$(PREFIX)-regular.charmap)
FDTS = $(subst .ttf,.fdt,$(subst $(OBJDIR)/,$(OBJDIR)/.pass0-,$(TARGETS)))
SVG0 = $(subst .ttf,.svg,$(subst $(OBJDIR)/,$(OBJDIR)/.pass0-,$(TARGETS)))
PASS1 = $(subst $(OBJDIR)/,$(OBJDIR)/.pass0-,$(TARGETS))
PASS1 = $(subst $(OBJDIR)/,$(OBJDIR)/.pass1-,$(TARGETS))
PASS2 = $(subst $(OBJDIR)/,$(OBJDIR)/.pass2-,$(TARGETS))
DISTTARGETS = $(subst $(OBJDIR)/,$(DISTDIR)/,$(TARGETS))
fonts : $(DISTTARGETS)
svgs : $(SVG0)
# Pass 0 : file construction
OUTPUTS = --meta $@ --svg $(subst .fdt,.svg,$@)
OUTPUT_CM = $(if $(NOCHARMAP),,--charmap $(subst .fdt,.charmap,$(subst $(OBJDIR)/.pass0-,$(OBJDIR)/,$@)))
$(OBJDIR)/.pass0-$(PREFIX)-thin.fdt : $(SCRIPTS) | $(OBJDIR) $(DISTDIR)
$(NODE_FDT) generator iosevka $(STYLE_COMMON) w-thin s-upright $(STYLE_UPRIGHT) $(STYLE_SUFFIX) $(OUTPUTS)
$(OBJDIR)/.pass0-$(PREFIX)-extralight.fdt : $(SCRIPTS) | $(OBJDIR) $(DISTDIR)
$(NODE_FDT) generator iosevka $(STYLE_COMMON) w-extralight s-upright $(STYLE_UPRIGHT) $(STYLE_SUFFIX) $(OUTPUTS)
$(OBJDIR)/.pass0-$(PREFIX)-light.fdt : $(SCRIPTS) | $(OBJDIR) $(DISTDIR)
$(NODE_FDT) generator iosevka $(STYLE_COMMON) w-light s-upright $(STYLE_UPRIGHT) $(STYLE_SUFFIX) $(OUTPUTS)
$(OBJDIR)/.pass0-$(PREFIX)-regular.fdt : $(SCRIPTS) | $(OBJDIR) $(DISTDIR)
$(NODE_FDT) generator iosevka $(STYLE_COMMON) w-book s-upright $(STYLE_UPRIGHT) $(STYLE_SUFFIX) $(OUTPUTS) $(OUTPUT_CM)
$(OBJDIR)/.pass0-$(PREFIX)-medium.fdt : $(SCRIPTS) | $(OBJDIR) $(DISTDIR)
$(NODE_FDT) generator iosevka $(STYLE_COMMON) w-medium s-upright $(STYLE_UPRIGHT) $(STYLE_SUFFIX) $(OUTPUTS)
$(OBJDIR)/.pass0-$(PREFIX)-bold.fdt : $(SCRIPTS) | $(OBJDIR) $(DISTDIR)
$(NODE_FDT) generator iosevka $(STYLE_COMMON) w-bold s-upright $(STYLE_UPRIGHT) $(STYLE_SUFFIX) $(OUTPUTS)
$(OBJDIR)/.pass0-$(PREFIX)-heavy.fdt : $(SCRIPTS) | $(OBJDIR) $(DISTDIR)
$(NODE_FDT) generator iosevka $(STYLE_COMMON) w-heavy s-upright $(STYLE_UPRIGHT) $(STYLE_SUFFIX) $(OUTPUTS)
$(OBJDIR)/.pass0-$(PREFIX)-thinitalic.fdt : $(SCRIPTS) | $(OBJDIR) $(DISTDIR)
$(NODE_FDT) generator iosevka $(STYLE_COMMON) w-thin s-italic $(STYLE_ITALIC) $(STYLE_SUFFIX) $(OUTPUTS) --uprightify 1
$(OBJDIR)/.pass0-$(PREFIX)-extralightitalic.fdt : $(SCRIPTS) | $(OBJDIR) $(DISTDIR)
$(NODE_FDT) generator iosevka $(STYLE_COMMON) w-extralight s-italic $(STYLE_ITALIC) $(STYLE_SUFFIX) $(OUTPUTS) --uprightify 1
$(OBJDIR)/.pass0-$(PREFIX)-lightitalic.fdt : $(SCRIPTS) | $(OBJDIR) $(DISTDIR)
$(NODE_FDT) generator iosevka $(STYLE_COMMON) w-light s-italic $(STYLE_ITALIC) $(STYLE_SUFFIX) $(OUTPUTS) --uprightify 1
$(OBJDIR)/.pass0-$(PREFIX)-italic.fdt : $(SCRIPTS) | $(OBJDIR) $(DISTDIR)
$(NODE_FDT) generator iosevka $(STYLE_COMMON) w-book s-italic $(STYLE_ITALIC) $(STYLE_SUFFIX) $(OUTPUTS) --uprightify 1
$(OBJDIR)/.pass0-$(PREFIX)-mediumitalic.fdt : $(SCRIPTS) | $(OBJDIR) $(DISTDIR)
$(NODE_FDT) generator iosevka $(STYLE_COMMON) w-medium s-italic $(STYLE_ITALIC) $(STYLE_SUFFIX) $(OUTPUTS) --uprightify 1
$(OBJDIR)/.pass0-$(PREFIX)-bolditalic.fdt : $(SCRIPTS) | $(OBJDIR) $(DISTDIR)
$(NODE_FDT) generator iosevka $(STYLE_COMMON) w-bold s-italic $(STYLE_ITALIC) $(STYLE_SUFFIX) $(OUTPUTS) --uprightify 1
$(OBJDIR)/.pass0-$(PREFIX)-heavyitalic.fdt : $(SCRIPTS) | $(OBJDIR) $(DISTDIR)
$(NODE_FDT) generator iosevka $(STYLE_COMMON) w-heavy s-italic $(STYLE_ITALIC) $(STYLE_SUFFIX) $(OUTPUTS) --uprightify 1
$(OBJDIR)/.pass0-$(PREFIX)-thinoblique.fdt : $(SCRIPTS) | $(OBJDIR) $(DISTDIR)
$(NODE_FDT) generator iosevka $(STYLE_COMMON) w-thin s-oblique $(STYLE_UPRIGHT) $(STYLE_SUFFIX) $(OUTPUTS) --uprightify 1
$(OBJDIR)/.pass0-$(PREFIX)-extralightoblique.fdt : $(SCRIPTS) | $(OBJDIR) $(DISTDIR)
$(NODE_FDT) generator iosevka $(STYLE_COMMON) w-extralight s-oblique $(STYLE_UPRIGHT) $(STYLE_SUFFIX) $(OUTPUTS) --uprightify 1
$(OBJDIR)/.pass0-$(PREFIX)-lightoblique.fdt : $(SCRIPTS) | $(OBJDIR) $(DISTDIR)
$(NODE_FDT) generator iosevka $(STYLE_COMMON) w-light s-oblique $(STYLE_UPRIGHT) $(STYLE_SUFFIX) $(OUTPUTS) --uprightify 1
$(OBJDIR)/.pass0-$(PREFIX)-oblique.fdt : $(SCRIPTS) | $(OBJDIR) $(DISTDIR)
$(NODE_FDT) generator iosevka $(STYLE_COMMON) w-book s-oblique $(STYLE_UPRIGHT) $(STYLE_SUFFIX) $(OUTPUTS) --uprightify 1
$(OBJDIR)/.pass0-$(PREFIX)-mediumoblique.fdt : $(SCRIPTS) | $(OBJDIR) $(DISTDIR)
$(NODE_FDT) generator iosevka $(STYLE_COMMON) w-medium s-oblique $(STYLE_UPRIGHT) $(STYLE_SUFFIX) $(OUTPUTS) --uprightify 1
$(OBJDIR)/.pass0-$(PREFIX)-boldoblique.fdt : $(SCRIPTS) | $(OBJDIR) $(DISTDIR)
$(NODE_FDT) generator iosevka $(STYLE_COMMON) w-bold s-oblique $(STYLE_UPRIGHT) $(STYLE_SUFFIX) $(OUTPUTS) --uprightify 1
$(OBJDIR)/.pass0-$(PREFIX)-heavyoblique.fdt : $(SCRIPTS) | $(OBJDIR) $(DISTDIR)
$(NODE_FDT) generator iosevka $(STYLE_COMMON) w-heavy s-oblique $(STYLE_UPRIGHT) $(STYLE_SUFFIX) $(OUTPUTS) --uprightify 1
$(SVG0) : $(OBJDIR)/.pass0-%.svg : $(OBJDIR)/.pass0-%.fdt
$(PASS)
$(MAPS) : $(OBJDIR)/%.charmap : $(OBJDIR)/.pass0-%.fdt
$(PASS)
# Pass 1 : Outline cleanup and merge features
$(PASS1) : $(OBJDIR)/.pass1-%.ttf : pass1-cleanup.py $(OBJDIR)/.pass0-%.svg
@echo Fontforge $< --> $@
@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
$(TARGETS) : $(OBJDIR)/%.ttf : pass2-finalize.js $(OBJDIR)/.pass1-%.ttf $(OBJDIR)/.pass0-%.fdt
@otfccdump $(word 2,$^) | $(NODE) $< $(word 3,$^) | otfccbuild -s -O3 -o $@ --keep-average-char-width $(HINT_SUFFIX)
$(DISTTARGETS) : $(DISTDIR)/%.ttf : $(OBJDIR)/%.ttf
@cp $< $@
# releaseing
ARCHIVEDIR = release-archives
PAGEDIR = pages/assets
PAGESTTF = $(subst $(DISTDIR)/,$(PAGEDIR)/,$(DISTTARGETS))
$(PAGESTTF) : $(PAGEDIR)/%.ttf : $(DISTDIR)/%.ttf
cp $< $@
PAGESWOFF = $(subst .ttf,.woff,$(PAGESTTF))
$(PAGESWOFF) : $(PAGEDIR)/%.woff : $(PAGEDIR)/%.ttf
sfnt2woff $<
PAGESWOFF2 = $(subst .ttf,.woff2,$(PAGESTTF))
$(PAGESWOFF2) : $(PAGEDIR)/%.woff2 : $(PAGEDIR)/%.ttf
woff2_compress $<
PAGESMAPS = $(subst $(OBJDIR)/,$(PAGEDIR)/,$(MAPS))
$(PAGESMAPS) : $(PAGEDIR)/%.charmap : $(OBJDIR)/%.charmap
cp $< $@
WEBFONTDIR = dist/webfonts/assets
WEBFONTSTTF = $(subst $(DISTDIR)/,$(WEBFONTDIR)/,$(DISTTARGETS))
$(WEBFONTSTTF) : $(WEBFONTDIR)/%.ttf : $(DISTDIR)/%.ttf
cp $< $@
WEBFONTSWOFF = $(subst .ttf,.woff,$(WEBFONTSTTF))
$(WEBFONTSWOFF) : $(WEBFONTDIR)/%.woff : $(WEBFONTDIR)/%.ttf
sfnt2woff $<
WEBFONTSWOFF2 = $(subst .ttf,.woff2,$(WEBFONTSTTF))
$(WEBFONTSWOFF2) : $(WEBFONTDIR)/%.woff2 : $(WEBFONTDIR)/%.ttf
woff2_compress $<
WEBFONTCSS = dist/webfonts/$(ARCPREFIXB).css
$(WEBFONTCSS) : webfont-csses/$(ARCPREFIXB).css
cp $< $@
#$(ARCHIVEDIR)/$(ARCPREFIX)$(ARCPREFIXB)-$(VERSION).tar.bz2 : $(DISTTARGETS)
# cd $(DISTDIR) && tar -cjvf ../$@ $(subst $(DISTDIR)/,,$^)
$(ARCHIVEDIR)/$(ARCPREFIX)$(ARCPREFIXB)-$(VERSION).zip : $(DISTTARGETS)
cd $(DISTDIR) && 7z a -tzip -mx=9 ../../$@ ./*.ttf
$(ARCHIVEDIR)/$(ARCPREFIX)$(ARCPREFIXB)-$(VERSION).7z : $(DISTTARGETS)
cd $(DISTDIR) && 7z a -t7z -mmt=on -m0=LZMA:a=1:d=1536m:fb=256 ../../$@ ./*.ttf
#archives : $(ARCHIVEDIR)/$(ARCPREFIX)$(ARCPREFIXB)-$(VERSION).tar.bz2 $(ARCHIVEDIR)/$(ARCPREFIX)$(ARCPREFIXB)-$(VERSION).zip
archives : $(ARCHIVEDIR)/$(ARCPREFIX)$(ARCPREFIXB)-$(VERSION).zip $(ARCHIVEDIR)/$(ARCPREFIX)$(ARCPREFIXB)-$(VERSION).7z
pages : $(PAGESTTF) $(PAGESWOFF) $(PAGESWOFF2) $(PAGESMAPS)
webfonts : $(WEBFONTSTTF) $(WEBFONTSWOFF) $(WEBFONTSWOFF2) $(WEBFONTCSS)
SNAPSHOT_ASSETS = $(subst dist/webfonts/,snapshot/,$(WEBFONTSTTF) $(WEBFONTSWOFF) $(WEBFONTSWOFF2) $(WEBFONTCSS))
$(SNAPSHOT_ASSETS) : snapshot/% : dist/webfonts/%
cp $< $@
snapshot: $(SNAPSHOT_ASSETS)
# testdrive
TESTDIR = testdrive/assets
TESTTTF = $(subst $(DISTDIR)/,$(TESTDIR)/,$(DISTTARGETS))
$(TESTTTF) : $(TESTDIR)/%.ttf : $(DISTDIR)/%.ttf
cp $< $@
TESTMAPS = $(subst $(OBJDIR)/,$(TESTDIR)/,$(MAPS))
$(TESTMAPS) : $(TESTDIR)/%.charmap : $(OBJDIR)/%.charmap
cp $< $@
test : $(TESTTTF) $(TESTMAPS)

View File

@ -5,6 +5,8 @@
"dependencies": {
"bezier-js": "^2.0.0",
"cubic2quad": "^1.0.0",
"otfcc-c2q": "^0.5.0",
"caryll-shapeops": "^0.2.0",
"libspiro-js": ">=0.3.0",
"patel": ">=0.32.0",
"toml": ">=2.3.0",

View File

@ -1,7 +1,7 @@
[iosevka]
family = 'Iosevka'
version = '1.10.5'
codename = 'Juno'
version = '1.11.0'
codename = 'Klaes'
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.'''
manufacturer = 'Belleve Invis'

View File

@ -1,51 +0,0 @@
import fontforge
import psMat
import math
import sys
source = sys.argv[1]
font = fontforge.open(source)
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()
font.removeOverlap()
for i in font:
glyph = font[i]
if len(glyph.references) > 0 and len(glyph.layers["Fore"]) > 0: # a mixed glyph
glyph.unlinkRef()
glyph.removeOverlap()
for u in range(0x20, 0x7F):
font.selection.select(("unicode", None), u)
for g in font.selection:
font[g].unlinkRef()
font.selection.all()
font.simplify(0.05, ("smoothcurves", "choosehv"), 0.1)
#font.em = 2000
font.selection.all()
font.layers["Fore"].is_quadratic = True
font.transform(psMat.skew(float(sys.argv[3]) / 180 * math.pi))
font.em = 1000
font.selection.all()
font.round()
font.removeOverlap()
font.simplify(0.01)
font.selection.all()
font.removeOverlap()
font.canonicalContours()
font.canonicalStart()
font.generate(sys.argv[2], flags = ("opentype"))

View File

@ -1,22 +0,0 @@
var path = require('path');
var fs = require('fs');
var toml = require('toml');
var argv = require('yargs').argv;
var glyfsource = '';
process.stdin.resume();
process.stdin.on('data', function (buf) { glyfsource += buf.toString(); });
process.stdin.on('end', function () {
var ttf = JSON.parse(fs.readFileSync(argv._[0], 'utf-8'));
if(glyfsource[0] == '\uFEFF') glyfsource = glyfsource.slice(1);
var glyfs = JSON.parse(glyfsource);
ttf.post.format = 3.0;
ttf.cmap = glyfs.cmap;
ttf.glyf = glyfs.glyf;
ttf.prep = glyfs.prep;
ttf.fpgm = glyfs.fpgm;
ttf.cvt_ = glyfs.cvt_;
ttf.maxp = glyfs.maxp;
ttf.gasp = glyfs.gasp;
process.stdout.write(JSON.stringify(ttf) + '\n');
});

99
support/autoref.js Normal file
View File

@ -0,0 +1,99 @@
var Point = require("./point");
function delta(a, b) {
return Math.round((a - b) * 32);
}
function contourHash(c) {
if (!c || c.length < 2) return ".";
var lx = c[0].x, ly = c[0].y;
var buf = "";
for (var j = 1; j < c.length; j++) {
var z = c[j];
buf += `${z.on ? 'o':'f'}${z.cubic?'c':'q'}${delta(z.x, lx)},${delta(z.y, ly)};`;
lx = z.x, ly = z.y;
}
return buf;
}
function match(g1, g2, _n) {
for (let j = 0; j + g1.contours.length <= g2.contours.length; j++) {
var found = true;
for (var k = j; k < g2.contours.length && k - j < g1.contours.length; k++) {
if (g1.contours[k - j].hash !== g2.contours[k].hash
|| !(k <= j || delta(g1.contours[k - j][0].x, g1.contours[k - j - 1][0].x) === delta(g2.contours[k][0].x, g2.contours[k - 1][0].x)
&& delta(g1.contours[k - j][0].y, g1.contours[k - j - 1][0].y) === delta(g2.contours[k][0].y, g2.contours[k - 1][0].y))) {
found = false;
break;
}
}
if (found) {
if (!g2.references) g2.references = [];
g2.references.push({
glyph: g1.name,
_n: _n,
x: g2.contours[j][0].x - g1.contours[0][0].x,
y: g2.contours[j][0].y - g1.contours[0][0].y
});
g2.contours.splice(j, g1.contours.length);
return true;
}
}
return false;
}
function unlinkRef(g, dx, dy, glyf) {
var cntrs = g.contours.map(c => c.map(z => new Point(z.x + dx, z.y + dy, z.on, z.cubic)));
if (g.references)
for (let r of g.references) {
cntrs = cntrs.concat(unlinkRef(glyf[r._n], r.x + dx, r.y + dy, glyf));
}
return cntrs;
}
function autoref(glyf) {
for (var j = 0; j < glyf.length; j++) {
var g = glyf[j];
if (g.contours) {
for (var k = 0; k < g.contours.length; k++) {
var contour = g.contours[k];
contour.hash = contourHash(contour);
}
}
}
// Refl-referencify, forward.
for (var j = 0; j < glyf.length; j++) {
if (!glyf[j].contours.length || glyf[j].references && glyf[j].references.length) continue;
for (var k = j + 1; k < glyf.length; k++) {
if (glyf[j].contours.length === glyf[k].contours.length) {
if (match(glyf[j], glyf[k], j)) {
// console.log("Refl", glyf[j].name, glyf[j].unicode, "->", glyf[k].name, glyf[k].unicode);
}
}
}
}
// referencify, backward
for (var j = 0; j < glyf.length; j++) {
if (glyf[j].cmpPriority < 0 || !glyf[j].contours.length || glyf[j].references && glyf[j].references.length) continue;
for (var k = j - 1; k >= 0; k--) {
if (glyf[j].contours.length > glyf[k].contours.length) continue;
while(match(glyf[j], glyf[k], j)){
// console.log("Part", glyf[j].name, "->", glyf[k].name);
}
}
}
// unlink composite
for (var j = 0; j < glyf.length; j++) {
if (glyf[j].contours.length === 0 || !glyf[j].references || glyf[j].references.length === 0) continue;
// console.log("Unlink", glyf[j].name);
var cs = unlinkRef(glyf[j], 0, 0, glyf);
glyf[j].contours = g.contours.concat(cs);
glyf[j].references = [];
}
}
module.exports = autoref;

View File

@ -122,9 +122,9 @@ function splitAtExtrema(z1, z2, z3, z4, angles, splitpoints) {
var t2 = ts[k];
var bef = splitBefore(z1, z2, z3, z4, t2);
var seg = splitAfter(bef[0], bef[1], bef[2], bef[3], t1 / t2);
seg[1].onCurve = seg[2].onCurve = false;
seg[1].on = seg[2].on = false;
seg[1].cubic = seg[2].cubic = true;
seg[3].onCurve = true;
seg[3].on = true;
splitpoints.push(seg[1], seg[2], seg[3]);
}
}
@ -211,7 +211,7 @@ function fairify(scurve, gizmo, denseQ, cleanMore) {
var splitpoints = [scurve[0]];
var last = scurve[0];
for (var j = 1; j < scurve.length; j++) {
if (scurve[j].onCurve) {
if (scurve[j].on) {
splitpoints.push(last = scurve[j]);
} else if (scurve[j].cubic) {
var z1 = last,
@ -238,13 +238,13 @@ function fairify(scurve, gizmo, denseQ, cleanMore) {
}
// Mark corners and extrema
for (var j = 1; j < splitpoints.length - 1; j++) {
if (splitpoints[j].onCurve && !splitpoints[j - 1].onCurve) {
if (splitpoints[j].on && !splitpoints[j - 1].on) {
splitpoints[j].prev = splitpoints[j - 1];
}
if (splitpoints[j].onCurve && !splitpoints[j + 1].onCurve) {
if (splitpoints[j].on && !splitpoints[j + 1].on) {
splitpoints[j].next = splitpoints[j + 1];
}
if (splitpoints[j].onCurve && !splitpoints[j - 1].onCurve && !splitpoints[j + 1].onCurve) {
if (splitpoints[j].on && !splitpoints[j - 1].on && !splitpoints[j + 1].on) {
var z1 = splitpoints[j],
z0 = splitpoints[j - 1],
z2 = splitpoints[j + 1];
@ -272,7 +272,7 @@ function fairify(scurve, gizmo, denseQ, cleanMore) {
} else {
z1.mark = true; // also corner
}
} else if (splitpoints[j].onCurve) {
} else if (splitpoints[j].on) {
splitpoints[j].mark = true; // corner
}
}
@ -312,7 +312,7 @@ function fairify(scurve, gizmo, denseQ, cleanMore) {
nextmark = splitpoints[k];
segments = estimateSegments(lastmark, nextmark);
}
if (splitpoints[j].onCurve && !splitpoints[j].mark) {
if (splitpoints[j].on && !splitpoints[j].mark) {
var z1 = splitpoints[j],
z0 = splitpoints[j - 1],
z2 = splitpoints[j + 1];
@ -327,12 +327,12 @@ function fairify(scurve, gizmo, denseQ, cleanMore) {
}
}
// Rebuild curve
for (var j = 0; j < splitpoints.length; j++) if (splitpoints[j].onCurve && !splitpoints[j].remove && splitpoints[j + 1] && !splitpoints[j + 1].onCurve) {
for (var j = 0; j < splitpoints.length; j++) if (splitpoints[j].on && !splitpoints[j].remove && splitpoints[j + 1] && !splitpoints[j + 1].on) {
for (var k = j + 2; k < splitpoints.length && splitpoints[k].remove; k++);
if (k - j > 2) {
var zs = fitpts(splitpoints[j], splitpoints[j + 1], splitpoints[k], splitpoints[k + 1]);
if (zs) {
zs[0].onCurve = zs[1].onCurve = false;
zs[0].on = zs[1].on = false;
zs[0].cubic = zs[1].cubic = true;
splitpoints[j + 1] = zs[0];
splitpoints[k] = zs[1];

View File

@ -25,7 +25,7 @@ define [closepoint p q t] : begin
define [oncurveRemovable a b c t] : begin
local xm : (a.x + c.x) / 2
local ym : (a.y + c.y) / 2
return : [not a.onCurve] && b.onCurve && [not c.onCurve] && [not a.cubic] && [not c.cubic] && (a.x <= b.x && b.x <= c.x || a.x >= b.x && b.x >= c.x) && (a.y <= b.y && b.y <= c.y || a.y >= b.y && b.y >= c.y) && [Math.abs (b.x - xm)] <= (t / 2) && [Math.abs (b.y - ym)] <= (t / 2)
return : [not a.on] && b.on && [not c.on] && [not a.cubic] && [not c.cubic] && (a.x <= b.x && b.x <= c.x || a.x >= b.x && b.x >= c.x) && (a.y <= b.y && b.y <= c.y || a.y >= b.y && b.y >= c.y) && [Math.abs (b.x - xm)] <= (t / 2) && [Math.abs (b.y - ym)] <= (t / 2)
define PRECISION 1000
define [cov x] : piecewise
@ -154,7 +154,7 @@ export all : class Glyph
local c {}
set c.tag : contour.tag || component.tag || t.defaultTag
foreach [point : items-of contour] : begin
c.push : new Point (point.x + shiftx) (point.y + shifty) point.onCurve point.cubic point.subdivided
c.push : new Point (point.x + shiftx) (point.y + shifty) point.on point.cubic point.subdivided
newcontours.push c
set this.contours : this.contours.concat newcontours
if (([not contours] || copyAnchors) && glyph.anchors) : begin
@ -187,7 +187,7 @@ export all : class Glyph
for [local j 1] (j < contour.length) [inc j] : begin
local point contour.(j)
piecewise
point.onCurve : begin
point.on : begin
if delta
: then : set buf : buf + "l \[cov : point.x - lx] \[cov : point.y - ly]"
: else : set buf : buf + "L \[cov point.x] \[cov point.y]"
@ -215,16 +215,52 @@ export all : class Glyph
inc j
set buf : buf + " Z\n"
return buf
static [contourToStandardCubic contour] : begin
local c {}
if (!contour || !contour.length) : return c
local lx contour.0.x
local ly contour.0.y
c.push {.x lx .y ly .on true}
for [local j 1] (j < contour.length) [inc j] : begin
local point contour.(j)
piecewise
point.on : begin
c.push {.x point.x .y point.y .on true}
set {.x lx .y ly} point
point.cubic : begin
local z1 point
local z2 contour.(j + 1)
local z3 contour.(j + 2)
c.push {.x z1.x .y z1.y .on false}
c.push {.x z2.x .y z2.y .on false}
c.push {.x z3.x .y z3.y .on true}
set {.x lx .y ly} z3
set j : j + 2
true : begin
local zc point
local zf : if contour.(j + 1) contour.(j + 1) contour.0
local x1 : mix lx zc.x (2 / 3)
local y1 : mix ly zc.y (2 / 3)
local x2 : mix zf.x zc.x (2 / 3)
local y2 : mix zf.y zc.y (2 / 3)
c.push {.x x1 .y y1 .on false}
c.push {.x x2 .y y2 .on false}
c.push {.x zf.x .y zf.y .on true}
set {.x lx .y ly} zf
inc j
return c
public [cleanup t] : begin
foreach c [range 0 this.contours.length] : begin
local ocontour this.contours.(c)
# add infections
local contour {[new Point ocontour.0.x ocontour.0.y ocontour.0.onCurve]}
local contour {[new Point ocontour.0.x ocontour.0.y ocontour.0.on]}
local flag 0
foreach [j : range 1 (ocontour.length - 1)] : piecewise
flag : dec flag
ocontour.(j).onCurve : contour.push ocontour.(j)
ocontour.(j).on : contour.push ocontour.(j)
ocontour.(j).cubic : begin
local p0 contour.(contour.length - 1)
local p1 ocontour.(j)
@ -249,7 +285,7 @@ export all : class Glyph
local p0 contour.(contour.length - 1)
local p1 ocontour.(j)
local p2 ocontour.(j + 1)
if [not p2.onCurve] : set p2 : new Point [mix p1.x p2.x 0.5] [mix p1.y p2.y 0.5] true
if [not p2.on] : set p2 : new Point [mix p1.x p2.x 0.5] [mix p1.y p2.y 0.5] true
local strand : new Bezier p0.x p0.y p1.x p1.y p2.x p2.y
local ts [strand.extrema].y
piecewise
@ -265,7 +301,7 @@ export all : class Glyph
new Point s.points.2.x s.points.2.y true
set flag 1
contour.push [new Point ocontour.(ocontour.length - 1).x ocontour.(ocontour.length - 1).y ocontour.(ocontour.length - 1).onCurve]
contour.push [new Point ocontour.(ocontour.length - 1).x ocontour.(ocontour.length - 1).y ocontour.(ocontour.length - 1).on]
# cleanup
local cleanedContour {}
@ -296,7 +332,7 @@ export all : class Glyph
set contour.(k + 2).unimportant true
set k : k + 2
if found : begin
set contour.(j).onCurve true
set contour.(j).on true
set j (k - 1)
foreach point [items-of contour] : if [not point.unimportant] : cleanedContour.push point
this.contours.(c) = cleanedContour

View File

@ -1,14 +1,14 @@
export all : class Point
public [new x y onCurve cubic subdivided] : begin
public [new x y on cubic subdivided] : begin
this.x = x
this.y = y
this.onCurve = onCurve || false
this.on = on || false
this.subdivided = subdivided || false
this.cubic = cubic || false
static [transformed tfm x y onCurve cubic subdivided] : new Point
static [transformed tfm x y on cubic subdivided] : new Point
* x * tfm.xx + y * tfm.yx + tfm.x
* x * tfm.xy + y * tfm.yy + tfm.y
* onCurve
* on
* cubic
* subdivided

View File

@ -14,7 +14,7 @@ export all : class Transform
static [transformPoint tfm pt] : new Point
* pt.x * tfm.xx + pt.y * tfm.yx + tfm.x
* pt.x * tfm.xy + pt.y * tfm.yy + tfm.y
* pt.onCurve
* pt.on
* pt.cubic
* pt.subdivided
static [inverse tfm] : begin
@ -31,6 +31,6 @@ export all : class Transform
return : new Point
* (xx * tfm.yy - yy * tfm.yx) / denom
* (yy * tfm.xx - xx * tfm.xy) / denom
* pt.onCurve
* pt.on
* pt.cubic
* pt.subdivided