Migrate fonts to be stored as resources (#4165)

* Good start

* Impl

* allow responses.add(async { Message::NoOp });

* Fix

* Cache font blob in text node

* Refactor font handling to use Font struct direcly

* Fix fmt

* Embedd Font Resources by default

* Review

* Review

* Cache font info based on ResourceHash
This commit is contained in:
Timon
2026-06-03 09:21:51 +00:00
committed by Keavon Chambers
parent 7b9c480a8d
commit cd8ea1f554
46 changed files with 838 additions and 703 deletions

View File

@@ -43,6 +43,21 @@ impl IntoFuture for MessageFuture {
}
}
impl From<MessageFuture> for Message {
fn from(future: MessageFuture) -> Self {
FutureMessage::Await { future }.into()
}
}
impl<T> From<T> for Message
where
T: Future<Output = Message> + Send + 'static,
{
fn from(future: T) -> Self {
MessageFuture::new(future).into()
}
}
/// Platform-specific async-task executor.
/// Runs `future`, sends the resolved message on `results`, then calls `wake`.
pub trait MessageSpawner: Send + Sync {