Re: scaled_font lifecycle issue
Adrian Johnson <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
On 10/04/16 09:08, Lawrence D'Oliveiro wrote: > On Sat, 9 Apr 2016 19:30:01 +0930, Adrian Johnson wrote: > >> Maybe we need a font_face API function to make cairo drop a font from >> the cache once the application drops all references to the font_face >> and scaled fonts? > > A more general invalidate-cache-for-specified-font-face function > would be very useful. It would help with use of multiple-master-type > font technologies. I hit this situation when implementing my wrapper > for the Hershey fonts <https://github.com/ldo/hersheypy> for Cairo: to > use different line widths, I had to load multiple copies of the same > font to get around Cairo’s caching. I'm not sure how well this would work for PDF/PS/SVG as these backends hold on to the font_face of every font used until after all pages have been emitted before all the fonts are emitted. -- cairo mailing list [email protected] https://lists.cairographics.org/mailman/listinfo/cairo