[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
RE: [XaraXtreme-dev] Substituted fonts and Bug 1057
- From: Alex Bligh <alex@xxxxxxxxxxx>
- Date: Mon, 22 May 2006 16:08:13 +0100
- Subject: RE: [XaraXtreme-dev] Substituted fonts and Bug 1057
Charles,
--On 22 May 2006 15:53 +0100 Charles Moir <CharlesM@xxxxxxxx> wrote:
> I was assuming the same thing. Just the substituted fonts
from /that/
> document.
But how do we get them? I am not aware of any data structures
that would allow us to find out which fonts are substituted
in a particular document. I do not think we can afford to
scan the complete document each time the dropdown list is
opened because this is probably too slow, so we need to add
an appropriate data structure to the document class to keep
track of substituted fonts.
How does the Name gallery do it? Does that help? I think it retains a
list of all names of fonts used in the current document (not sure how or
when it does the scan to get this data though).
The name gallery I am afraid is (my opinion) not too beautiful a
piece of code. Essentially, whenever an object gets used, something
seems to go call directly into the name gallery to update the
it. It then maintains state. The problem with this approach is it
depends upon the dialog (or gallery) existing. Essentially, the UI
is recording persistent state. This only happens to work in Xtreme
because galleries are never actually destroyed (just hidden), and
fails dismally on LX.
So one could go look for the hooks into the name gallery and put in
calls to a proper system for remembering these (which is UI independent)
which would also be useful for whenever the name-gallery is fixed.
The file info dialog also gets font usage state but I'm not sure how
it does it.
Alex