Panicking when font is not found or can't be loaded
jocke-l opened this issue · comments
I'm using the Pathfinder C-binding to render text in my application, and I noticed that the program crashed irrecoverably when the selected font wasn't found or couldn't be loaded. I initially thought this was just a minor problem in the C-binding code, but when I investigated it further, it seems to be a deeper design issue.
Lines 232 to 236 in e4fcda0
I'm not a Rust expert so I don't know the reason for these panics, but I think Pathfinder should propagate these error conditions so that they can be handled further up by the caller, including from C.