glyphon/README.md

32 lines
1.7 KiB
Markdown
Raw Normal View History

2022-05-09 08:49:10 -04:00
<h1 align="center">
2022-05-10 08:03:03 -04:00
🦅 glyphon 🦁
2022-05-09 08:49:10 -04:00
</h1>
<div align="center">
2022-05-09 10:36:09 -04:00
Fast, simple 2D text rendering for <a href="https://github.com/gfx-rs/wgpu/"><code>wgpu</code></a>
2022-05-09 08:49:10 -04:00
</div>
<br />
<div align="center">
2022-05-09 10:39:30 -04:00
<a href="https://crates.io/crates/glyphon"><img src="https://img.shields.io/crates/v/glyphon.svg?label=glyphon" alt="crates.io"></a>
2022-05-09 08:49:10 -04:00
<a href="https://docs.rs/glyphon"><img src="https://docs.rs/glyphon/badge.svg" alt="docs.rs"></a>
2022-05-09 10:39:30 -04:00
<img src="https://img.shields.io/badge/min%20rust-1.60-green.svg" alt="Minimum Rust Version">
2022-05-10 08:08:07 -04:00
<a href="https://github.com/grovesNL/glyphon/actions"><img src="https://github.com/grovesNL/glyphon/workflows/CI/badge.svg?branch=main" alt="Build Status" /></a>
2022-05-09 08:49:10 -04:00
</div>
## What is this?
This crate provides a simple way to render 2D text with [`wgpu`](https://github.com/gfx-rs/wgpu/) by:
2022-10-27 23:46:33 -04:00
- shaping/calculating layout/rasterizing glyphs (with [`cosmic-text`](https://github.com/pop-os/cosmic-text/))
2022-05-09 08:49:10 -04:00
- packing the glyphs into texture atlas (with [`etagere`](https://github.com/nical/etagere/))
- sampling from the texture atlas to render text (with [`wgpu`](https://github.com/gfx-rs/wgpu/))
2022-05-10 07:25:00 -04:00
To avoid extra render passes, rendering uses existing render passes (following the middleware pattern described in [`wgpu`'s Encapsulating Graphics Work wiki page](https://github.com/gfx-rs/wgpu/wiki/Encapsulating-Graphics-Work).
2022-05-09 08:49:10 -04:00
## License
This project is licensed under either [Apache License, Version 2.0](LICENSE-APACHE), [zlib License](LICENSE-ZLIB), or [MIT License](LICENSE-MIT), at your option.
## Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache 2.0 license, shall be triple licensed as above, without any additional terms or conditions.