Skip to content

Commit

Permalink
docs(font-enumeration): add module-level doc and doc test
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcur committed Jul 25, 2024
1 parent 6b57f1f commit 7c4c97d
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions font-enumeration/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
//! This is a cross-platform library for enumerating system fonts.
//!
//! # Supported platforms:
//!
//! - Unix-like (Fontconfig)
//! - Windows (DirectWrite; **untested**)
//! - MacOS (Core Text; **untested**)
//!
//! # Features and alternatives
//!
//! This library is for very simple uses, where you're only interested in listing installed fonts,
//! perhaps filtering by family name. The listed fonts include family and font name, file path, and
//! some limited font attributes (style, weight and stretch). It's unlikely this library will grow
//! much beyond this feature set, and its dependency tree will remain small.
//!
//! ```rust
//! let font_collection = font_enumeration::Collection::new().unwrap();
//!
//! for font in font_collection.by_family("DejaVu Sans") {
//! println!("{font:#?}");
//! }
//! ```
use std::path::PathBuf;

use thiserror::Error;
Expand Down

0 comments on commit 7c4c97d

Please sign in to comment.