diff options
Diffstat (limited to 'src/font.rs')
| -rw-r--r-- | src/font.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/font.rs b/src/font.rs index 516d4bbe..a55a2a13 100644 --- a/src/font.rs +++ b/src/font.rs @@ -2,6 +2,7 @@ use std::collections::HashMap; use std::fmt::{self, Debug, Display, Formatter}; +use std::ops::Add; use serde::{Deserialize, Serialize}; @@ -156,6 +157,14 @@ impl Em { } } +impl Add for Em { + type Output = Self; + + fn add(self, other: Self) -> Self { + Self(self.0 + other.0) + } +} + /// Caches parsed font faces. pub struct FontCache { faces: Vec<Option<Face>>, |
