Skip to content

antouhou/protextinator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 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.

About

Handle text with ease

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages