diff --git a/masonry/examples/hello_masonry.rs b/masonry/examples/hello_masonry.rs index a464ef444..80ecbd260 100644 --- a/masonry/examples/hello_masonry.rs +++ b/masonry/examples/hello_masonry.rs @@ -10,8 +10,7 @@ use masonry::dpi::LogicalSize; use masonry::text::StyleProperty; use masonry::widget::{Button, Flex, Label, RootWidget}; -use masonry::{Action, AppDriver, DriverCtx, WidgetId}; -use parley::fontique::Weight; +use masonry::{Action, AppDriver, DriverCtx, FontWeight, WidgetId}; use winit::window::Window; const VERTICAL_WIDGET_SPACING: f64 = 20.0; @@ -35,7 +34,7 @@ fn main() { let label = Label::new("Hello") .with_style(StyleProperty::FontSize(32.0)) // Ideally there's be an Into in Parley for this - .with_style(StyleProperty::FontWeight(Weight::BOLD)); + .with_style(StyleProperty::FontWeight(FontWeight::BOLD)); let button = Button::new("Say hello"); // Arrange the two widgets vertically, with some padding diff --git a/masonry/src/lib.rs b/masonry/src/lib.rs index 27b6b31a4..a948bb28d 100644 --- a/masonry/src/lib.rs +++ b/masonry/src/lib.rs @@ -177,8 +177,8 @@ pub use vello::kurbo; pub use cursor_icon::{CursorIcon, ParseError as CursorIconParseError}; pub use kurbo::{Affine, Insets, Point, Rect, Size, Vec2}; -pub use parley::fontique::Weight as TextWeight; pub use parley::layout::Alignment as TextAlignment; +pub use parley::style::FontWeight; pub use vello::peniko::{Color, Gradient}; pub use action::Action; diff --git a/masonry/src/widget/variable_label.rs b/masonry/src/widget/variable_label.rs index a624cce84..a88f1a1aa 100644 --- a/masonry/src/widget/variable_label.rs +++ b/masonry/src/widget/variable_label.rs @@ -6,7 +6,6 @@ use std::cmp::Ordering; use accesskit::{Node, Role}; -use parley::fontique::Weight; use smallvec::{smallvec, SmallVec}; use tracing::{trace_span, Span}; use vello::kurbo::{Point, Size}; @@ -15,8 +14,8 @@ use vello::Scene; use crate::text::{ArcStr, StyleProperty}; use crate::widget::WidgetMut; use crate::{ - AccessCtx, AccessEvent, BoxConstraints, EventCtx, LayoutCtx, PaintCtx, PointerEvent, QueryCtx, - RegisterCtx, TextEvent, Update, UpdateCtx, Widget, WidgetId, + AccessCtx, AccessEvent, BoxConstraints, EventCtx, FontWeight, LayoutCtx, PaintCtx, PointerEvent, + QueryCtx, RegisterCtx, TextEvent, Update, UpdateCtx, Widget, WidgetId, }; use super::{Label, WidgetPod}; @@ -142,7 +141,7 @@ impl VariableLabel { pub fn from_label_pod(label: WidgetPod