• Stars
    star
    2,122
  • Rank 21,746 (Top 0.5 %)
  • Language
  • License
    SIL Open Font Lic...
  • Created over 2 years ago
  • Updated over 1 year ago

Reviews

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

Repository Details

Free and open-source monospaced font from Evil Martians

Martian Mono

Martian Mono is a monospaced version of the Martian Grotesk font for code style design. It inherits Grotesk’s brutal and eye-catching aesthetics as well as all of its benefits—metrics equilibrium, readability and intelligibility, and convenience for web developers and designers who believe in a systematic approach to design.

👉 Get your Martian Grotesk free trial on Gumroad or buy it on MyFonts to support Mono development.

The typeface features a tall x-height, and it has vertical metrics which guarantee equal space is present above the cap height and under the baseline. The latter makes this typeface an on-screen workhorse: it is evenly placed on buttons, inputs, lists, and forms. When coupled together, all the above features make Martian Mono a reasonable choice for any user interface design.

When choosing a font format, prefer ttf for variable and otf for static on macOS, and ttf for Windows.

Download

Download the latest package from the releases page or embed the font from Google Fonts.

Styles

Martian Mono consists of a variable font and 28 styles: Condensed to Semi Wide, Thin to Extra Bold.

The font has 4 styles on the width axis:

Short name Full name CSS percentage CSS keyword
sWd Semi Wide 112.5% semi-expanded
Std Standard 100% normal
Nr Narrow 87.5% semi-condensed
Cn Condensed 75% condensed

And 7 weights:

Short name Full name CSS numeric CSS keyword
Th Thin 100
xLt Extra Light 200
Lt Light 300
Rg Regular 400 normal
Md Medium 500
Bd Bold 700 bold
xBd Extra Bold 800

OpenType features

Font size and legibility

Originally designed for the screen, the glyph heights stick to the pixel grid on commonly used font sizes. In addition, it comes equipped with OpenType and TrueType hinting, and Martian Mono appears legible on most platforms, even when being rendered in small sizes.

For the best results, use the following pairs of size / line height:

  • 7.5 / 10 (or 14, 18, etc.) px
  • 10 / 12 (or 16, 20, etc.) px
  • 12.5 / 14 (or 18, 22, etc.) px
  • 15 / 20 (or 24, 28, etc.) px

Usage

You are welcome to add more hints on usage (especially on the desktop) via pull requests.

On the Web

Download the woff2 package from the releases page to get the variable font in WOFF2 format (see WOFF2 support matrix between browsers).

Consult the following articles from Evil Martians' blog on how to use variable fonts:

On the Desktop: choosing a variant

For better compatibility with various terminal emulators and text editors on the desktop, it is a good idea to install the font not as a single variable font but as several different fonts.

  • Manually
    • See the releases page, and download otf or ttf files.
    • Install the fonts.
  • Windows
    • See the releases page, and download ttf files.
    • Install the fonts.
  • macOS
    • See the releases page, and download otf. Install the fonts.
    • Or, use Homebrew:
      brew tap homebrew/cask-fonts
      brew install --cask font-martian-mono

Next, if your application has a font picker, just choose Martian Mono and the variant you require.

If the configuration is done using a text file, use Martian Mono for the default font variant (Martian Mono Std Rg), or try specifying the font name like MartianMono-NrRg for the Nr Rg variant.

Choosing a variant for a dark background

When choosing a font variant for a darker (or pitch black) background for your terminal or text editor, consider choosing a "lighter" variant if the font looks "too bold" to you. White font on a dark background can have that effect, see here for details.

For example, go for Std Lt instead of Std Rg.

On the Desktop: line spacing

Once you install the font and start using it, you might notice that the picture might look quite confined:

Instead, you might want to opt for something more readable and easy for the eyes if you like:

The difference is line spacing. Learn how to set it up below, and consult the Font size and legibility chapter to learn about the best setting. Or, experiment yourself by setting different percentages (120%, 140%) or paddings in pixels (1, 2, 4, and so on).

Terminal emulators

Terminal (macOS)

Preferences → Profiles → (choose a profile) → Text → Font → [Change]. You will be met with a font picker dialog that has the Line Spacing property.

iTerm 2 (macOS)

Preferences → Profiles → (choose a profile) → Text. Look for the n/n symbol that looks like a fraction. That's your line spacing, in percentage (100% is the default).

kitty

Open the config file (~/.config/kitty/kitty.conf). Look for the adjust_line_height property and see the documentation.

Text editors

VS Code

To specify values for variable axes, use editor.fontVariations:

// settings.json
{
    "editor.fontFamily": "Martian Mono",
    "editor.fontVariations": "'wdth' 87.5, 'wght' 450",
}

Consider switching font aliasing method to auto for improved rendering on displays with high DPI:

// settings.json
{
    "workbench.fontAliasing": "auto",
}

Finally, fine tune line height (editor.lineHeight):

// settings.json
{
    "editor.fontFamily": "Martian Mono",
    "editor.fontSize": 12.5,
    "editor.lineHeight": 20,
}
vim

For setting line spacing in GUI versions of vim, see linespace/lsp.

Sublime Text

Open your preferences. Add the line_padding_top and line_padding_bottom parameters. Both set the padding for a line of text in pixels.

Roadmap

  • Coding ligatures (work in progress)
  • Cyrillic script for Bulgarian, Serbian, and Macedonian (work in progress)
  • Powerline symbols (not sure)
  • Italics (not sure)

Support

My name is Roman Shamin, and I work on Martian Mono in my spare time. If you want to support Martian Mono, oklch.com, and other free and open-source fonts, there are a few things you can do.

I’m sincerely grateful for any support!

More Repositories

1

lefthook

Fast and powerful Git hooks manager for any type of projects.
Go
4,901
star
2

oklch-picker

Color Picker for LCH
TypeScript
757
star
3

terraforming-rails

Terraforming legacy Rails applications guides and tools
Ruby
731
star
4

evil-seed

A Gem for creating partial anonymized dumps of your database using your app model relations.
Ruby
451
star
5

ruby-on-whales

Ruby on Whales example and templates
Ruby
286
star
6

fullstaq-ruby-docker

Docker image for Ruby build from Fullstaq packages based on Debian 10, 11, and 12.
Dockerfile
176
star
7

harmony

Harmony color palette
TypeScript
166
star
8

evil-client

Human-friendly DSL for writing HTTP(s) clients in Ruby
Ruby
104
star
9

activerecord-slotted_counters

Active Record extension providing slotted counters support
Ruby
102
star
10

fias

Ruby wrapper for the Russian FIAS database (Федеральная Информационная Адресная Система)
Ruby
82
star
11

chronicles-gql-martian-library

Ruby
71
star
12

chef-kubernetes

Google Kubernetes installer for ubuntu >= 16.04
Ruby
69
star
13

figma-polychrom

Figma plugin for displaying the contrast level and font size recommendations according to the APCA method
TypeScript
67
star
14

liquor

Liquor is a safe sandboxing compiling template language for Ruby
Ruby
59
star
15

graphql-connections

Additional implementations of cursor-based paginations for GraphQL Ruby gem.
Ruby
45
star
16

evil_chat

Code for "Evil Front: Modern Front-end in Rails" 3-part tutorial: https://evilmartians.com/chronicles/evil-front-part-1
Ruby
41
star
17

chef-prometheus-exporters

Ruby
38
star
18

chef-nginx

Chef Nginx recipes
Ruby
35
star
19

telephony

Evil Martians' telephony application that run our phone numbers
JavaScript
30
star
20

capybara-thruster

Thruster server definition for Capybara
Ruby
29
star
21

foundry

Foundry Compiler
OCaml
24
star
22

rubocoping-generator

Ruby application template to configure RuboCop with Standard and plugins
Ruby
15
star
23

furnace-xray

A visualizer for transformations of code in Static Single Assignment form based on the Furnace library.
CoffeeScript
11
star
24

cupid

Create, organize and send emails through ExactTarget SOAP API
Ruby
10
star
25

redis-proxy

Redis Proxy
Go
9
star
26

evil-struct

Nested structure with type constraints, based on the `dry-initializer` DSL
Ruby
9
star
27

omniauth-ebay-oauth

OmniAuth Strategy for eBay Apps (for using with eBay REST APIs)
Ruby
7
star
28

zendesk

Proper Ruby wrapper around the Zendesk API
Ruby
6
star
29

astro-typedoc

A tool for building astro-based documentation sites using Typescript types definitions and TSDocs.
JavaScript
6
star
30

catalyst-tutorial

Beyond Fashion Deep Learning With Catalyst post code
Python
6
star
31

monstro

Cult of Martians screensaver
Objective-C
5
star
32

foundry-lib

Foundry standard library and examples (public)
Fancy
5
star
33

github-tv

Forks your colleagues' open-source repos to your organization page
Ruby
4
star
34

chef-mdadm

mdadm recipe
Ruby
4
star
35

amplifr-node

JavaScript
3
star
36

homebrew-lefthook

Homebrew Formulae to lefthook
Ruby
2
star
37

kibana-logtrail

Kibana docker image with logtrail plugin.
Dockerfile
2
star
38

helm-kubectl-docker

Dockerfile
2
star
39

docker-curl

A simple docker image which contains curl (based on Alpine linux)
Dockerfile
1
star
40

charts

Public Helm charts
Smarty
1
star
41

foundry-web

Foundry website
JavaScript
1
star
42

gcloud-helm-docker

Deploy image for GKE with Helm & kubectl binaries.
Dockerfile
1
star
43

chef-consul-wrapper

Ruby
1
star
44

elasticsearch-k8s

1
star