diff options
| author | Martin Haug <mhaug@live.de> | 2021-06-10 23:08:52 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-06-10 23:15:51 +0200 |
| commit | c28708aa196eaca247cdab6b5e8af9751b4f1dad (patch) | |
| tree | e390e84d1a7a1eb2789680a39141c804ff3f85a1 /src/font.rs | |
| parent | 5611c26577c4cf6d52b9b66b7b1a32253aa23ec1 (diff) | |
Text decorations
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>>, |
