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 the latest package from the releases page or embed the font from Google Fonts.
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 |
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:
You are welcome to add more hints on usage (especially on the desktop) via pull requests.
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:
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.
otf
or ttf
files.ttf
files.otf
. Install the fonts.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.
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.
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).
Preferences → Profiles → (choose a profile) → Text → Font → [Change]. You will be met with a font picker dialog that has the Line Spacing property.
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).
Open the config file (~/.config/kitty/kitty.conf
). Look for the adjust_line_height
property and see the documentation.
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,
}
For setting line spacing in GUI versions of vim, see linespace
/lsp
.
Open your preferences. Add the line_padding_top
and line_padding_bottom
parameters. Both set the padding for a line of text in pixels.
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!