[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] Close on exec for font files
From: |
Keith Packard |
Subject: |
Re: [Devel] Close on exec for font files |
Date: |
Wed, 26 Dec 2001 11:11:27 -0800 |
Around 10 o'clock on Dec 26, Scott Long wrote:
> it is better to just use that API rather than introducing UNIX-specific
> code into a cross-platform library. If similar issues arise in Windows (I
> have no idea, don't program Windows) then this solves the problem on both
> platforms instead of just one.
If a similar issue arrises on another platform (it doesn't on Windows),
then the library could solve it there as well. Here's a diagram of the
API heirarchy I'm dealing with:
Application
v
KDE
v
Qt
v
Xft
v
FreeType
The application has no idea it's using FreeType, neither does KDE, nor Qt.
At the application level, it doesn't even know what fonts are in use; the
toolkit selects them based on the current UI theme in use. So, I'd have
to add a blanket "clean up all open fonts" call at the KDE level and the Qt
level, and then special calls at the Xft level to pass through the
FT_Done_FreeType call.
As Qt is also cross-platform, this call will not be needed *except* on
Unix systems, where failing to call it may well cause problems. Instead
of forcing applications to make a call which is not always needed, it
makes a lot more sense to have the library which knows that it is needed
handle it transparently.
The only relevant question that I can see is whether there is a case where
this call would be incorrect, and as the internal library state gets
destroyed across the 'exec', I find it hard to believe such a case exists.
Keith Packard XFree86 Core Team Compaq Cambridge Research Lab
Re: [Devel] Close on exec for font files, Keith Packard, 2001/12/26