All Projects → googlefonts → Inconsolata

googlefonts / Inconsolata

Licence: ofl-1.1
Development repo of Inconsolata Fonts by Raph Levien

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Inconsolata

Yrsa Rasa
Yrsa & Rasa: fonts for Latin and Gujarati
Stars: ✭ 200 (-62.62%)
Mutual labels:  google-fonts
tyffle
Try Google Fonts Blazing Fast. https://tyffle.ml
Stars: ✭ 17 (-96.82%)
Mutual labels:  google-fonts
GFontsSpace
Preview: https://pankajladhar.github.io/GFontsSpace
Stars: ✭ 88 (-83.55%)
Mutual labels:  google-fonts
seed-fonts
WordPress plugin that helps you use web fonts (@font-face) easier. You can use 5 ready-generated Thai-English web fonts, or use your own collection.
Stars: ✭ 20 (-96.26%)
Mutual labels:  google-fonts
web-fonts-repository
A simple webfont hosting. Google Fonts alternative for your own fonts.
Stars: ✭ 99 (-81.5%)
Mutual labels:  google-fonts
host-webfonts-locally
OMGF automagically caches the Google Fonts used by your theme/plugins locally. No configuration (or brains) required!
Stars: ✭ 13 (-97.57%)
Mutual labels:  google-fonts
Inkwell
An inkwell to use custom fonts on the fly.
Stars: ✭ 146 (-72.71%)
Mutual labels:  google-fonts
Next Google Fonts
A tiny Next.js helper for loading Google Fonts fast and asynchronously ⏩
Stars: ✭ 369 (-31.03%)
Mutual labels:  google-fonts
eczar
Eczar: fonts for Devanagari and Latin
Stars: ✭ 52 (-90.28%)
Mutual labels:  google-fonts
fontless
🚀🔒 Host your own Google Fonts.
Stars: ✭ 63 (-88.22%)
Mutual labels:  google-fonts
devs-codex
A repo of helpful front end development and design links
Stars: ✭ 16 (-97.01%)
Mutual labels:  google-fonts
vite-plugin-webfont-dl
⚡ Webfont Download Vite Plugin - Make your Vite site load faster
Stars: ✭ 69 (-87.1%)
Mutual labels:  google-fonts
font-picker-react
✏️ Font selector component for Google Fonts
Stars: ✭ 126 (-76.45%)
Mutual labels:  google-fonts
Urbanist
Urbanist is a low-contrast, geometric sans-serif inspired by Modernist design and typography.
Stars: ✭ 374 (-30.09%)
Mutual labels:  google-fonts
Google Font To Svg Path
Create an SVG path from a Google font
Stars: ✭ 272 (-49.16%)
Mutual labels:  google-fonts
Recursive
Recursive Mono & Sans is a variable font family for code & UI
Stars: ✭ 2,095 (+291.59%)
Mutual labels:  google-fonts
typefaces
Collection of Google fonts as typeface data for usage with three.js, react-three-fiber, and other tools.
Stars: ✭ 53 (-90.09%)
Mutual labels:  google-fonts
Matter
Customizable GRUB theme inspired by Material Design
Stars: ✭ 439 (-17.94%)
Mutual labels:  google-fonts
Fraunces
Git Repository for Fraunces Font Family
Stars: ✭ 310 (-42.06%)
Mutual labels:  google-fonts
HiGoogleFonts
HiGoogleFonts allows you to add a Google font picker to easily display a list of Google fonts. The picker shows an instant preview of the font style without loading the font css.
Stars: ✭ 44 (-91.78%)
Mutual labels:  google-fonts

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:

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

Changelog v.2.001

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

  • [x] Glyph Set expanded to GF Latin Pro
  • [x] Additional glyphs ⊕↑↗→↘↓↙←↖↔↕⇧⇨⇩⇦⬆⮕⬇⬅●○◆◇☹☺☻♠♣♥♦✓✔✕✗✘␣⎋⌂⇪⌧⌫⌦⌥⌘⏎�
  • [x] 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:
    • [X] Remove Overlap
    • [X] Autohint
    • [ ] Save as TTF
    • [X] 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 https://github.com/googlefonts/Inconsolata/issues/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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].