574 KiB
Building Iosevka from Source
Getting the files
To make the font, first you need to have the files that contain the repository’s source code. Here are two ways:
- Download the archive of Iosevka’s source code, then extract its contents into somewhere on your computer.
- Cloning this repository using Git:
git clone --depth 1 https://github.com/be5invis/Iosevka.git
Building
To build Iosevka you should:
- Install
nodejs(≥ 18.0.0) andttfautohint. Make sure that they are accessible fromPATHenvironment variable. - Open a CLI shell in a terminal,
cdinto the directory containing Iosevka source code. - Run
npm install. This command will install all the NPM dependencies. - Run
npm run build -- contents::Iosevka. This command will build your fonts.
You will find TTFs, as well as WOFF(2) web fonts and one Webfont CSS in the dist/ directory.
To using Docker build, read docker/README.md.
Customized Build
To create a custom build, you need:
-
Create
private-build-plans.tomlfile if absent, place alongside thebuild-plans.tomlin the repository. -
Add a build plan into
private-build-plans.toml. The configurable properties are described in the following sections. -
Run
npm run build -- contents::<your plan name>and the built fonts would be available indist/. Aside fromcontents::<plan>, other options are:contents::<plan>: Everything (TTF + webfont, hinted + unhinted);ttf::<plan>: TTF only;ttf-unhinted::<plan>: Unhinted TTF only;webfont::<plan>: Web fonts only (CSS + WOFF2);webfont-unhinted::<plan>: Unhinted web fonts only (CSS + WOFF2);woff2::<plan>: WOFF2 only.woff2-unhinted::<plan>: Unhinted WOFF2 only.
⚠️ Important: By default, the build system will schedule a number of concurrently running jobs equal to the number of threads available on the CPU, which will push CPU usage and also likely RAM usage, if you do not have very much to work with, to the ceiling (each job consumes more than 1 GB of RAM at its peak). If this is an issue for you, pass an additional argument --jCmd=<number of concurrent jobs>.
Configuring Custom Build
Configuration of build plans are organized under [buildPlans.<plan name>] sections in the private-build-plans.toml. You can use the Customizer to create the build plan, and/or manually edit them, following the instructions below. It is recommended to use PascalCase in the plan names.
Inside the plan, top-level properties include:
family: String, defines the family name of your custom variant.spacing: Optional, String, denotes the spacing of the custom variant. Valid values include:normal: The normal monospace font.quasi-proportional: The font will become quasi-proportional.quasi-proportional-extension-only: The font will become quasi-proportional, but will not shrink narrow letters (likei). Only wide letters (likeM) will get expanded.term: Make the symbols' width suitable for terminal emulators. Arrows and geometric symbols will become narrower.fontconfig-mono: Applytermspacing changes and further apply changes to be compatible with FontConfig's Mono spacing, which recognizes a font as monospace if and only if its every non-combining characters having the same width. The changes include:- Completely remove wide glyphs. All non-combining glyphs will be exactly the same width.
- As a consequence, the following characters will be removed:
U+27F5LONG LEFTWARDS ARROWU+27F6LONG RIGHTWARDS ARROWU+27F7LONG LEFT RIGHT ARROWU+27F8LONG LEFTWARDS DOUBLE ARROWU+27F9LONG RIGHTWARDS DOUBLE ARROWU+27FALONG LEFT RIGHT DOUBLE ARROWU+27FBLONG LEFTWARDS ARROW FROM BARU+27FCLONG RIGHTWARDS ARROW FROM BARU+27FDLONG LEFTWARDS DOUBLE ARROW FROM BARU+27FELONG RIGHTWARDS DOUBLE ARROW FROM BARU+27FFLONG RIGHTWARDS SQUIGGLE ARROWU+2B33LONG LEFTWARDS SQUIGGLE ARROW
- As a consequence, the following characters will be removed:
- Remove
NWIDandWWIDfeatures typographic features
- Completely remove wide glyphs. All non-combining glyphs will be exactly the same width.
fixed: Applyfontconfig-monochanges and further remove ligations.
serifs: Optional, String, configures style of serifs.- When set to
slab, the font will be converted into slab-serif. - Otherwise the font will be sans-serif.
- When set to
noCvSs: Optional, Boolean, disablescv##andss##OpenType features.noLigation: Optional, Boolean, disables ligations.exportGlyphNames: Optional, Boolean, whether to export glyph names into the fonts. Setting this totruewill increase file footprint, however this is necessary for ligature support in Kitty.webfontFormats: Optional, Array of String. Controls the formats needed to be exported into the webfont CSS. Valid options are'TTF'and'WOFF2', or including both.buildTextureFeature: Optional, Boolean, whether to build theTXTRfeature for cross-letter texture adjustments. Defaults to false.
Build plan could have 9 optional subsections:
ligationsvariantsweightswidthsslopescompatibilityLigaturesexcludeCharsmetricOverridenamingOverride
Configuring Ligations
Subsection ligations is used to customize the ligation set assigned to calt OpenType feature. Properties include:
-
inherits: Optional, String, defines the inherited ligation set. When absent, the ligation set will not inherit any other sets. Valid values are:default-calt: Inherit default ligation set.dlig: Default ligation set would be assigned to Discretionary ligatures.clike: Default ligation set would be assigned to C-Like.javascript: Default ligation set would be assigned to JavaScript.php: Default ligation set would be assigned to PHP.julia: Default ligation set would be assigned to Julia.raku: Default ligation set would be assigned to Raku.ml: Default ligation set would be assigned to ML.fsharp: Default ligation set would be assigned to F#.fstar: Default ligation set would be assigned to F*.haskell: Default ligation set would be assigned to Haskell.idris: Default ligation set would be assigned to Idris.elm: Default ligation set would be assigned to Elm.purescript: Default ligation set would be assigned to PureScript.swift: Default ligation set would be assigned to Swift.dafny: Default ligation set would be assigned to Dafny.coq: Default ligation set would be assigned to Coq.matlab: Default ligation set would be assigned to Matlab.verilog: Default ligation set would be assigned to Verilog.wolfram: Default ligation set would be assigned to Wolfram Language (Mathematica).erlang: Default ligation set would be assigned to Erlang Language.
-
disablesandenables: Optional, String Array, Cherry-picking ligation groups to be disabled or enabled. Valid values include:center-ops: Vertically align some of the operators (like*) to the center position it is before or after a "center" operator (like+).center-op-trigger-plus-minus-l: Plus (+) and Minus (-) will trigger other operator characters at left to be centered.center-op-trigger-plus-minus-r: Plus (+) and Minus (-) will trigger other operator characters at right to be centered.center-op-trigger-equal-l: Equal (=) will trigger other operator characters at left to be centered.center-op-trigger-equal-r: Equal (=) will trigger other operator characters at right to be centered.center-op-trigger-bar-l: Bars (|) will trigger other operator characters at left to be centered.center-op-trigger-bar-r: Bars (|) will trigger other operator characters at right to be centered.center-op-trigger-angle-inside: Less (<) and Greater (>) will trigger other operator characters at inside to be centered.center-op-trigger-angle-outside: Less (<) and Greater (>) will trigger other operator characters at outside to be centered.center-op-influence-dot: Treat dot (.) as operator and perform chained centering.center-op-influence-colon: Treat colon (:) as operator and perform chained centering.arrow-l: Enable ligation set that forms left-pointing arrows.arrow-r: Enable ligation set that forms right-pointing arrows.arrow-lr: Enable ligation set that forms dual-pointing arrows.counter-arrow-l: Enable ligation that produces left-pointing counter-arrows.counter-arrow-r: Enable ligation that produces right-pointing counter-arrows.trig: Enable ligation for<|,|>,<||, and other bar-and-angle-bracket symbols.eqeqeq: Enable special ligation for===with triple lines.eqeq: Enable ligation for==and===.lteq: Enable ligation for<=as less-than-or-equal sign.eqlt: Enable ligation for=<as less-than-or-equal sign.gteq: Enable ligation for>=as greater-than-or-equal sign.lteq-separate: Display<=as separate shape.eqlt-separate: Display=<as separate shape.gteq-separate: Display>=as separate shape.exeqeqeq: Enable special ligation for!===with triple lines.exeqeq: Enable special ligation for!==with triple lines.eqexeq: Enable special ligation for=!=with triple lines.eqexeq-dl: Enable special ligation for=!=with double lines.exeq: Enable ligation for!=and!==.tildeeq: Enable ligation for~=as inequality.eqslasheq: Enable special triple-line ligation for=/=as inequality.slasheq: Enable ligation for/=and=/=as inequality.ltgt-ne: Enable ligation for<>as inequality.ltgt-diamond: Enable ligation for<>as diamond.ltgt-diamond-tag: Enable ligation for<>as diamond-shaped empty HTML/XML tag.ltgt-slash-tag: Enable ligation for</,/>and</>.brst: Center asterisk in(*and*).slash-asterisk: Shift asterisk in/*and*/.kern-dotty: Move connecting dotty punctuations closer, like for::,:::and....kern-bars: Move consecutive bars closer, like for||,|||and//.logic: Enable ligation for/\and\/.llgg: Enable ligation for<<,>>and other angle-bracket chaining.llggeq: Enable ligation for<<=,>>=as shift operator.html-comment: Enable ligation for<!--and<!---.colon-greater-as-colon-arrow: Transform:>into:and a narrow arrow.brace-bar: Enable ligation for{|and|}.brack-bar: Enable ligation for[|and|].tilde-tilde: Make 2 or more contiguous ASCII tildes (like~~,~~~and~~~~) connected as a wave line.tilde-tilde-tilde: Make 3 or more contiguous ASCII tildes (like~~~and~~~~) connected as a wave line.minus-minus: Make 2 or more contiguous hyphen-minuses (like--,---and----) connected as a straight solid line.minus-minus-minus: Make 3 or more contiguous hyphen-minuses (like---and----) connected as a straight solid line.plus-plus: Make 2 or more contiguous plus signs (like++,+++and++++) connected..plus-plus-plus: Make 3 or more contiguous plus signs (like+++and++++) connected..underscore-underscore: Make 2 or more contiguous underscores (like__,___and____) connected.underscore-underscore-underscore: Make 3 or more contiguous underscores (like___and____) connected.hash-hash: Make 2 or more contiguous hash signs (number signs) (like##,###and####) connected.hash-hash-hash: Make 3 or more contiguous hash signs (number signs) (like##and###) connected.
Configuring Character Variants
Subsection variants is used to configure character variants in the font. Properties include:
-
inherits: Optional, String, defines the inherited stylistic set. Valid options include:ss01: Set character variant to “Andale Mono Style”.ss02: Set character variant to “Anonymous Pro Style”.ss03: Set character variant to “Consolas Style”.ss04: Set character variant to “Menlo Style”.ss05: Set character variant to “Fira Mono Style”.ss06: Set character variant to “Liberation Mono Style”.ss07: Set character variant to “Monaco Style”.ss08: Set character variant to “Pragmata Pro Style”.ss09: Set character variant to “Source Code Pro Style”.ss10: Set character variant to “Envy Code R Style”.ss11: Set character variant to “X Window Style”.ss12: Set character variant to “Ubuntu Mono Style”.ss13: Set character variant to “Lucida Style”.ss14: Set character variant to “JetBrains Mono Style”.ss15: Set character variant to “IBM Plex Mono Style”.ss16: Set character variant to “PT Mono Style”.ss17: Set character variant to “Recursive Mono Style”.ss18: Set character variant to “Input Mono Style”.ss20: Set character variant to “Curly Style”.- Other build plans’ configuration, using
inherits = "buildPlans.<Plan name>".
-
design,upright,italic, andoblique: Optional, Dictionary, defines styles for individual characters. The choices are organized in key-value pairs, assigning a variant to a character group. Alternatively, you could assign numbers tocv##tags, like what you did when using OpenType in CSS. Assignments underdesignwill be applied to all the slopes, andupright,italic, andobliquewill apply to corresponded slopes.In addition, style selector for default digit form also uses these dictionaries.
The valid combinations include:
- Default digit form
- APL form
- Styles for
19 variants
- Styles for
24 variants
- Styles for
3 - Styles for
412 variants
- Styles for
58 variants
- Styles for
6 - Styles for
712 variants
- Styles for
8 - Styles for
9 - Styles for
054 variants
- Styles for
A10 variants
- Styles for
B12 variants
- Styles for
C5 variants
- Styles for
D6 variants
- Styles for
E - Styles for
F - Styles for
G27 variants
- Styles for
H4 variants
- Styles for
I - Styles for
J14 variants
- Styles for
K20 variants
- Styles for
L - Styles for
M12 variants
- Styles for
N6 variants
- Styles for
P6 variants
- Styles for
Q10 variants
- Styles for
R30 variants
- Styles for
S5 variants
- Styles for
T - Styles for
U15 variants
- Styles for
V6 variants
- Styles for
W21 variants
- Styles for
X8 variants
- Styles for
Y8 variants
- Styles for
Z27 variants
- Styles for
a21 variants
- Styles for
b7 variants
- Styles for
c5 variants
- Styles for
d10 variants
- Styles for
e - Styles for
f20 variants
- Styles for
g10 variants
- Styles for
h7 variants
- Styles for
i14 variants
- Styles for
j8 variants
- Styles for
k27 variants
- Styles for
l14 variants
- Styles for
m44 variants
- Styles for
n17 variants
- Styles for
p7 variants
- Styles for
q16 variants
- Styles for
r20 variants
- Styles for
s5 variants
- Styles for
t24 variants
- Styles for
u13 variants
- Styles for
v8 variants
- Styles for
w23 variants
- Styles for
x14 variants
- Styles for
y18 variants
- Styles for
z27 variants
- Styles for
ẞ(Capital Eszet)8 variants
- Styles for
ſ(Long-S)30 variants
- Styles for
ß(Eszet)40 variants
- Styles for
ð(Lowercase Eth (ð)) - Styles for
Þ(Capital Thorn (Þ)) - Styles for
þ(Lowercase Thorn (þ)) - Styles for
α(Greek lower Alpha)12 variants
- Styles for
β(Greek lower Beta) - Styles for
Γ(Greek capital Gamma)4 variants
- Styles for
γ(Greek lower Gamma) - Styles for
Δ(Greek capital Delta (Δ)) - Styles for
δ(Greek lower Delta) - Styles for
ι(Greek lower Iota)12 variants
- Styles for
Λ(Greek capital Lambda (Λ))8 variants
- Styles for
λ(Greek lower Lambda)6 variants
- Styles for
μ(Greek lower Mu)13 variants
- Styles for
ν(Greek lower Nu) - Styles for
ξ(Greek lower Xi) - Styles for
π(Greek lower Pi) - Styles for
τ(Greek lower Tau)6 variants
- Styles for
υ(Greek lower Upsilon)4 variants
- Styles for
φ(Greek lower Phi) - Styles for
χ(Greek lower Chi)13 variants
- Styles for
ψ(Greek lower Psi)4 variants
- Styles for
а(Cyrillic Lower A)21 variants
- Styles for
в(Cyrillic Lower Ve)8 variants
- Styles for
Ж(Cyrillic Capital Zhe)5 variants
- Styles for
ж(Cyrillic Lower Zhe)5 variants
- Styles for
З(Cyrillic Capital Ze)7 variants
- Styles for
з(Cyrillic Lower Ze)7 variants
- Styles for
К(Cyrillic Capital Ka)20 variants
- Styles for
к(Cyrillic Lower Ka)20 variants
- Styles for
л(Cyrillic Lower El) - Styles for
м(Cyrillic Lower Em)12 variants
- Styles for
Н(Cyrillic Capital En)4 variants
- Styles for
н(Cyrillic Lower En)7 variants
- Styles for
Р(Cyrillic Capital Er)6 variants
- Styles for
р(Cyrillic Lower Er)7 variants
- Styles for
У(Cyrillic Capital U)18 variants
- Styles for
у(Cyrillic Lower U)18 variants
- Styles for
ф(Cyrillic Lower Ef)10 variants
- Styles for
ч(Cyrillic Lower Che) - Styles for
ь,ъ(Cyrillic Lower Yeri and related letters)3 variants
- Styles for
ы(Cyrillic Lower Yery)6 variants
- Styles for
Э(Cyrillic Capital E (Э))7 variants
- Styles for
э(Cyrillic Lower E (э))7 variants
- Styles for
Я(Cyrillic Capital Ya)18 variants
- Styles for
я(Cyrillic Lower Ya)36 variants
- Styles for
ij(Dots in letters “i” and “j” in particular) - Styles for
öẋ(Dot and Comma shape in diacritics) - Styles for
.,,:;(Dot and Comma shape in punctuations and symbols) - Styles for
⣝⣑(Dot shape in braille) - Styles for
~ - Styles for
*12 variants
- Styles for
_ - Styles for
^ - Styles for
`3 variants
- Styles for
' - Styles for
(,) - Styles for
{,} - Styles for
«,»(Guillemets) - Styles for
#8 variants
- Styles for
&8 variants
- Styles for
@9 variants
- Styles for
$12 variants
- Styles for
¢12 variants
- Styles for
%4 variants
- Styles for
|,¦ - Styles for
? - Styles for
¶ - Styles for
∂(Partial derivative symbol) - Styles for
µ(Micro sign)13 variants
- Styles for
<=,>=(Less-equal and Greater-equal ligations) - Styles for
!=(Not-equal ligations)6 variants
- Styles for
==(Equality ligations) - Styles for
--(Hyphen-minus ligations) - Styles for
++(Plus ligations) - Styles for
=>(Double arrow ligation) - Styles for
->(Single arrow ligation)
Configuring Weights, Widths and Slopes
Subsection weights is used to change the weight grades that the custom family needs. It is a dictionary from the filename suffix (in PascalCase) to either...
- A string formatted in
default.<weight>format, meaning reusing a default weight grade; - Or, a sub-object with properties:
shape: Number, configures the weight grade of the glyphs' shapes.menu: Integer, configures the weight grade used when naming fonts.css: Integer, configures the weight grade used in web font CSS.
Subsection widths is used to change the width grades that the custom family needs. It is a dictionary from the filename suffix (in PascalCase) to either...
- A string formatted in
default.<width>format, meaning reusing a default width grade; - Or, a sub-object with properties:
shape: Number, configures the width of the glyphs' shapes, measured in 1/1000 em.menu: Integer, configures the width grade used when naming fonts. The valid values are from1to9, inclusive.css: String, configures the font-stretch value used in web font CSS.
Subsection slopes is used to change the slope angles and grades that the custom family needs. It is a dictionary from the filename suffix (in PascalCase) to either...
- A string formatted in
default.<slope>format, meaning reusing a default slope grade; - Or, a sub-object with properties:
angle: Number, configures the slope angle in degrees. The valid vales are from0to15, inclusive.shape: String fromupright,italicoroblique. Configures the slope used for variant selection.menu: String fromupright,italicoroblique. Configures the slope grade used when naming fonts.css: String fromnormal,italicoroblique. Configures the CSS font-style value.
In addition to list all the weights/widths/slopes directly, the user could also configure the weights/widths/slopes list using “inherits” to inherit the list from another build plan:
[buildPlans.IosevkaCustom2]
family = "Iosevka Custom 2"
weights.inherits = "buildPlans.IosevkaCustom1" # Inherit weights list from "IosevkaCustom1"
widths.inherits = "buildPlans.IosevkaCustom1" # Inherit widths list from "IosevkaCustom1"
slopes.inherits = "default" # Inherit slopes list from default
Compatibility Ligatures
Certain software, notably Emacs, relies on pre-encoded ligatures instead of OpenType to provide ligations. Iosevka could be configured with additional subsection compatibilityLigatures, being an array of records with following fields:
unicode: The PUA code point being assigned to.featureTag: The feature tag to compute ligations.sequence: The source character sequence.
A sample of compatibility ligature config is:
[[buildPlans.IosevkaCustom.compatibilityLigatures]]
unicode = 57600 # 0xE100
featureTag = 'calt'
sequence = '<*>'
Excluding Characters
Use the excludeChars configuration to exclude character ranges from the font.
[buildPlans.iosevkaCustom.excludeChars]
ranges = [[10003, 10008]]
Metric Override
Subsection metricOverride provides ability to override certain metric values, if you reallly want to. Adding this section is strongly discouraged as it may introduce broken geometry or broken shapes.
| Property | Unit | Default Value | Meaning |
|---|---|---|---|
cap |
emu | 735 | Height of H. |
ascender |
emu | 735 | Height of b. |
xHeight |
emu | 520 | Height of x. |
sb |
emu | (varies, 60 for Regular) | Width of common side-bearings. |
accentWidth |
emu | 200 | Width of accent marks. |
accentClearance |
emu | 72 | Vertical clearance of accent marks to the base. |
accentHeight |
emu | 176 | Height of accent marks. |
accentStackOffset |
emu | 220 | Offset height of accent mark stack. |
dotSize |
emu | (varies, 125 for regular) | Size of dots in diacritic marks. |
periodSize |
emu | (varies, 140 for regular) | Size of dots in period. |
leading |
emu | 1250 | Built-in line height. |
symbolMid |
emu | 340 | Height of the center of hyphen (-). |
parenSize |
emu | 966 | Height of Parentheses. |
winMetricAscenderPad |
emu | 0 | Additional pad for Win metrics’ ascender to avoid clipping in legacy Windows applications. |
winMetricDescenderPad |
emu | 0 | Additional pad for Win metrics’ descender to avoid clipping in legacy Windows applications. |
powerlineScaleX, powerlineScaleY |
(ratio) | 1 | X and Y scale of Powerline glyphs. |
powerlineShiftX, powerlineShiftY |
emu | 0 | X and Y shift of Powerline glyphs. |
onumZeroHeightRatio |
(ratio) | 1.145 | Ratio of height of 0 under onum feature, to the height of x. |
essRatio |
(ratio) | (varies, 1.12 for Regular) | Ratio of the thickness of the neck of S/s/?, to the normal stroke width. essRatioUpper, essRatioLower and rssRatioQuestion will override this value for corresponded glyph categories when set. |
essRatioUpper |
(ratio) | (varies, 1.12 for Regular) | Ratio of the thickness of the neck of S, to the normal stroke width. |
essRatioLower |
(ratio) | (varies, 1.12 for Regular) | Ratio of the thickness of the neck of s, to the normal stroke width. |
essRatioQuestion |
(ratio) | (varies, 1.12 for Regular) | Ratio of the thickness of the neck of ?, to the normal stroke width. |
archDepth |
emu | (varies, 195 for Regular) | Depth of the curve segment of arches / O rings in capital letters. |
smallArchDepth |
emu | (varies, 200 for Regular) | Depth of the curve segment of arches / O rings in small letters. |
The values of each item could be either a number, or a string representing an expression so that it could be different for different instance fonts, or depending on default values. The syntax of valid expressions are:
Expression -> Term (('+' | '-') Term)*
Term -> Factor (('*' | '/') Factor)*
Factor -> ('+' | '-')* Primitive
Primitive -> Literal
| Call
| Binding
| Group
| List
Literal -> ['0'..'9']+ ('.' ['0'..'9']+)?
Identifier -> ['A'..'Z', 'a'..'z', '_']+
Call -> Identifier '(' Expression (',' Expression)* ')'
List -> Identifier '[' Expression (',' Expression)* ']'
Binding -> Identifier
Valid identifiers include:
weight: being the weight grade;width: being the characters' unit width, measured in em-units;slopeAngle: being the slope angle in degrees;- Default value of all overridable metrics, prefixed with
default_, i.e., defaultcapvalue will be accessable thorughdefault_cap.
Valid functions include:
blend(x, [x1, y1], [x2, y2], ...): Perform a smooth interpolation through data pairs [x1, y1], [x2, y2], ..., against parameter x.
For example, the following configuration:
[buildPlans.IosevkaCustom.metricOverride]
leading = 1500
sb = 'default_sb * 1.0625 + 15'
dotSize = 'blend(weight, [100, 50], [400, 125], [900, 180])'
will:
- Override line height to
1500em-unit; - Override the sidebearing value by its value multiplied by
1.0625then added with15. - Override the dot size by a interpolation against weight: at thin (
100) being50, at regular (400) being125, and at heavy (900) being180.
Naming Override
The properties in the namingOverride section could be uase to override menu names of the produced font. The following properties will be applied to the font directly:
copyright: Name ID 0, copyright notice.manufacturer: Name ID 8, manufacturer name.designer: Name ID 9, designer name.description: Name ID 10, description of the typeface.urlVendor: Name ID 11, URL of font vendor.urlDesigner: Name ID 12, URL of typeface designer.license(or alternativelylicence): Name ID 13, license description.licenseURL(or alternativelylicenceURL): Name ID 14, license Info URL.version: Override font version. The version number should follow SemVer, like being1.0.0.
Additionally, the namingOverride section now supports a menuNameMap configuration property. This property allows for the customization of menu names based on specific attributes related to the font's style and characteristics. The menuNameMap configuration is structured as follows:
weight: A mapping of menu weight numbers to their corresponding names.width: A mapping of menu width numbers to their corresponding names.slope: A mapping of menu slope values ("normal"/"italic"/"oblique") to their corresponding names.weightShort: A mapping of menu weight numbers to short names.widthShort: A mapping of menu width numbers to short names.slopeShort: A mapping of menu slope values ("normal"/"italic"/"oblique") to short names.
You are allowed to provide override names only for the values that you want to have custom names. Any values not specified in these mappings will use the default names.
For example, the following configuration:
[buildPlans.IosevkaCustom.namingOverride.menuNameMap.width]
7 = "Expanded"
[buildPlans.IosevkaCustom.namingOverride.menuNameMap.widthShort]
7 = "Exp"
... will name width 7 to "Expanded" in full, and "Exp" in short.
Sample Configuration
A sample configuration could be found at private-build-plans.sample.toml.
TTC Building
It is possible to create a customized TTC build by using the following method:
- Add a collect plan into
private-build-plans.toml, with afromfield containing all the TTF groups it needs:
[collectPlans.IosevkaCustom]
from = ["IosevkaCustom1", "IosevkaCustom2"]
- Run build with the following command:
npm run build -- ttc::IosevkaCustom: Create TTCs from collectionIosevkaCustom; The file will be saved intodist/.ttc.npm run build -- super-ttc::IosevkaCustom: Create a single-file TTC from collectionIosevkaCustom; The file will be saved intodist/.super-ttc.
Baking other OpenType features
There are tools tha could be used to bake other OpenType that are not configurable with TOML files (like baking localized forms). The tools include:
- https://mutsuntsai.github.io/fontfreeze/
- https://github.com/twardoch/fonttools-opentype-feature-freezer
These tools could be used in post-processing fonts. Please refer their documents for instructions.