TAttr.. I want to define the font

  • I want to change the font that the document current is in (where it is just one font or a mixture of fonts) and change it so that the entire document is now one specific font. Basically, to clean it up.

    I found the sample code below:
    WP1.CPPosition := 0;
    repeat
    WP1.CPAttr^.Font := 0;
    until not WP1.CPMoveNext;
    WP1.Refresh;

    It seems to work. It set all the fonts to Arial. I'd like to make the font user definable. I'd like to understand the structure TAttr. The Font field is of type Byte. I am not sure how that is mapped to a font.

    Any assistance would be appreciated.
    Thanks in advance,
    Orlando