Skip to content

Commit ad0b79e

Browse files
authored
Handle glyph with single point (#42)
Fixes #41
1 parent 7da8aa8 commit ad0b79e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/font.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,8 @@ where
977977
}
978978
(Some(first_offcurve), None) => {
979979
self.alldone = true;
980-
return Some(QuadTo(first_offcurve, self.first_oncurve.unwrap()));
980+
return self.first_oncurve
981+
.map(|oncurve| QuadTo(first_offcurve, oncurve));
981982
}
982983
(Some(first_offcurve), Some(last_offcurve)) => {
983984
self.last_offcurve = None;

0 commit comments

Comments
 (0)