termcinema-cli 0.1.0

🎬 Animated terminal-to-SVG renderer CLI for the termcinema project
Documentation
use std::env::consts::OS;
use termcinema_engine::{
    list_builtin_system_fonts, list_embeddable_font_families, recommended_fonts_for_current_os,
};

/// Print a list of all available font families to stdout.
///
/// Used by `--list-fonts` to preview supported font options.
pub(crate) fn print_font_families() {
    // List embedded font options
    println!("\x1b[36m\n🧩 Available embedded fonts:\x1b[0m");
    for name in list_embeddable_font_families() {
        println!("  - {}", name);
    }

    // Show system fonts
    println!("\x1b[36m\n📦 Common monospaced system fonts:\x1b[0m");
    for (name, note) in list_builtin_system_fonts() {
        match note {
            Some(desc) => println!("  - {}({})", name, desc),
            None => println!("  - {}", name),
        }
    }

    // Recommended
    let os = match OS {
        "macos" => "macOS",
        "windows" => "Windows",
        "linux" => "Linux",
        _ => "Unknown",
    };
    println!("\x1b[36m\n🎯 Current OS: {}. Recommended fonts:\x1b[0m", os);
    for name in recommended_fonts_for_current_os() {
        println!("  - {}", name);
    }

    println!("\n💡 Pass a font using: --font-family \"Monospace\"");

    println!();
}