Skip to content

Commit

Permalink
Serialize height before width
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyr committed May 13, 2021
1 parent 3d502fe commit 195dea0
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 195dea0

Please sign in to comment.