3 unstable releases
0.2.1 | Aug 18, 2023 |
---|---|
0.2.0 | Aug 15, 2023 |
0.1.0 | Aug 14, 2023 |
#1768 in Game dev
29KB
450 lines
expedition
A simple and universal rich text styling library, designed to be easily adapted to any output format.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
lib.rs
:
A simple and universal rich text styling library, designed to be easily adapted to any output format.
Inspired by KyoriPowered/adventure.
In many cases when user messages are involved (such as in games or user-editable text fields), you may wish to add some rich text styling options such as color, or decorations such as bold or italic. Although many libraries such as termcolor or egui already support styling text with various options, they all use their own formats for doing so. This crate aims to provide a universal format for transmitting and storing rich text messages, supporting a subset of common features that other libraries contain.
Usage
The entry point of the library is Message
:
use expedition::{Message, IntoMessage};
let msg = Message::new("Hello, ")
.with(Message::new("world!"));
See the documentation of Message
for usage info.
Feature flags
Dependencies
~0.5–9MB
~72K SLoC