[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

RE: [XaraXtreme-dev] Current/default font



In message <5056CBC646CB4047BB26120F4377DB71DC840A@xxxxxxxxxxxxxxxxxxx 
>
>> What we said at the meeting was we didn't want font
>> attributes for fonts that didn't exist hanging around (as a
>> general point).

Yes, I agree, though we have had that for some time now without any 
apparent problem. I admit that my suggestion would mean that we would 
continue having a default font attribute for a (possibly) non-existing 
font hanging around. However, this is not saved and, by design, can 
never apply to any object - this is because only the current font is 
ever applied and that would be for an installed font.

>> If what Martin says is a problem is in fact a problem, then
>> surely a document whose font is in Arial at the moment would
>> have NO attributes saved in it, as (by his logic) the current
>> attribute would have been the default attribute.

No. Because font attributes are one of the very few where the initial 
*current* attribute in newly created documents (which is Arial) is 
*not* the default attribute (which is Times New Roman). This means 
that new text objects that have been created even before doing any 
font changes get an attribute node with the *current* attributes name.

Not having the attribute with each node is precisely what happens for 
most attributes and is one of the reasons for having default 
attributes in the first place.

Not having a font typeface attribute at all in a text object (and thus 
not saving it) is fully correct as long as the font in use really IS 
Times New Roman, and not surprisingly, if you create a document with 
text objects in Times New Roman, you will not find *any* font 
attribute in the tree (apart from the default font, which is always 
there and never saved). If we changed the default font attribute in 
the tree, however, you would suddenly find text objects without an 
attribute (the ones created in precisely that font), but for a font 
that is NOT Times New Roman.

Just to clarify matters (or start even more confusion) we need to 
clearly distinguish between (a) default attributes (the concept) and 
(b) default attribute nodes. Our default attributes are fixed, they 
can never be changed. They are sort of hardwired into the .xar file 
format. The reason for that is that we do not save default attributes 
in the document so if someone ever decided to change the default 
attributes created when a document is loaded, then the document's 
appearance would change, which is clearly not as intended.

Martin