[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
Re: [XaraXtreme-dev] Current/default font
- From: Martin Wuerthner <lists@xxxxxxxxxxxxxxx>
- Date: Thu, 27 Jul 2006 17:52:33 +0200
- Subject: Re: [XaraXtreme-dev] Current/default font
In message <44C8D7D6.6040902@xxxxxxxxxxx>
Alex Bligh <alex@xxxxxxxxxxx> wrote:
> Martin Wuerthner wrote:
>> But if we do not always do it, why do it at all? Just to avoid a
>> single font attribute that contains the name of a font that is not
>> installed? We will have lots of them in the tree anyway simply by
>> loading a document containing fonts that are not installed. We do not
>> do "hard" font substition, just "soft" font substitution, i.e., the
>> text remains in the unknown font but when it is displayed the default
>> font is used instead.
>
> I had been presuming the implementation time of either option would
> be the same.
>
> IE (in PsuedoCode)
> FixFontAttributeIfUnusedAndUninstalled(CurrentAttribute);
> becomes
> FixFontAttributeIfUnusedAndUninstalled(CurrentAttribute);
> FixFontAttributeIfUnusedAndUninstalled(DefaultAttribute);
>
> Somewhere during the long discussion at GP it became obvious we needed
> to fix both. I now can't remember why. Anyone else? But if the
> implementation time is the same, why not, now we know it's harmless?
Because there are good reasons for changing the current font but I
cannot see any reason for changing the default font attribute. The
default font attribute nodes are just the in-memory manifestations of
the implicit, fixed default attributes that are part of the file
format. The default font attribute has been defined to be Times New
Roman - some choice had to be made.
Yes, we can change the default attribute *node* in some specific
cases. But why would we want to do it in the first place? And if there
really is a good reason for doing it, then are we not going to be in
trouble when we cannot do it? Or, the other way round, if we are happy
without doing it when the circumstances do not allow, we might just as
well never do it.
So far, the only reason given for doing it was that there should be no
font attibutes in the tree for fonts that are not installed. As I
wrote above, we have lots of them anyway (for all fonts found in
loaded documents that do not happen to be installed), so why bother?
Martin