From a6bb56bf277a4dcf18b4315f0b116f57a734e2ce Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Wed, 16 Oct 2024 17:35:05 -0400 Subject: [PATCH] fix: derive serde traits --- core/src/font.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/font.rs b/core/src/font.rs index 2b68decf90..227d470576 100644 --- a/core/src/font.rs +++ b/core/src/font.rs @@ -71,6 +71,7 @@ pub enum Family { /// The weight of some text. #[allow(missing_docs)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub enum Weight { Thin, ExtraLight, @@ -87,6 +88,7 @@ pub enum Weight { /// The width of some text. #[allow(missing_docs)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub enum Stretch { UltraCondensed, ExtraCondensed, @@ -103,6 +105,7 @@ pub enum Stretch { /// The style of some text. #[allow(missing_docs)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub enum Style { #[default] Normal,