Replace skip_shaping boolean with Shaping enum

This commit is contained in:
Héctor Ramón Jiménez 2023-04-21 20:24:44 +02:00
parent ad111a1df1
commit 0f055c0a13
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
5 changed files with 67 additions and 62 deletions

View file

@ -12,7 +12,7 @@
//! point, you can use the `SwashCache` to rasterize glyphs into either images or pixels.
//!
//! ```
//! use cosmic_text::{Attrs, Color, FontSystem, SwashCache, Buffer, Metrics};
//! use cosmic_text::{Attrs, Color, FontSystem, SwashCache, Buffer, Metrics, Shaping};
//!
//! // A FontSystem provides access to detected system fonts, create one per application
//! let mut font_system = FontSystem::new();
@ -36,7 +36,7 @@
//! let attrs = Attrs::new();
//!
//! // Add some text!
//! buffer.set_text("Hello, Rust! 🦀\n", attrs, false);
//! buffer.set_text("Hello, Rust! 🦀\n", attrs, Shaping::Advanced);
//!
//! // Perform shaping as desired
//! buffer.shape_until_scroll();