• Stars
    star
    13,775
  • Rank 2,230 (Top 0.05 %)
  • Language
    TypeScript
  • License
    SIL Open Font Lic...
  • Created about 1 year ago
  • Updated 4 months ago

Reviews

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

Repository Details

An innovative superfamily of fonts for code

Monaspace

The Monaspace type system is a monospaced type superfamily with some modern tricks up its sleeve. It consists of five variable axis typefaces. Each one has a distinct voice, but they are all metrics-compatible with one another, allowing you to mix and match them for a more expressive typographical palette.

Letters on a grid is how we see our code. Why not make those letters better?

✨ An exploration from GitHub Next. ✨ See the full story of Monaspace at monaspace.githubnext.com.

πŸ”€ Download the latest release πŸ”€

image

Overview

Monaspace is available as a variable-axis font and a static build. You can install them both side-by-side; their family names are distinct. For example:

  • Monaspace _____: the static family
  • Monaspace _____ Var or VF: the variable family

The variable fonts have one file per family (Neon, Argon, etc.). Modern and convenient!

The static fonts have one file per cut, per family. The variable axes have named stops for each axis, like light or bold for weight, italic for italics, and semiwide or wide for width. The combinatorial explosion of all these properties means the complete installation of static fonts involves hundreds of font files. But for situations that don't yet support variable fonts, the static builds give you a wide variety of stops throughout the range of each axis.

Coding Ligatures

There are eight groups of coding ligatures, separated into stylistic sets. You may be able to enable or disable individual sets selectively:

  • ss01: ligatures related to the equals glyph like != and ===.
  • ss02: ligatures related to the greater than or less than operators.
  • ss03: ligatures related to arrows like -> and =>.
  • ss04: ligatures related to markup, like </ and />.
  • ss05: ligatures related to the F# programming language, like |>.
  • ss06: ligatures related to repeated uses of # such as ## or ###.
  • ss07: ligatures related to the asterisk like ***.
  • ss08: ligatures related to combinations like .= or .-.

You must enable discretionary ligatures first, often using the dlig setting. See below for editor-specific instructions.

A visual glossary of code ligatures available in the Monaspace type system

Desktop Installation

MacOS

You can manually drag the fonts from the fonts/otf or fonts/variable directory into Font Book.

There is also a script that automates the deletion of all Monaspace fonts from ~/Library/Fonts and then copies over the latest versions. Invoke it from the root of the repo like:

$ cd util
$ bash ./install_macos.sh

You can also use homebrew as an alternative:

brew tap homebrew/cask-fonts
brew install font-monaspace

Windows

You can manually drag the fonts from the fonts/otf or fonts/variable directory into C:\Windows\Fonts. Alternatively, right-click the fonts you want and click Install.

Linux

You can manually drag the fonts from the fonts/otf and fonts/variable directory into ~/.local/share/fonts.

There is also a script which automates the deletion of all Monaspace fonts from ~/.local/share/fonts and then copies over the latest versions. Invoke it from the root of the repo like:

$ cd util
$ bash ./install_linux.sh

Webfonts

All files with a .woff or .woff2 suffix are intended for use on the web. You do not install them with your operating system but add them to your web development project.

As with the desktop fonts, they are available in variable and static versions.

Editors

Visual Studio Code

Set the font family:

    "editor.fontFamily": "'Monaspace Neon', monospace",

Note

Variable fonts are not yet well-supported in VS Code, and it is not yet possible to mix multiple fonts. Stay tuned, we're talking with the VS Code team about it!

The same setting controls texture healing and coding ligatures. You can enable either or both.

If you only want texture healing and basic coding ligatures, add the following line to your settings.json:

  "editor.fontLigatures": true,

Note

This setting is unavailable from the graphical settings editor; you must create it manually.

If you want more coding ligatures, you must customize that setting to specify all the sets you wish to enable:

  "editor.fontLigatures": "'calt', 'liga', 'dlig', 'ss01', 'ss02', ... (more stylistic sets) ...",

Note

You must start the setting with 'calt', 'liga', 'dlig'! The stylistic sets will only have an effect by enabling contextual alternates, ligatures, and discretionary ligatures.

If you want coding ligatures but do not want texture healing, you can omit the calt setting:

  "editor.fontLigatures": "'liga', 'dlig', 'ss01', 'ss02', ... (more stylistic sets) ...",

Contribution

There's no formal contribution guide yet! If you're interested in contributing to the typefaces, you should read the Texture Healing guide, as it explains how to produce the necessary alternate glyphs.

Renamer utility

This convenience utility renames and moves the built fonts into their respective directories. You will need Deno installed, and invoke it thus:

$ ./util/renamer.ts --src="~/path/to/the/built/fonts"

License

SIL OFL. See LICENSE.

Support

Please file issues in this repo. Monaspace is not a supported product; do not contact GitHub support with questions, as they do not support GitHub Next explorations.

Contributors

Monaspace was made to improve all code for all developers. GitHub Next set out on this journey in 2022, and we were fortunate to find a type foundry that shares our passion for improving software in Lettermatic. The result is a marriage of form and function that opens the door to new developer experiences, and that would not have been possible without the domain expertise and skill of the Lettermatic team and the time they invested in working with GitHub Next on figuring out how typography ought to work for code.

Lettermatic

lettermatic logo

GitHub Next

GitHub Next Logo

Special Thanks To

  • Anna Thomas
  • Marg Chronister
  • Jane Solomon

More Repositories

1

testpilot

Test generation using large language models
TypeScript
495
star
2

copilot-workspace-user-manual

πŸ“– The user manual for GitHub Copilot Workspace
368
star
3

blocks

A set of files to use as input for Blocks.
333
star
4

gpt4-with-calc

GPT-4 Equipped with Numeric Calculation
TypeScript
171
star
5

vitale

TypeScript notebook for developers
TypeScript
163
star
6

githubnext

A public point of contact for GitHub Next
155
star
7

blocks-template

A template for creating custom Blocks.
TypeScript
112
star
8

blocks-examples

A set of example custom Blocks.
TypeScript
92
star
9

amalfi-artifact

Artifact accompanying our ICSE '22 paper "Practical Automated Detection of Malicious npm Packages"
Python
35
star
10

blocks-dev

TypeScript
18
star
11

universe-blocks-demo

JavaScript
14
star
12

spectrum

TypeScript
13
star
13

blocks-template-svelte

make GitHub Blocks with Svelte!
JavaScript
9
star
14

vscode-react-webviews

A sample/starter template for developing VS Code extensions with webviews
TypeScript
7
star
15

UpgrAIder

Upgrade deprecated/outdated code using LLMs and release notes
Python
7
star
16

llmorpheus

LLM-based mutation testing
TypeScript
5
star
17

tiny-svelte-fsm

A minimalistic finite state machine library for Svelte 5
TypeScript
4
star
18

blocks-template-react

make GitHub Blocks with React!
JavaScript
3
star
19

preview-block

TypeScript
2
star
20

universe-blocks-demo-blocks

CSS
2
star
21

followup-attention

Accompanying artifacts for the TSE paper "Follow-up Attention: An Empirical Study of Developer and Neural Model Code Exploration"
Jupyter Notebook
2
star
22

blocks-template-vue

make GitHub Blocks with Vue!
JavaScript
1
star
23

array-toolbox

This is going to get a thousand stars
JavaScript
1
star
24

blocks-howie-spike-busted

TypeScript
1
star
25

.github

1
star
26

emoji-block

TypeScript
1
star
27

blocks-runtime

runtime support for Blocks
TypeScript
1
star
28

azuresvelte

JavaScript
1
star
29

hello-world

Sample repository
TypeScript
1
star
30

azureswacookies

TypeScript
1
star
31

history-blocks

TypeScript
1
star