Fonts

A comprehensive hub for typography in dartwork-mpl. All bundled fonts are automatically registered with matplotlib on import—no manual configuration required.

Overview

dartwork-mpl includes 130 professional fonts from 9 font families, all optimized for data visualization and publication-quality figures. When you import the library, these fonts become immediately available to matplotlib.

All available font families preview

All Font Families. Nine curated font families covering everything from general-purpose body text to mathematical expressions. Each family includes multiple weights and styles. Explore all font families →

Font utility functions demonstration

Font Utilities. Helper functions fs() and fw() for relative font sizing and weighting, plus plot_fonts() for previewing all available fonts. Learn about font utilities →

Quick Start

import dartwork_mpl as dm
import matplotlib.pyplot as plt

dm.style.use("scientific")  # Apply dartwork style (includes Roboto font)

fig, ax = plt.subplots()
ax.set_title("Publication-Ready Title", fontsize=dm.fs(4), fontweight=dm.fw(2))
ax.set_xlabel("X Axis Label", fontsize=dm.fs(0))
ax.set_ylabel("Y Axis Label", fontsize=dm.fs(0))

# Preview all available fonts
dm.plot_fonts(ncols=3, font_size=12)
plt.show()

Key Features

Auto-Registration

All 130 fonts are automatically registered with matplotlib’s font manager when you import dartwork-mpl. No need for manual font installation or configuration.

Professional Font Selection

Curated collection includes Roboto (default), Inter, Noto Sans family, and more—all chosen for excellent legibility in charts and figures.

Relative Sizing

Use fs(n) to adjust font sizes relative to your base style, keeping your typography consistent across different output formats.

Weight Flexibility

Use fw(n) to adjust font weights in standardized steps, perfect for creating visual hierarchy in your figures.

Math Support

Noto Sans Math provides comprehensive mathematical symbol coverage for scientific notation and equations.

Bundled Fonts Summary

Family

Variants

Primary Use Case

Roboto

15

Default body text, general purpose

Inter

20

UI text, presentations

InterDisplay

20

Headings, titles

Noto Sans

15

Multi-language documents

Noto Sans Condensed

20

Tables, dense layouts

Noto Sans SemiCondensed

20

Labels, legends

Noto Sans ExtraCondensed

20

Axis labels, tight spaces

Noto Sans Math

1

Mathematical expressions

Paperlogy

9

Academic papers, reports

Regenerating the Visuals

  • All preview PNGs live in docs/fonts/images/.

  • Run python docs/fonts/generate_assets.py to refresh assets after any changes.

  • Exports are high-DPI for crisp rendering when embedded in documentation.