Closed dhardy closed 2 months ago
Erm... what exactly is your solution?
Also, there are like 2 people who would need to implement usvg::FontResolver
themselves. It's a super niche case.
The simplest I can think of is to make this feature dependent:
usvg
uses fontdb
, those types are just re-exports of the fontdb
typesThis will only complicate things.
No, it will simplify things for anyone downstream happening to need to use both types.
An alternative would be to implement From
conversions. Probably more robust (to unforeseen changes in fontdb
definitions of the types), but slightly more complicated.
From
is fine.
resvg
optionally depends onfontdb
. Meanwhile,usvg::FontStyle
is identical tofontdb::Style
usvg::FontStretch
is identical tofontdb::Stretch
Worse, there isn't even a conversion method between the two. This is a pain when implementing a
usvg::FontResolver
.