Skip to content

Replace Arc with Reference

Cameron Steffen requested to merge camsteffen/rusttype:font-ref into master

This is just a suggestion...

It seems like there is a lot of unnecessary thread synchronization by having an Arc in Font and Glyph. We can replace Arc with a reference to Font in Glyph and friends. There are downsides to this approach covered below (unless I missed something). But this is worth it in my opinion. Thread synchronization is a feature the user may choose to add themselves with Arc or something else.

Breaking changes:

  1. Glyph and friends cannot outlive Font
  2. Font is no longer Clone
  3. Font enum variants' contents changed
Edited by Cameron Steffen

Merge request reports