Protextinator is a powerful text editing and rendering library built on top of cosmic_text, providing a simpler API with advanced features for all your text handling needs!
💡 Perfect for game UIs, text editors, and any application that needs sophisticated text rendering with minimal hassle.
- Vertical text alignment - Position your text exactly where you want it
- Text buffer size measurement - Know exactly how much space your text needs
- Scroll position management with absolute coordinates
- Simple font loading interface - Load fonts from files or embedded bytes
- Text state collection with optional usage tracking for garbage collection
- Custom metadata for text states
- Text selection and editing capabilities
- Efficient text buffer caching
- Word wrapping and text styling
- Optional serialization support via the
serializationfeature
Add Protextinator to your Cargo.toml:
[dependencies]
protextinator = "0.1.0"With serialization support:
[dependencies]
protextinator = { version = "0.1.0", features = ["serialization"] }For code examples and detailed usage, check out:
Protextinator makes it easy to:
- Create and manage text states
- Style text with various fonts, colors, and alignments
- Handle text selection and editing
- Efficiently render text in your application
Protextinator works great with rendering libraries like Grafo and windowing libraries like Winit. Check out the examples directory for a complete integration example.
- TextManager: The main entry point for managing text states and fonts
- TextState: Represents a text buffer with styling and layout information
- Id: A unique identifier for text states
- TextStyle: Configure font size, color, alignment, and more
- Action: Perform operations like copy, paste, and cursor movement
Contributions are welcome! Feel free to open issues or submit pull requests.
Licensed under either of:
- Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.