Skip to content

Commit 7ca7c5c

Browse files
committed
fix(font): allow unknown fontweight enum value
1 parent 1372962 commit 7ca7c5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/font.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl Font {
5050

5151
pub fn weight(&self) -> FontWeight {
5252
unsafe {
53-
mem::transmute::<u32, FontWeight>((*self.native.get()).GetWeight())
53+
FontWeight::from_u32((*self.native.get()).GetWeight().0)
5454
}
5555
}
5656

0 commit comments

Comments
 (0)