Diggory Hardy
Diggory Hardy
It's not so obvious from the above, but Cargo now supports this: `-Zwarnings --config 'build.warnings="deny"'`
> Do I understand correctly that your approach doesn't allow sharing fontdb between threads? That's one of the requirements. I think it should but haven't tested. Specifically, there is a...
Fixed: there's no longer a need for `DefaultFontResolver` since we can just make `Database` implement `FontResolver` (avoiding the need for a variant over a `&Database`). I think the previous code...
> On another note, if I'm not mistaken the implementation in this PR doesn't really allow for lazy font loading. Since both `select_font` and `select_fallback` are `&self`, we'd have to...
> Another reason for this is that in the future we will support fonts embedded in CSS, which must not be added to the "global" fontdb. That's why we need...
~~What if `Options` contains an `Arc` instead (where `FontResolver` is some trait impl'd by `fontdb::Database`)?~~ An `Arc` will upcast appropriately, as will a user-defined type `T` implementing that trait. Edit:...
To further explain my **motivation**: [`kas_text::fonts::Database`](https://docs.rs/kas-text/latest/kas_text/fonts/struct.Database.html) is a struct wrapping `fontdb::Database` with a set of font aliases. This is used to implement [`FontSelector::select`](https://github.com/kas-gui/kas-text/blob/master/src/fonts/selector.rs#L402), where `FontSelector` is roughly akin to `usvg::Font`...
It seems this approach is viable. Work on the font management side is here: https://github.com/kas-gui/kas-text/pull/87. (The SVG font resolver is WIP.)
I hit this too; luckily I found this issue since the error message is not helpful. The simplest fix appears to be just to delete the `.lock` file: ```sh rm...
I just ran into this too — it would make sense to me *either* to not send `Resized(0)` *or* to only do so *after* calling `suspended` (because in this case...