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

RE: [XaraXtreme-dev] Current/default font



In message <5056CBC646CB4047BB26120F4377DB71DC8429@xxxxxxxxxxxxxxxxxxx 
>
          "Phil Martin" <Phil@xxxxxxxx> wrote:

> 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.)

You are right, Phil. My observation was wrong. Sorry for causing 
confusion. With the test I performed I did indeed end up with a text 
story without a font attribute and a text line without a font 
attribute, but I forgot to look further down. It now turns out that 
each text character has its own copy of the font attribute.

The reason why the font attribute is there is the simple fact that no 
font you ever choose from the menu can be identical to the default 
font: The latter has font handle 0 whereas if you choose Times New 
Roman from the menu, it gets a new font handle and is therefore 
considered different from the default font.

This idiosyncrasy is not a problem and may make our life easier 
because it stops things from going wrong even if we decided to change 
the default font attribute. It also means that it is immaterial what 
the default font attribute in the document says because it is never 
consulted (unless in the case where some attribute application code 
goes wrong and we end up with a text line that has never been subject 
to any "apply attribute" operation, which should not happen).

So, due to this technicality (may it be deliberate or not) my 
reasoning does not apply to the default font. It still applies to each 
and every other default attribute.

Martin