Replace skip_shaping boolean with Shaping enum
This commit is contained in:
parent
ad111a1df1
commit
0f055c0a13
5 changed files with 67 additions and 62 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue