protextinator

Crates.ioprotextinator
lib.rsprotextinator
version0.2.1
created_at2025-06-30 01:47:27.35984+00
updated_at2025-07-28 00:08:41.753277+00
descriptionText management, made simple
homepage
repositoryhttps://github.com/antouhou/protextinator
max_upload_size
id1731308
size280,308
Anton Suprunchuk (antouhou)

documentation

https://docs.rs/protextinator/

README

🚀 Protextinator

Crates.io Docs.rs License

✨ Text Management, Made Simple!

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.

⚠️ WARNING: This library is work in progress, use at your own risk! ⚠️

🔥 Features

  • 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 serialization feature

📦 Installation

Add Protextinator to your Cargo.toml:

[dependencies]
protextinator = "0.1.0"

With serialization support:

[dependencies]
protextinator = { version = "0.1.0", features = ["serialization"] }

🚀 Quick Start

For code examples and detailed usage, check out:

Protextinator makes it easy to:

  1. Create and manage text states
  2. Style text with various fonts, colors, and alignments
  3. Handle text selection and editing
  4. Efficiently render text in your application

🎮 Integration Example

Protextinator works great with rendering libraries like Grafo and windowing libraries like Winit. Check out the examples directory for a complete integration example.

📚 API Overview

  • 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

🔧 Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

📄 License

Licensed under either of:

at your option.

Commit count: 0

cargo fmt