• Stars
    star
    1,201
  • Rank 38,995 (Top 0.8 %)
  • Language
    Rust
  • License
    SIL Open Font Lic...
  • Created over 8 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Development repo of Inconsolata Fonts by Raph Levien

Inconsolata

Open-source monospace font for code listings, originally by @raphlinus

Ligatures

Inconsolata includes ligatures for a few JavaScript operators:

Ligatures sample

They are available in two families.

  • "Inconsolata" exposes the ligatures as dlig. These are disabled by default, and probably won't show up in your editor. You can enable them in CSS with this rule:
    font-variant-ligatures: discretionary-ligatures;
  • "Ligconsolata" exposes the ligatures as liga. These are enabled by default. This is the family you should use in your text editor.

Note: the Ligconsolata variant has not yet been upgraded to version 3.000, as we're prioritizing the non-ligature variants.

Building the family

Family is built using Glyphs, fontmake and gftools post processing script. Tools are all python based.

To install all the Python tools into a virtualenv, do the following:

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

To build the fonts we must load sources/Inconsolata-vf.glyphs in Glyphs and do the following:

  • Run the decompose-transformed-components.py script
  • Run the gen_instances.py script
  • Run the inco_fix.py script
  • Save the file back in the sources directory with the filename "prod.glyphs"

We can now run the build script in the terminal:

cd sources # script needs to be run from sources dir
sh build.sh

Fonts will take approximately 25 minutes to build.

Changelog v.3.000

Upgrade to 2-axis variable font family, with widths from 50 to 200, and weights from 200 to 900.

Changelog v.2.013

  • Removed ligatures for fi and fl.
  • Operator ligatures moved to dlig.
  • New variant "Ligconsolata" introduced, which exposes operator ligatures as liga.

Changelog v.2.011

March 2018 glyph set expansion was completed by @appsforartists, which included:

  • Glyph Set expanded to include ligatures for ===, !==, =>, <=, >=, ->, <-

Changelog v.2.001

August 2016 glyph set expansion was completed by Alexei Vanyashin ( Cyreal ), which included:

  • Glyph Set expanded to GF Latin Pro
  • Additional glyphs โŠ•โ†‘โ†—โ†’โ†˜โ†“โ†™โ†โ†–โ†”โ†•โ‡งโ‡จโ‡ฉโ‡ฆโฌ†โฎ•โฌ‡โฌ…โ—โ—‹โ—†โ—‡โ˜นโ˜บโ˜ปโ™ โ™ฃโ™ฅโ™ฆโœ“โœ”โœ•โœ—โœ˜โฃโŽ‹โŒ‚โ‡ชโŒงโŒซโŒฆโŒฅโŒ˜โŽ๏ฟฝ
  • Minor design improvements (trademark corner spurs)

Further reading: Inconsolata expansion project thread on Google Fonts Discussions

Supported glyphs sets:

  • GF Latin Pro

Inconsolata Preview

License

This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL


Inconsolata Build Instructions

Inconsolata fonts can be built using either export from Glyphs or using fontmake. The font files committed to this repo are done using fontmake.

Source Files

Inconsolata source files are available in .glyphs format located in the /sources directory.

Adding ligatures

  1. Follow the "Creating the ligature" section of the Glyphs ligatures tutorial.
  2. Name your new glyph with the suffix .dlig, for instance bar_greater.dlig.
  3. Open the Font Info panel.
    1. Switch to the Features tab.
    2. Click dlig in the sidebar.
    3. Click the Update button at the bottom of the panel.
    4. Switch to the Instances tab.
    5. Update the Rename Glyphs value for "Ligconsolata Regular" to include a new line for your new glyph, for instance:
      bar_greater.dlig=bar_greater.liga
      
    6. Update the Rename Glyphs value for "Ligconsolata Bold".
  4. Export the font, as explained below.

Exporting a variable font using fontmake

It's possible to export the project as a single variable font. It's just a bit tricky, because the font uses components with varying 2x2 components, triggering a bug which is present in both fontmake and Glyphs export. Thus, there's an inco_fix.py script in the sources directory that detects this case and decomposes just those components. Run that script before exporting. The script also decomposes corner components, which makes the resulting glyphs file suitable for fontmake export as well (fontmake currently has no support for corner components).

You can copy the script into the Scripts folder for Glyphs, which will make it available in the Script menu, or you can just copy it into the Macro Panel.

After running the script, the following fontmake invocation will generate a variable font:

fontmake -g sources/Inconsolata-vf.glyphs -o variable

This is the version in the fonts/ directory, as it is slightly smaller than the version generated by Glyphs.

We do not check the result of the inco_fix script into version control, as we want to preserve editability. It's entirely possible that a future version of fontmake (or Glyphs itself) will be able to handle the source file without running a script.

Exporting instances using fontmake

The source file contains 15 instances, including all weights of the normal (100) width, and also all masters. This is a reasonable complement for working on the font. Run the gen_instances.py script to generate a total of 72 instances; all combinations of the weights from 200 to 900, and widths 50, 70, 80, 90, 110, 120, 150, and 200.

There are two other instances for Ligconsolata, and fontmake will attempt to generate those, but the "Rename Glyphs" custom parameter doesn't seem to be respected by fontmake, so these won't have ligatures enabled. Use the Glyphs export instead (detailed below).

Then run this command to generate OTF:

fontmake -g sources/Inconsolata-vf.glyphs -i -o otf

And this command to generate autohinted TTF:

fontmake -g sources/Inconsolata-vf.glyphs -i -o ttf -a

These are the versions in the fonts/ directory.

Font Export options (from Glyphs)

This is the preferred way to generate the Ligconsolata instances, but

  • TTF and OTF files should be exported into /fonts/ttf and /fonts/otf folders.

  • TTFs should be generated from Glyphs App with Autohint option checked. At the moment there is no custom build script required to produce font files, since default TTFautohinting options suffice.

Font Export Options

  • OTFs should be generated with these options:
    • Remove Overlap
    • Autohint
    • Save as TTF
    • Export destination: $REPO_PATH/fonts/otf

Future work

In addition, we want to export a subset not including Vietnamese script coverage, to avoid over-large line spacing on older applications (such as terminals and text editors) that don't understand the "use typo metrics" flag (see #35).

Glyphstool

The repository also contains some Rust code to manipulate Glyphs format masters, in the glyphstool subdirectory. This was used to apply global transforms (mostly as a starting point for the width work). Perhaps the most valuable aspect is that it contains a fairly complete set of line and box drawing primitives, inspired by [Source Code Pro] but with actually variable weight and width. It's not particularly polished or well documented, but is provided for completeness, and it's possible that it could be adapted to future tools that work with font data in the Glyphs format. The code is licensed under Apache 2.0 or MIT, in keeping with the Rust tradition.


Copyright

Copyright 2006 The Inconsolata Project Authors

Links

More Repositories

1

roboto

The Roboto family of fonts
Python
3,796
star
2

noto-emoji

Noto Emoji fonts
Python
3,331
star
3

fontmake

Compile fonts from sources (UFO, Glyphs) to binary (OpenType, TrueType).
Python
763
star
4

morisawa-biz-ud-gothic

Python
615
star
5

compute-shader-101

Sample code for compute shader 101 training
Rust
515
star
6

morisawa-biz-ud-mincho

Python
471
star
7

fontra

A browser-based font editor
JavaScript
463
star
8

roboto-flex

HTML
434
star
9

sfntly

A Library for Using, Editing, and Creating SFNT-based Fonts
Java
432
star
10

amstelvar

a parametric variable font by David Berlow
330
star
11

fontview

Demo app that displays fonts with a free/libre/open-source text rendering stack: FreeType, HarfBuzz and Raqm
C++
321
star
12

spacemono

Original monospace display typeface family
318
star
13

decovar

A multistyle decorative variable font by David Berlow
Python
314
star
14

gftools

Misc tools for working with the Google Fonts library
Python
242
star
15

nanoemoji

A wee tool to build color fonts.
Python
239
star
16

opensans

Open Sans font
Shell
221
star
17

literata

A contemporary serif typeface family for long-form reading
Python
219
star
18

dm-fonts

DM Sans, DM Serif
Shell
190
star
19

rubik

Rubik fonts
Shell
182
star
20

glyphsLib

A bridge from Glyphs source files (.glyphs) to UFOs
Python
181
star
21

korean

Google Fonts Korean showcase
JavaScript
161
star
22

atkinson-hyperlegible

HTML
157
star
23

ufo2ft

A bridge from UFOs to FontTools objects (and therefore, OTFs and TTFs).
Python
151
star
24

roboto-classic

Development of a Roboto Variable font
Python
151
star
25

science-gothic

Science Gothic, a libre variable font
Python
145
star
26

picosvg

Helps simplify SVG files. Intended for use as part of a font build.
Python
137
star
27

fontdiff

tool for finding visual differences between two font versions
C++
135
star
28

fontations

Reading and writing font files
Rust
114
star
29

pyfontaine

Python tool to check font files for language/character set support
Python
100
star
30

gf-docs

Documentation for things related to github.com/google/fonts
99
star
31

color-fonts

Experimental color font builds.
Python
96
star
32

googlefonts-project-template

(DEMO) Repository architecture example for a typeface design project
Python
93
star
33

inter-gf-tight

Specialized version of Inter with tighter spacing, for use by Google Workspace
Python
79
star
34

glyphsets

Python
78
star
35

fontdiffenator

Font comparison tool
Python
76
star
36

dm-mono

DM Mono
Shell
73
star
37

lexend

A variable font family designed to aid in reading proficiency.
Shell
72
star
38

zen-marugothic

ZenFonts.jp Maru Gothic
Python
72
star
39

fontcrunch

Tool to optimize TrueType font splines
C++
70
star
40

RobotoMono

Shell
64
star
41

colr-gradients-spec

HTML
63
star
42

cu2qu

Cubic-to-quadratic bezier curve conversion
Python
62
star
43

fontreport

Tool to create PDF files containing glyph images and information about a font.
Python
62
star
44

googlefonts.github.io

Google Fonts documentation
CSS
57
star
45

robotoslab

Roboto Slab Typeface by Google
Python
57
star
46

roboto-serif

55
star
47

tajawal

Distinctive low contrast Arabic and sans serif Latin typeface family
54
star
48

emoji-metadata

Emoji metadata for the construction of pickers
48
star
49

dosis-vf

Fork of Dosis
Makefile
45
star
50

oxidize

Notes on moving tools and libraries to Rust.
45
star
51

zen-kurenaido

ZenFonts.jp Kurenaido
Python
45
star
52

comfortaa

Open-source font by Johan Aakerlund
HTML
44
star
53

diffenator2

A font comparison tool that will not stop until your fonts are exhaustively compared.
Python
43
star
54

ibarrareal

Ibarra Real Fonts
Shell
40
star
55

zen-kakugothic

ZenFonts.jp Kaku Gothic
Python
40
star
56

Gulzar

Nastaliq font
Python
39
star
57

gulim

Python
39
star
58

how-to-hint-variable-fonts

A how-to guide to TrueType hinting variable fonts, with VTT
38
star
59

NunitoSans

Shell
36
star
60

zen-oldmincho

ZenFonts.jp Old Mincho
Python
36
star
61

fontra-pak

A cross-platform bundled Fontra server for local desktop use
Python
34
star
62

TachyFont

Lazily loaded web fonts.
JavaScript
34
star
63

majormono

Python
32
star
64

josefinsans

Google Improvement Project
HTML
31
star
65

shaperglot

Test font files for language support
Python
30
star
66

EQX

A typographically centric font testing tool.
JavaScript
29
star
67

fontbakery-dashboard

A library-scale web dashboard for Font Bakery, no longer developed
JavaScript
28
star
68

axisregistry

A Python API to access data from the Google Fonts variable fonts Axis Registry.
Python
27
star
69

karla

Python
25
star
70

fontmake-rs

Where in we pursue oxidizing (context: https://github.com/googlefonts/oxidize) fontmake.
Rust
24
star
71

chws_tool

Add OpenType chws/vchw features to fonts.
HTML
23
star
72

lang

A python API for evaluating language support in the Google Fonts collection.
Python
23
star
73

caveat

Caveat handwriting fonts
Shell
23
star
74

compreffor

A CFF table subroutinizer for FontTools
Python
23
star
75

kosugi-maru

Kosugi Maru fonts, originally by Motoya
Python
23
star
76

collidoscope

Brute force detection of glyph collisions
Python
22
star
77

zen-antique

ZenFonts.jp Antique
Python
21
star
78

questrial

A fork of John Prince font Questrial from the old Google font directory
Python
21
star
79

chinese

CSS
20
star
80

gf-glyphs-scripts

Scripts for Glyphs
Python
20
star
81

staatliches

Herbert Bayerโ€™s title lettering for the first Bauhaus exhibition catalogue cover of 1923
Python
18
star
82

batang

Python
18
star
83

changa-vf

Variable font fork of the Changa typeface (Latin, Arabic)
Makefile
17
star
84

Roboto-Delta

Roboto as a โ€œparametricโ€ Variable Font
Python
17
star
85

picosvg-rs

A Rust version of picosvg.
Rust
15
star
86

silkscreen

Classic web design pixel font from Jason Kottke, 2001
Python
15
star
87

gfregression

Test local fonts against fonts host on fonts.google.com
Python
14
star
88

fez

Font Engineering made eaZy
Python
14
star
89

mavenproFont

Maven Pro family by Joe Prince
Makefile
14
star
90

BethEllen

Font project repo for the Beth Ellen font by Rod Jelinski
14
star
91

fontquant

Prove and quantify a fontโ€™s technical quality
Python
11
star
92

how-to-hint-complex-script-variable-fonts

A guide to hinting complex script variable fonts with Visual TrueType
11
star
93

ufomerge

ufomerge
Python
11
star
94

dynapuff

Fun blobby display font
Python
10
star
95

kosugi

Kosugi fonts, originally by Motoya
Python
10
star
96

zen-dots

Shell
10
star
97

flowify

Turn a font into a flow font
Python
10
star
98

namecheck

Python
9
star
99

ots-python

Python wheels for the OpenType Sanitizer
Python
9
star
100

variable-components-spec

8
star