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
Loading fonts, which are JetBrains fonts in assets, would lead to panic. There are duplicate items with same
name_id()
return byface.names()
which would causefind()
to always find the first value which may resolved toNone
.Filter out all
None
names should be a solution.