Skip to content

Commit

Permalink
Merge branch 'main' into issue/26-linux-installation
Browse files Browse the repository at this point in the history
  • Loading branch information
idan authored Nov 11, 2023
2 parents 52fbda2 + cad4aa7 commit 45c9887
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 32 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_STORE
.DS_STORE
.vscode
5 changes: 0 additions & 5 deletions .vscode/settings.json

This file was deleted.

68 changes: 44 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Monaspace

The Monaspace type system: a monospaced type superfamily with some modern tricks up its sleeves. It is comprised 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.
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?

Expand All @@ -13,18 +13,18 @@ Letters on a grid is how we see our code. Why not make those letters better?

## Overview

Monaspace is made available as both a variable-axis font and as static builds. You can install them both side-by-side; their family names are distinct. For example:
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 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 of the axes, like `light` or `bold` for weight, `italic` for italics, and `semiwide` and `wide` for width. The combinatoric explosion of all these properties means that the full installation of static fonts involves hundreds of font files. But for situations which don't yet support variable fonts, the static builds give you a wide variety of stops throughout the range of each axis.
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 selectively enable or disable individual sets:
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.
Expand All @@ -35,73 +35,93 @@ There are eight groups of coding ligatures, separated into stylistic sets. You m
* `ss07`: ligatures related to the asterisk like `***`.
* `ss08`: ligatures related to combinations like `.=` or `.-`.

You must enable discrectionary ligatures first, often using the `dlig` setting. See below for editor-specific instructions.
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](https://github.com/githubnext/monaspace/assets/22723/49b4f802-265d-414c-94c0-ec712e3c0ecc)


## Desktop Installation

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

There is also a script which 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:
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:

```bash
$ bash ./util/install_macos.sh
$ cd util
$ bash ./install_macos.sh
```
You can also use [homebrew](https://brew.sh/) as an alternative:

```bash
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:

```bash
$ ./util/install_linux.sh
$ 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 rather add them to your web development project.
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 made availabe both as variable and static fonts.
As with the desktop fonts, they are available in variable and static versions.

## Editors

### Visual Studio Code

Texture healing and coding ligatures are controlled by the same setting. You can enable either, or both.
Set the font family:

```json
"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`:

```
```json
"editor.fontLigatures": true,
```

> [!NOTE]
> This setting is not available from the graphical settings editor, you must create it manually.
> 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 of the sets you want enabled:
If you want more coding ligatures, you must customize that setting to specify all the sets you wish to enable:

```
```json
"editor.fontLigatures": "'calt', 'liga', 'dlig', 'ss01', 'ss02', ... (more stylistic sets) ...",
```
> [!NOTE]
> You must start the setting with `'calt', 'liga', 'dlig'`! The stylistic sets will not have any effect without enabling contextual alternates, ligatures, and discretionary ligatures.
> 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 elide the `calt` setting:
If you want coding ligatures but do _not_ want texture healing, you can omit the `calt` setting:

```
```json
"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](https://github.com/githubnext/monaspace/blob/main/docs/Texture%20Healing.md) guide, as it explains how to produce the neccessary alternate glyphs.
There's no formal contribution guide yet! If you're interested in contributing to the typefaces, you should read the [Texture Healing](https://github.com/githubnext/monaspace/blob/main/docs/Texture%20Healing.md) guide, as it explains how to produce the necessary alternate glyphs.

### Renamer utility

This is a convenience utility which renames moves the built fonts into the respective directories. You will need [Deno](https://deno.land) installed, and invoke it thus:
This convenience utility renames and moves the built fonts into their respective directories. You will need [Deno](https://deno.land) installed, and invoke it thus:

```bash
$ ./util/renamer.ts --src="~/path/to/the/built/fonts"
Expand All @@ -113,11 +133,11 @@ SIL OFL. See [LICENSE](https://github.com/githubnext/monaspace/blob/main/LICENSE

## Support

Please file issues on this repo. Monaspace is not a supported product; do not reach out to GitHub support with questions as they do not provide support for GitHub Next explorations.
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 with the goal of improving all code, for all developers. [GitHub Next](https://githubnext.com) 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](https://lettermatic.com/). 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 to work with GitHub Next on figuring out how typography ought to work for code.
Monaspace was made to improve all code for all developers. [GitHub Next](https://githubnext.com) 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](https://lettermatic.com/). 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
Expand Down
4 changes: 2 additions & 2 deletions util/install_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
rm -rf ~/Library/Fonts/Monaspace*

# copy all fonts from ./otf to ~/Library/Fonts
cp ./fonts/otf/* ~/Library/Fonts
cp ../fonts/otf/* ~/Library/Fonts

# copy variable fonts from ./variable to ~/Library/Fonts
cp ./fonts/variable/* ~/Library/Fonts
cp ../fonts/variable/* ~/Library/Fonts

0 comments on commit 45c9887

Please sign in to comment.