{"id":36224028,"url":"https://github.com/dmk/artbox","last_synced_at":"2026-01-15T22:11:35.010Z","repository":{"id":331523479,"uuid":"1131396045","full_name":"dmk/artbox","owner":"dmk","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-10T00:12:47.000Z","size":98,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-10T21:50:23.498Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-01-09T23:54:51.000Z","updated_at":"2026-01-10T00:06:38.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dmk/artbox","commit_stats":null,"previous_names":["dmk/artbox"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dmk/artbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmk%2Fartbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmk%2Fartbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmk%2Fartbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmk%2Fartbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmk","download_url":"https://codeload.github.com/dmk/artbox/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmk%2Fartbox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28287050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T04:44:51.577Z","status":"ssl_error","status_checked_at":"2026-01-11T04:44:44.232Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-11T05:03:05.638Z","updated_at":"2026-01-11T05:03:06.469Z","avatar_url":"https://github.com/dmk.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# artbox\n\nRender FIGlet text into a bounded rectangle with colors and gradients.\n\n```\ncargo add artbox\n```\n\n## Quick Start\n\n```rust\nuse artbox::render;\n\nlet result = render(\"Hello\", 40, 8)?;\nprintln!(\"{}\", result.text);\n```\n\nOutput:\n```\n _   _      _ _\n| | | | ___| | | ___\n| |_| |/ _ \\ | |/ _ \\\n|  _  |  __/ | | (_) |\n|_| |_|\\___|_|_|\\___/\n```\n\n## Gradients\n\n```rust\nuse artbox::{Renderer, Fill, LinearGradient, ColorStop, Color};\n\nlet renderer = Renderer::default()\n    .with_fill(Fill::Linear(LinearGradient::new(\n        45.0,\n        vec![\n            ColorStop::new(0.0, Color::rgb(255, 0, 128)),\n            ColorStop::new(1.0, Color::rgb(0, 128, 255)),\n        ],\n    )));\n\nlet styled = renderer.render_styled(\"Hi\", 20, 6)?;\nprint!(\"{}\", styled.to_ansi_string());\n```\n\nSupports solid colors, linear gradients (any angle), and radial gradients.\n\n## Font Families\n\nBuilt-in font families with size fallback:\n\n```rust\nuse artbox::{Renderer, fonts};\n\n// Blocky pixel style (█▀▄ characters)\nlet renderer = Renderer::new(fonts::family(\"blocky\").unwrap());\n\n// Available families: banner, blocky, script, slant\n// Default stack: big -\u003e standard -\u003e small -\u003e mini\n```\n\nCustom stacks:\n\n```rust\nlet renderer = Renderer::new(fonts::stack(\u0026[\"slant\", \"small_slant\"]));\n```\n\nLoad external fonts:\n\n```rust\nlet font = Font::from_file(\"path/to/font.flf\")?;\n```\n\n## Alignment\n\n```rust\nuse artbox::{Renderer, Alignment};\n\nlet renderer = Renderer::default()\n    .with_alignment(Alignment::Center)  // or TopLeft, BottomRight, etc.\n    .with_letter_spacing(-1);           // negative = overlap\n```\n\n## Buffer Reuse\n\nFor hot paths, reuse the output buffer:\n\n```rust\nlet mut buffer = String::new();\nlet metrics = renderer.render_into(\"Text\", 40, 10, \u0026mut buffer)?;\n```\n\n## ratatui Widget\n\nEnable the `ratatui` feature:\n\n```toml\nartbox = { version = \"0.1\", features = [\"ratatui\"] }\n```\n\n```rust\nuse artbox::integrations::ratatui::ArtBox;\n\nlet widget = ArtBox::new(\u0026renderer, \"Hello\");\nframe.render_widget(widget, area);\n```\n\n## CLI Example\n\n```bash\ncargo run --example gradient -- \"Hello\" 60 10 --gradient diagonal --from 255,0,128 --to 0,128,255\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmk%2Fartbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmk%2Fartbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmk%2Fartbox/lists"}