6 releases (breaking)

0.5.0 Jan 18, 2024
0.4.1 Jan 16, 2024
0.3.0 Jul 27, 2023
0.2.0 Jul 13, 2022
0.1.0 May 10, 2022

#117 in Graphics APIs

Download history 2242/week @ 2023-12-23 2213/week @ 2023-12-30 3166/week @ 2024-01-06 5074/week @ 2024-01-13 5748/week @ 2024-01-20 4915/week @ 2024-01-27 4910/week @ 2024-02-03 4889/week @ 2024-02-10 5541/week @ 2024-02-17 4764/week @ 2024-02-24 5008/week @ 2024-03-02 4629/week @ 2024-03-09 5172/week @ 2024-03-16 4877/week @ 2024-03-23 3540/week @ 2024-03-30 2752/week @ 2024-04-06

16,916 downloads per month
Used in 28 crates (5 directly)

MIT OR Apache-2.0 OR Zlib

200KB
1K SLoC

Rust 1K SLoC // 0.0% comments WebGPU Shader Language 117 SLoC

🦅 glyphon 🦁

Fast, simple 2D text rendering for wgpu

crates.io docs.rs Minimum Rust Version Build Status

What is this?

This crate provides a simple way to render 2D text with wgpu by:

  • shaping/calculating layout/rasterizing glyphs (with cosmic-text)
  • packing the glyphs into texture atlas (with etagere)
  • sampling from the texture atlas to render text (with wgpu)

To avoid extra render passes, rendering uses existing render passes (following the middleware pattern described in wgpu's Encapsulating Graphics Work wiki page.

License

This project is licensed under either Apache License, Version 2.0, zlib License, or MIT License, 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.

Dependencies

~14–46MB
~692K SLoC