[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
Re: [XaraXtreme-dev] Rescanning available fonts
- From: Phil Martin <phil@xxxxxxxx>
- Date: Fri, 19 May 2006 10:19:41 +0100
- Subject: Re: [XaraXtreme-dev] Rescanning available fonts
Martin Wuerthner wrote:
In message <5056CBC646CB4047BB26120F4377DB71D17AEA@xxxxxxxxxxxxxxxxxxx
"Neil Howe" <NeilH@xxxxxxxx> wrote:
I am about to change the font system to no longer report "FreeType"
fonts but rather report TrueType and Type1 fonts instead. [...]
I have implemented the above and it fixes bugs 1066 and 1076 and also
file saving. It does take a long time to enumerate fonts though
because opening each font using Pango/FreeType is rather expensive. On
my system (3.2GHz Pentium 4) with about 300 fonts installed, it takes
6 seconds.
So, as I gathered, it is not practicable without a cache - the text
tool calls the font enumerator each time it is selected and we cannot
have such a long delay in that situation.
Ok, so are you looking at implementing a cache Martin? Is this a big
job?
Yes, I will do it and it is hopefully not a big job. I do not think
checking in my current changes makes any sense until I got the cache
working - otherwise everyone will have a confusing wait of several
seconds each time the text tool is selected.
I was wrong earlier in claiming that the wait also occurs during
start-up - this only happened because TextTool was my default tool. I
guess it will happen though when the font gallery is enabled and open.
It is irritating to see the wait when the text tool is first selected.
Maybe we should have a pop-up window saying "Scanning fonts..." while
it is done? Actually, coming to think of it - just enumerating the
fonts is quick, so I could first enumerate them and then open each
individual one to enquire about its type, then we could even have a
window with a progress bar.
Martin
We should avoid showing technicalities like this to the user unless
there's a really good reason for them to see it.
A couple of suggestions:
1. Scan the fonts during startup while the Splash box is open.
2. Scan the fonts in the background without holding up the main program,
either on Idle events or in a separate thread. Then it will only hold
the user up if he needs to use the fonts before the background scan has
finished.
Phil