o2sh / provok

Text rendering
MIT License
72 stars 3 forks source link

fix: filter out None values #3

Closed tizee closed 2 years ago

tizee commented 3 years ago

Loading fonts, which are JetBrains fonts in assets, would lead to panic. There are duplicate items with same name_id() return by face.names() which would cause find() to always find the first value which may resolved to None.

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/font/loader/parser.rs:75:14

Filter out all None names should be a solution.