Home

Awesome

<img src="./documentation/icon.png" width="208" height="208">

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.

<img src="./documentation/martian-mono-character-set.png" width="830">

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.

<img src="./documentation/martian-mono-font-styles.png" width="830">

The font has 4 styles on the width axis:

Short nameFull nameCSS percentageCSS keyword
sWdSemi Wide112.5%semi-expanded
StdStandard100%normal
NrNarrow87.5%semi-condensed
CnCondensed75%condensed

And 7 weights:

Short nameFull nameCSS numericCSS keyword
ThThin100
xLtExtra Light200
LtLight300
RgRegular400normal
MdMedium500
BdBold700bold
xBdExtra Bold800

OpenType features

<img src="./documentation/martian-mono-opentype-features.png" width="830">

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:

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.

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:

<img src="./documentation/line-spacing-1_0.png">

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

<img src="./documentation/line-spacing-1_4.png">

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

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!