Search code examples
autolisp

Does a DCL Fonts Reference Exist?


I'm was going reviewing a few autolisp and dcl tutorials (afralisp & autolisp-exchange) to brush up on the dcl code. To cut to the question, I see that the text can be underlined by the mnemonic in afralisp and the & in autolisp-exchange.

  • Is there a better way to underline a string of characters?
  • Can a string be made bold, italicized, or strike-though with this file type?
  • If the above is true, is there a reference webpage that has a list of fonts that can be used with the dcl file type?

This webpage may contain the solution, but I haven't seen how: AutoDesk.com


Solution

  • In short, you cannot arbitrarily change the GUI font face or style using standard DCL.

    The ability to underline text is purely an exploit of the mnemonic property which allows DCL controls to be manipulated using keys on the keyboard which correspond to the underlined letters as opposed to using the mouse to click such controls.

    Whilst DCL text has the is_bold property, this has never worked (and likely never will). One alternative is to feign bold text using the set_tile function in conjunction with an image tile; or you can use the fixed_width_font property, but, as the name implies, this will change the text to use a fixed width font (the exact font cannot be changed).

    One other possibility is to display text using the vector_image function applied to an image tile, as I demonstrate in the 'About' dialog for my Incremental Numbering Suite application.