Skip to content

Commit

Permalink
Merge c5875d8 into 3d502fe
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyr committed May 13, 2021
2 parents 3d502fe + c5875d8 commit 1267e8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/glyph/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ impl Glyph {
// Skip serializing advance if both values are zero, infinite, subnormal, or NaN.
if self.width.is_normal() || self.height.is_normal() {
let mut start = BytesStart::borrowed_name(b"advance");
if self.width != 0. {
start.push_attribute(("width", self.width.to_string().as_str()));
}
if self.height != 0. {
start.push_attribute(("height", self.height.to_string().as_str()));
}
if self.width != 0. {
start.push_attribute(("width", self.width.to_string().as_str()));
}
writer.write_event(Event::Empty(start))?;
}

Expand Down

0 comments on commit 1267e8d

Please sign in to comment.