[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 16:11:04 +0200
- Subject: RE: [XaraXtreme-dev] Current/default font
In message <5056CBC646CB4047BB26120F4377DB71DC8430@xxxxxxxxxxxxxxxxxxx
>
"Gerry Iles" <GerryI@xxxxxxxx> wrote:
> This appears to be because the font handle member of the attribute is
> different to the default one. The default has a value of 0 and the one
> applied to the story has the value 2. Presumably this causes the
> equality check to fail and the attribute is not removed. Exactly what
> this member does I'm not sure but I suspect that it shouldn't actually
> take part in the equality test.
Due to the way the font system works the default font does not appear
in the cache, so if Times New Roman is chosen from the font menu, it
is not found in the cache and a new font cache entry is created for
it. If desired, that would be easy to fix in the cache search code.
Regarding the comparison: It is pointless to compare all of name,
class and handle in the font attribute comparison test because handle
equality is equivalent to name+class equality. So, comparing just the
handle would do and would be much faster, or, just comparing the
name+class would do, too. Apart from added speed it would not make any
difference though.
The question really is whether or not we want these typeface
attributes for text in the default font. This behaviour is different
from all other attribute types and it makes the default attribute
system pretty pointless for font attributes.
Martin
> -----Original Message-----
> From: owner-dev@xxxxxxxxxxxxxxxx [mailto:owner-dev@xxxxxxxxxxxxxxxx] On
> Behalf Of Phil Martin
> Sent: 27 July 2006 14:08
> To: dev@xxxxxxxxxxxxxx
> Subject: RE: [XaraXtreme-dev] Current/default font
>
> I carried out the single-text-story-times-new-roman test before I made
> that assertion, viewing the resulting file in our Debug file format
> viewer dialog.
>
> (Using my local Xtreme 3.0 development version.)
>
> Phil
>
>> -----Original Message-----
>> From: owner-dev@xxxxxxxxxxxxxxxx
>> [mailto:owner-dev@xxxxxxxxxxxxxxxx] On Behalf Of Alex Bligh
>> Sent: 27 July 2006 13:58
>> To: dev@xxxxxxxxxxxxxx
>> Cc: Alex Bligh
>> Subject: Re: [XaraXtreme-dev] Current/default font
>>
>> Martin,
>>
>> You are premising your argument re the default attributes on
>> the following two assumptions:
>> 1. That the default attribute is and will always be Times New Roman
>> even if it isn't installed
>> 2. That the behaviour Phil describes whereby an attribute is
>> saved (not 'is in tree outside the default attribute
>> set', but 'saved') even when then the object is in the font
>> used in the default attributes is a bug.
>>
>> (1) is begging the question - IE you are basing your argument
>> on an assumption which we are arguing is incorrect. I don't
>> see why it's a good idea to have a default attribute which is
>> in a font which may not be installed? Perhaps I'm missing
>> something here.
>>
>> (2) I understood to be deliberate, rather than a bug.
>> Precisely so that documents do not rely on the default font
>> attribute and so it can be changed.
>>
>> There's an easy way to settle this, which is to save a
>> document with a single text story in times new roman (the
>> default attribute).
>> If it has a font attribute of any sort in the /file/ then
>> there is no danger in changing the default attributes. Yes?
>> As then if we change them to the appropriate substitution,
>> and use just that in a document, the file will also (I
>> presume) save that out as an attribute, yes? If, on the other
>> hand, these two tests don't work, and NO font attribute is
>> saved in the file, then Phil is wrong, you are right, and we
>> can't change default attributes which means we will have to
>> live with the situation where the default attribute can
>> represent an uninstalled font.
>>
>> Alex