cosmic-text
cosmic-text copied to clipboard
Remove `Mutex` from `FontSystem`, and make methods take `&mut self`
Types wrapping &FontSystem
instead need to have methods taking an &mut FontSystem
. Eliminating the lifetime bounds make the API more usable, but perhaps too many methods require this to be passed.
Moving interior mutability to the caller means it isn't used unless needed, and the caller can use a Mutex
, some nostd alternative, or a RefCell
.
This updates the editor-orbclient
to compile with the API changes. The others need to be updated, but perhaps not until any changes to make methods not require an &mut FontSystem
if possible.