Announcing `findfont-rs` v0.1 - A Cross-Platform Font Discovery Library for Rust! ๐Ÿฆ€

55 points AllenGnr 10 comments

Hey Rustaceans!

I'm excited to share findfont-rs - a new library that helps you locate font files across different operating systems with zero dependencies! Perfect for applications that need to work with system fonts in cross-platform environments.

What it does:
๐Ÿ” Finds font files (TTF, TTC, OTF) in system directories
๐Ÿ–ฅ๏ธ Supports Linux, macOS, and Windows out of the box
๐Ÿš€ No external dependencies - pure Rust implementation
๐Ÿ› ๏ธ Simple API - find fonts with just one function call

Basic Usage:

use findfont::find;

fn main() {
    match find("Helvetica") {
        Some(path) => println!("Font found at: {}", path.display()),
        None => println!("Sorry, that font isn't installed!"),
    }
}

Why I built this:
Working on a cross-platform Rust project, I needed a reliable way to locate system fonts without pulling in heavy dependencies. Existing solutions either weren't cross-platform or required native bindings. findfont-rs solves this by implementing platform-specific font directory detection in pure Rust!

Key Features:

  • Comprehensive Search: Checks all standard system font directories
  • Variant Support: Automatically looks for common variants (Light/Medium)
  • Path Expansion: Handles ~ home directory expansion cross-platform
  • Lightweight: Compiled binary adds <10KB to your project

Platform Support:

Linux macOS Windows
โœ”๏ธ โœ”๏ธ โœ”๏ธ

Installation:

[dependencies]
findfont = "0.1"

Where to Use:

  • Font rendering engines
  • GUI applications
  • PDF generators
  • Game development
  • Any project needing system font discovery

Links:

Call for Contributors ๐Ÿ‘จ๐Ÿ’ป๐Ÿ‘ฉ๐Ÿ’ป
We're looking for help with:

  • Expanding variant detection (Bold/Italic/etc)
  • Adding WASM support
  • Improving Windows font directory coverage