This implements caching of CTFont handles, not unlike the current font-family cache. This solves a real bottleneck I have in Psst (where creating lot of labels used to be really slow). I've used the associative-cache crate, because it is used in the Direct2D backend already (for caching gradients), and also switched the font family cache to it, for consistency.
This implements caching of
CTFont
handles, not unlike the current font-family cache. This solves a real bottleneck I have in Psst (where creating lot of labels used to be really slow). I've used theassociative-cache
crate, because it is used in the Direct2D backend already (for caching gradients), and also switched the font family cache to it, for consistency.Thanks!