snapshot_fonts

Crates.iosnapshot_fonts
lib.rssnapshot_fonts
version1.2.0
created_at2025-12-14 15:39:38.308265+00
updated_at2025-12-17 19:06:17.722753+00
descriptionHigh-resolution terminal bar charts using custom PUA fonts (251 levels per half-character)
homepage
repositoryhttps://github.com/valeratrades/snapshot_fonts
max_upload_size
id1984636
size194,257
Valeriy Sakharov (valeratrades)

documentation

README

[!WARNING] Uses Unicode Private Use Areas: \

  • FillLevels: PUA-A (Plane 15) U+F0000U+FFFFD \
  • Candles: PUA-B (Plane 16) U+100000U+10FFFD

    These ranges may conflict with other custom fonts using PUA.

snapshot_fonts

Minimum Supported Rust Version crates.io docs.rs Lines Of Code
ci errors ci warnings

Monospace fonts for terminal-based data visualization. Encode chart data directly in Unicode text.

  • FillLevels: 251×251 fill level combinations for sparklines/histograms
  • Candles: 52k candlestick glyphs for financial charts

Installation

cargo install snapshot_fonts
snapshot_fonts generate -o ~/.local/share/fonts/
fc-cache -fv

Usage

use snapshot_fonts::{SnapshotFillLevels, SnapshotCandles};

// Price sparkline
let chart = SnapshotFillLevels::from_prices(&prices).draw();

// Candlestick chart
let chart = SnapshotCandles::from_prices(&prices).draw();

Unicode Ranges

FillLevels

  • Start: U+F09E5
  • End: U+FFFFD
  • Count: 63,001 (251 × 251)
  • Plane: 15 (PUA-A)

Candles

  • Start: U+100000

  • End: U+10CCD5

  • Count: 52,438

  • Plane: 16 (PUA-B)


This repository follows my best practices and Tiger Style (except "proper capitalization for acronyms": (VsrState, not VSRState) and formatting).

License

Licensed under Blue Oak 1.0.0
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.
Commit count: 0

cargo fmt