Nordwand Mono is a free and open source font family
Download v1.6.0 ↓ 46°34′39″N 8°00′19″E EIGER · 3967 MNordwand Mono is a compact neo-grotesque monospaced typeface designed for programming. It adapts elements of Adrian Frutiger's Univers to programmer-friendly proportions, blending geometric precision with visual calm.
The name refers to the north faces (Nordwände) of the Swiss Alps, and to the Swiss typographic tradition the design draws on.
It is designed and written in code by a programmer, for people who read code. Each glyph is a Python class built using a shared geometric vocabulary of rectangles, arches, loops and diagonals. Change a single parameter, such as the x-height, the stroke or the roundness, and every glyph follows, across all weights and both styles.
It is free and open source.
Not just slanted characters: letters like a, f, k and y get their own cursive forms.
Not a fan of the cute m, the curvy l and the bare r and f? The ss01 stylistic set swaps them for their sturdy but boring counterparts.
Change the metrics in a YAML file or tweak an individual glyph and build your own version.
x_height: 540 stroke_x: 84 stroke_y: 70
Each weight is tuned on its own. Stroke contrast and tapers adapt across weights, instead of scaling from a single outline.
Choose your favourite glyphs through OpenType features.
Ligatures are a bad thing right? Only -> and => join by default. Continuous lines like ----, ==== or #### are opt-in, through the dlig feature for crisp code comments.
Released under the SIL Open Font License 1.1. Use it, modify it, share it. Simply indicate that your work is based on Nordwand Mono.
import xml.etree.ElementTree as ET
NS = {"gpx": "http://www.topografix.com/GPX/1/1"}
def elevations(path: str) -> list[float]:
root = ET.parse(path).getroot()
return [float(e.text) for e in root.iterfind(".//gpx:ele", NS)]
def elevation_gain(values: list[float], threshold: float = 3.0) -> float:
"""Total climb, ignoring GPS noise below `threshold` meters."""
gain, ref = 0.0, values[0]
for v in values[1:]:
if abs(v - ref) >= threshold:
gain += max(v - ref, 0)
ref = v
return gain
print(f"D+ {elevation_gain(elevations('track.gpx')):.0f} m")
// Naismith's rule: 1 hour per 5 km, plus 1 hour per 600 m of ascent
interface Leg {
name: string;
distanceKm: number;
ascentM: number;
}
const hours = ({ distanceKm, ascentM }: Leg): number =>
distanceKm / 5 + ascentM / 600;
const legs: Leg[] = [
{ name: "Valley to hut", distanceKm: 8.2, ascentM: 1150 },
{ name: "Hut to pass", distanceKm: 4.5, ascentM: 640 },
];
for (const leg of legs) {
const minutes = Math.round(hours(leg) * 60);
const mm = String(minutes % 60).padStart(2, "0");
console.log(`${leg.name.padEnd(14)} ${Math.floor(minutes / 60)}h${mm}`);
}
package contour
import "math"
// Crossings returns the distances at which a profile of (distance,
// elevation) points crosses the contour lines, every `interval` meters
func Crossings(dist, ele []float64, interval float64) []float64 {
var out []float64
for i := 1; i < len(ele); i++ {
lo, hi := math.Min(ele[i-1], ele[i]), math.Max(ele[i-1], ele[i])
for level := math.Ceil(lo/interval) * interval; level < hi; level += interval {
t := (level - ele[i-1]) / (ele[i] - ele[i-1])
out = append(out, dist[i-1]+t*(dist[i]-dist[i-1]))
}
}
return out
}
#[derive(Clone, Copy)]
pub struct Point { pub x: f64, pub y: f64 }
/// Ramer–Douglas–Peucker: drop the points closer than `epsilon` to the line
pub fn simplify(pts: &[Point], epsilon: f64) -> Vec<Point> {
if pts.len() < 3 { return pts.to_vec(); }
let (a, b) = (pts[0], pts[pts.len() - 1]);
let len = (b.x - a.x).hypot(b.y - a.y).max(f64::EPSILON);
let dist = |p: &Point| ((b.y - a.y) * p.x - (b.x - a.x) * p.y + b.x * a.y - b.y * a.x).abs() / len;
let (index, max) = (1..pts.len() - 1)
.map(|i| (i, dist(&pts[i])))
.fold((0, 0.0), |best, cur| if cur.1 > best.1 { cur } else { best });
if max <= epsilon {
return vec![a, b];
}
let mut left = simplify(&pts[..=index], epsilon);
left.pop(); // Shared with the right half
left.extend(simplify(&pts[index..], epsilon));
left
}
#include <cmath>
#include <numbers>
#include <vector>
struct Point { double lat, lon; }; // Degrees
// Great-circle distance in meters, with the haversine formula
double haversine(Point a, Point b) {
constexpr double R = 6371000.0, rad = std::numbers::pi / 180.0;
double dlat = (b.lat - a.lat) * rad, dlon = (b.lon - a.lon) * rad;
double h = std::pow(std::sin(dlat / 2), 2) +
std::cos(a.lat * rad) * std::cos(b.lat * rad) * std::pow(std::sin(dlon / 2), 2);
return 2 * R * std::asin(std::sqrt(h));
}
double track_length(const std::vector<Point>& track) {
double total = 0.0;
for (std::size_t i = 1; i < track.size(); ++i) total += haversine(track[i - 1], track[i]);
return total;
}
-- Grade of each segment of a profile, and how hard it feels
local function grades(profile)
local out = {}
for i = 2, #profile do
local a, b = profile[i - 1], profile[i]
local grade = (b.ele - a.ele) / (b.dist - a.dist) * 100
local level = math.abs(grade) < 5 and "easy"
or math.abs(grade) < 12 and "steady"
or "steep"
out[#out + 1] = { grade = grade, level = level }
end
return out
end
local profile = { { dist = 0, ele = 1210 }, { dist = 400, ele = 1238 }, { dist = 900, ele = 1302 } }
for _, g in ipairs(grades(profile)) do
print(string.format("%5.1f%% %s", g.grade, g.level))
end
-- Daily ascent per athlete over the last 30 days
SELECT
a.name,
date_trunc('day', p.recorded_at) AS day,
sum(greatest(p.elevation - p.previous_elevation, 0)) AS ascent_m
FROM (
SELECT *,
lag(elevation) OVER (PARTITION BY activity_id ORDER BY recorded_at) AS previous_elevation
FROM points
) AS p
JOIN activities AS act ON act.id = p.activity_id
JOIN athletes AS a ON a.id = act.athlete_id
WHERE p.recorded_at > now() - INTERVAL '30 days'
GROUP BY a.name, day
ORDER BY day DESC, ascent_m DESC;
#!/usr/bin/env bash # Convert every GPX track to GeoJSON, and print its point count set -euo pipefail out="geojson" mkdir -p "$out" for track in tracks/*.gpx; do name=$(basename "$track" .gpx) ogr2ogr -f GeoJSON "$out/$name.json" "$track" track_points count=$(jq '.features | length' "$out/$name.json") printf '%-24s %6d points\n' "$name" "$count" done
# Nordwand Mono A **monospaced** typeface for programming, drawn *entirely* in Python. ## Features - Nine weights, from `Thin` to `Bold`, each with an italic - Character variants (`cv01`, `cv02`, ...) for alternate glyphs - Box drawing, blocks and arrows for terminal interfaces > Every glyph is drawn by code, so you can tune the font to your taste. ```sh make install && make build-font ``` Download it from the [releases](https://github.com/tywr/Nordwand-Mono/releases) page.
╭─ nordwand ───────────────────────────────╮ │ ↑ 1.2 MB/s ↓ 8.4 MB/s CPU ▂▃▅▇▆▄▂▁ │ ├──────────────┬────────┬──────────────────┤ │ summit │ alt. │ progress │ ├──────────────┼────────┼──────────────────┤ │ Eiger │ 3967 │ ████████████░░░░ │ │ Matterhorn │ 4478 │ ██████▓▓▒▒░░░░░░ │ │ Grandes Jor. │ 4208 │ ███████████████▏ │ ╰──────────────┴────────┴──────────────────╯ src/glyphs/ ├── box/ ┄ ┅ ╭ ╮ ═ ║ ╬ ├── blocks/ ░ ▒ ▓ █ ▀ ▄ ▌ ▐ └── arrows/ ← → ↑ ↓ ↔ ↕ ↖ ↗
$ tail -n 4 /var/log/gpx-sync.log
2026-11-02T08:14:03.512Z INFO [sync:42] fetched 1,284 pts from tracks/eiger_n.gpx (12.4 kB)
2026-11-02T08:14:03.877Z WARN [geo:118] dt=0.75s > 0.50s; gap @ idx=0x3F2 (46.5774, 8.0054)
2026-11-02T08:14:04.019Z ERROR [db:7] INSERT failed: duplicate key "trk_9f1c" -> retry 2/3
2026-11-02T08:14:04.233Z DEBUG [http:301] GET /api/v2/tracks?since=1730534400&limit=50 => 200
id | route | dist_km | d+_m | d-_m | moving | pace/km | hr
----+-----------------+---------+-------+------+----------+---------+----
001 | Heckmair Route | 18.40 | 1,812 | 302 | 09:41:12 | 31'35" | 142
002 | Schmid Route | 11.05 | 1,221 | 88 | 07:02:40 | 38'14" | 138
003 | Cassin Route | 9.72 | 1,198 | 41 | 06:55:03 | 42'47" | 151
004 | Bonatti Pillar | 7.80 | 862 | 17 | 05:18:59 | 40'51" | 129
$ xxd -g 1 track.gpx | head -n 3
00000000: 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 <?xml version="1
00000010: 2e 30 22 3f 3e 0a 3c 67 70 78 20 76 65 72 73 69 .0"?>.<gpx versi
00000020: 6f 6e 3d 22 31 2e 31 22 20 63 72 65 61 74 6f 72 on="1.1" creator
0O Il1| oO0 rn m vv w ;: ,. `' "" {}[]() <= >= != == -> => :: ... ~~ // 5S 2Z 8B 6b 9g