https://github.com/luan/bevy_stroked_text
https://github.com/luan/bevy_stroked_text
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/luan/bevy_stroked_text
- Owner: luan
- License: apache-2.0
- Created: 2024-02-09T06:48:32.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-10T14:32:04.000Z (about 1 year ago)
- Last Synced: 2025-08-13T13:43:20.073Z (10 months ago)
- Language: Rust
- Size: 259 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE.txt
Awesome Lists containing this project
README
# bevy_stroked_text
[](https://crates.io/crates/bevy_stroked_text)

[](https://docs.rs/bevy_stroked_text)
A Bevy plugin for stroked text rendering. This plugin is experimental and may not have performance or quality suitable for production use.
The way this plugin works currently is by rendering 8 copies of the text with a 1 pixel offset in each direction, then rendering the original text on top of that. This is not the most efficient way to render stroked text, but it is the easiest to implement and works well enough for now.

## Usage
Add the plugin to your app
```rust ignore
App::new()
.add_plugins((DefaultPlugins, StrokedTextPlugin))
.run();
```
Add a StrokedTextBundle to your entity
```rust ignore
commands.spawn(
StrokedTextBundle::new(StrokedText {
text: "Hello, world!".to_string(),
font_size: 32.0,
text_anchor: bevy::sprite::Anchor::Center,
..Default::default()
})
.with_transform(Transform::from_translation(Vec3::Z).with_scale(Vec3::splat(0.25))),
);
```
## Bevy Version
| bevy | bevy_stroked_text |
| ---- | ----------------- |
| 0.13 | 0.2, main |
| 0.12 | 0.1 |
## License
`bevy_stroked_text` is dual-licensed under either
- MIT License (./LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (./LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
at your option.
## Contributions
PRs welcome!