fix SLAB spacing

This commit is contained in:
be5invis 2017-04-04 15:15:33 +08:00
parent bbdf93b611
commit 9f13713fd2
4 changed files with 67 additions and 51 deletions

View file

@ -1,16 +1,20 @@
# Iosevka ![Version](https://img.shields.io/github/release/be5invis/Iosevka.svg) [![Donate](https://img.shields.io/badge/donate-alipay-orange.svg)](http://7xpdnl.dl1.z0.glb.clouddn.com/T1v4huXnleXXXXXXXX.png) # Iosevka ![Version](https://img.shields.io/github/release/be5invis/Iosevka.svg) [![Donate](https://img.shields.io/badge/donate-alipay-orange.svg)](http://7xpdnl.dl1.z0.glb.clouddn.com/T1v4huXnleXXXXXXXX.png)
Coders' typeface, built from code. //[→ Inziu Iosevka for Chinese and Japanese.](http://be5invis.github.io/Iosevka/inziu.html) Coders typeface, built from code.
![](https://raw.githubusercontent.com/be5invis/Iosevka/master/images/preview-all.png) ![](https://raw.githubusercontent.com/be5invis/Iosevka/master/images/preview-all.png)
Chinese and Japanese users → [Inziu Iosevka for Chinese and Japanese.](http://be5invis.github.io/Iosevka/inziu.html) (A **hinted** Composite with M+ and Source Han Sans.)
## Installation ## Installation
Quit your editor/program. Unzip and open the folder. Quit your editor/program. Unzip and open the folder.
* **[Instructions for OS X](http://support.apple.com/kb/HT2509)**
* **[Instructions for Windows](https://www.microsoft.com/en-us/Typography/TrueTypeInstall.aspx)** * **[Instructions for Windows](https://www.microsoft.com/en-us/Typography/TrueTypeInstall.aspx)**
* **Linux** : Copy the .ttf files to your fonts directory → Run `sudo fc-cache`. * **[Instructions for macOS](http://support.apple.com/kb/HT2509)**
* Standard distribution in Homebrew: `brew tap caskroom/fonts && brew cask install font-iosevka` (May be outdated).
* Customizable install using Homebrew: see [robertgzr/homebrew-tap](https://github.com/robertgzr/homebrew-tap).
* **Linux** : Copy the TTF files to your fonts directory → Run `sudo fc-cache`.
- Arch Linux users can install the font from the AUR [here](https://aur.archlinux.org/packages/ttf-iosevka) using an AUR wrapper or by doing it manually. [All variants](https://aur.archlinux.org/packages/?O=0&SeB=nd&K=ttf-iosevka&SB=n&SO=a&PP=50&do_Search=Go). - Arch Linux users can install the font from the AUR [here](https://aur.archlinux.org/packages/ttf-iosevka) using an AUR wrapper or by doing it manually. [All variants](https://aur.archlinux.org/packages/?O=0&SeB=nd&K=ttf-iosevka&SB=n&SO=a&PP=50&do_Search=Go).
- Void Linux users can install the font with `xbps-install font-iosevka`. - Void Linux users can install the font with `xbps-install font-iosevka`.
@ -20,7 +24,7 @@ The typeface contains seven weights (thin, extra-light, light, regular, medium,
![Weights sample](https://raw.githubusercontent.com/be5invis/Iosevka/master/images/weights.png) ![Weights sample](https://raw.githubusercontent.com/be5invis/Iosevka/master/images/weights.png)
All versions include the same ranges of characters: Latin letters, Greek letters (including Polytonic Greek), some Cyrillic letters, IPA symbols and common punctuations and some symbols. You can check out the full list [here](http://be5invis.github.io/Iosevka/specimen.html). All versions include the same ranges of characters: Latin letters, Greek letters (including Polytonic), some Cyrillic letters, IPA symbols and common punctuations and some symbols. You can check out the full list [here](http://be5invis.github.io/Iosevka/specimen.html).
![Languages Sample](https://raw.githubusercontent.com/be5invis/Iosevka/master/images/languages.png) ![Languages Sample](https://raw.githubusercontent.com/be5invis/Iosevka/master/images/languages.png)
@ -28,17 +32,19 @@ Iosevka supports accessing all letter variants using OpenType features.
![OpenType Sample](https://raw.githubusercontent.com/be5invis/Iosevka/master/images/opentype.png) ![OpenType Sample](https://raw.githubusercontent.com/be5invis/Iosevka/master/images/opentype.png)
## Ligations (Experimental) ### Ligations
![Ligations Sample](https://raw.githubusercontent.com/be5invis/Iosevka/master/images/ligations.png) ![Ligations Sample](https://raw.githubusercontent.com/be5invis/Iosevka/master/images/ligations.png)
Iosevkas default ligation set is assigned to `calt` feature, though not all of them are enabled by default. Iosevka supports Language-Specific Ligations, which is the ligation set enabled only under certain languages. These ligation sets are assigned to custom feature tags, like `XHS_`. Iosevkas default ligation set is assigned to `calt` feature, though not all of them are enabled by default.
Iosevka supports Language-Specific Ligations, which is the ligation set enabled only under certain languages. These ligation sets are assigned to custom feature tags, like `XHS0`.
## Building from Source ## Building from Source
To build Iosevka you should: To build Iosevka you should:
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 GNU `make` (≥ 4.1; BSD `make` may not work) 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.7.0) and GNU `make` (≥ 4.1; BSD `make` may not work) are runnable in your terminal.
- Windows users may need to install MinGW and make POSIX 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/) or MSYS2 works fine. - Windows users may need to install MinGW and make POSIX 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/) or MSYS2 works fine.
2. Install necessary libs by `npm install`. If youve installed them, upgrade to the latest. 2. Install necessary libs by `npm install`. If youve installed them, upgrade to the latest.
3. `make` (or `gmake`). 3. `make` (or `gmake`).
@ -82,6 +88,7 @@ The current available styles are:
* `slab` : Slab serif. When present, the family of your font would be `Iosevka Slab`. * `slab` : Slab serif. When present, the family of your font would be `Iosevka Slab`.
* Styles related to ligations and spacing: * Styles related to ligations and spacing:
- `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. - `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.
- `type` : Make some symbols, like arrows (`→`) and mathematical operators full-width.
- `stress-fw` : When included, full-width characters varying form `U+FF00` to `U+FFFF` will be boxed to present a clear distinguish between ASCII and Full-width. The family name will be set to “`Iosevka StFW`”. - `stress-fw` : When included, full-width characters varying form `U+FF00` to `U+FFFF` will be boxed to present a clear distinguish between ASCII and Full-width. The family name will be set to “`Iosevka StFW`”.
* All registered `ss##` and `cv##` feature tags, including: * All registered `ss##` and `cv##` feature tags, including:
* `ss01`~`ss10` : Predefined stylistic sets based on other Monospace fonts. * `ss01`~`ss10` : Predefined stylistic sets based on other Monospace fonts.
@ -147,4 +154,6 @@ The current available styles are:
* `v-numbersign-upright` : Number sign with vertical bars (default). * `v-numbersign-upright` : Number sign with vertical bars (default).
* `v-numbersign-slanted` : Number sign with slanted bars. * `v-numbersign-slanted` : Number sign with slanted bars.
---
![Family Matrix](https://raw.githubusercontent.com/be5invis/Iosevka/master/images/matrix.png) ![Family Matrix](https://raw.githubusercontent.com/be5invis/Iosevka/master/images/matrix.png)

View file

@ -40,11 +40,11 @@ endif
ifndef oblique ifndef oblique
oblique = normal oblique = normal
endif endif
ifndef poststyle ifndef prestyle
poststyle = nothing prestyle = nothing
endif endif
CREATECONFIG = node maker.js --custom $(set) --design '$(design)' --upright '$(upright)' --italic '$(italic)' --oblique '$(oblique)' --poststyle '$(poststyle)' > $(BUILD)/targets-$(set).mk CREATECONFIG = node maker.js --custom $(set) --design '$(design)' --upright '$(upright)' --italic '$(italic)' --oblique '$(oblique)' --prestyle '$(prestyle)' > $(BUILD)/targets-$(set).mk
custom-config : maker.js | $(BUILD)/ custom-config : maker.js | $(BUILD)/
$(CREATECONFIG) $(CREATECONFIG)

View file

@ -28,14 +28,14 @@ function getMapping(options) {
fileSuffix: "" fileSuffix: ""
}; };
let design = options.design || []; let design = options.design || [];
let poststyle = options.poststyle || []; let prestyle = options.prestyle || [];
let weight = options.weight || "book"; let weight = options.weight || "book";
let slantness = options.slantness || "upright"; let slantness = options.slantness || "upright";
let hives = ["iosevka"].concat( let hives = ["iosevka"].concat(
design, prestyle,
["w-" + weight, "s-" + slantness], ["w-" + weight, "s-" + slantness],
(options.styles || {})[slantness] || [], (options.styles || {})[slantness] || [],
poststyle design
); );
let dir = [ let dir = [
options.dirPrefix || "", options.dirPrefix || "",
@ -100,7 +100,7 @@ if (argv.custom) {
custom: '$(BUILD)/targets-' + argv.custom + '.mk', custom: '$(BUILD)/targets-' + argv.custom + '.mk',
name: "customized-" + argv.custom, name: "customized-" + argv.custom,
design: argv.design.trim().split(/ +/), design: argv.design.trim().split(/ +/),
poststyle: argv.poststyle.trim().split(/ +/), prestyle: argv.prestyle.trim().split(/ +/),
width: argv.width, width: argv.width,
infix: argv.custom, infix: argv.custom,
styles: { styles: {

View file

@ -81,31 +81,7 @@ fullwidth_codes = []
[verbose] [verbose]
verbose = true verbose = true
# Spacings ### Weights
[term]
spacing = 0
disableLigation = true
[term.adds]
family = ' Term'
[type]
inherits = ["xx-type"]
spacing = 2
[type.adds]
family = " Type"
[cc]
inherits = ["xx-cc"]
spacing = 3
[cc.adds]
family = 'CC'
# Weights
[w-book] [w-book]
isBold = false isBold = false
@ -214,7 +190,7 @@ rbalance2 = 25
rhook = 105 rhook = 105
smooth = 215 smooth = 215
# Slants ### Slantness
[s-upright] [s-upright]
isItalic = false isItalic = false
@ -235,7 +211,8 @@ jhook = 120
[s-oblique.adds] [s-oblique.adds]
style = " Oblique" style = " Oblique"
# Slab variant
### Slab variant
[slab] [slab]
slab = true slab = true
onebalance = 10 onebalance = 10
@ -245,7 +222,47 @@ sb = 1.1
[slab.adds] [slab.adds]
family = " Slab" family = " Slab"
### Spacings
[term]
spacing = 0
disableLigation = true
[term.adds]
family = ' Term'
[type]
inherits = ["xx-type"]
spacing = 2
[type.adds]
family = " Type"
[cc]
inherits = ["xx-cc"]
spacing = 3
[cc.adds]
family = 'CC'
### Widths
# Expanded : I heard someone want it being wider...
[wd-expanded.multiplies]
width = 1.15
sb = 1.15
[expanded]
inherits = ['wd-expanded']
[expanded.adds]
family = ' Expanded'
# Compressed : And someone else want it being narrower
[wd-compressed.multiplies]
width = 0.9
sb = 0.9
[compressed]
inherits = ['wd-compressed']
[compressed.adds]
family = ' Compressed'
###### Full-width codes ###### Full-width codes
[xx-type] [xx-type]
@ -311,16 +328,6 @@ fullwidth_codes = [
8243, #″ 8243, #″
] ]
# Expanded : I heard someone want it being wider...
[expanded.multiplies]
width = 1.15
sb = 1.15
# Compressed : And someone else want it being narrower
[compressed.multiplies]
width = 0.9
sb = 0.9
# stress-fw : force distinguish full-widths # stress-fw : force distinguish full-widths
[stress-fw] [stress-fw]
stressFW = true stressFW = true