Re: scaled_font lifecycle issue

Fred Bca <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CAKTSDKZfSmG6c6etgNA9KqyUzqhitR+aZXk5RAakCqO-vQKX8w@mail.gmail.com>
My problem here is not with the cache, which is properly implemented,
removing scaled fonts when not in use anymore (refcount=0), which also
removes the associated font_face from the cache if not used elsewhere.

The issue comes from the additional optimization that consists in
storing UNUSED fonts in the hold_overs list as well as in the
mru_scaled_font item. I am just proposing an API to configure cairo
not to use these additional lists, so that fonts that are not used
anymore are released as expected when using external system fonts.


On Sun, Apr 10, 2016 at 4:20 AM, Lawrence D'Oliveiro
<[email protected]> wrote:
> On Sun, 10 Apr 2016 11:27:31 +0930, Adrian Johnson wrote:
>
>> On 10/04/16 09:08, Lawrence D'Oliveiro wrote:
>>
>>> 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'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.
>
> I guess the only answer is to do what we already do now, and that is
> have separate font_face objects, so that Cairo maintains a separate
> cache for each. Just it would be nice if these could share underlying
> font data somehow, instead of having to load multiple copies.
> --
> cairo mailing list
> [email protected]
> https://lists.cairographics.org/mailman/listinfo/cairo
-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.