I'm storing a Face in an Arc that is shared across multiple threads. When I need to perform shaping, I call Face::clone and set the font size on the cloned Face. This clone is not entirely free because Face contains a Vec.
I would like for shape to take an additional argument that contains all of the mutable properties of a Face so that Face can be treated as immutable after construction. E.g.
I'm storing a
Face
in anArc
that is shared across multiple threads. When I need to perform shaping, I callFace::clone
and set the font size on the clonedFace
. Thisclone
is not entirely free becauseFace
contains aVec
.I would like for
shape
to take an additional argument that contains all of the mutable properties of aFace
so thatFace
can be treated as immutable after construction. E.g.