Overscore Tabs in Mtext

Discussion in 'AutoCAD' started by Jason Piercey, Jun 9, 2004.

  1. AutoCAD 2005

    Seems you can underline a 'tab character'
    but you can't overscore it.

    (setq
    ms
    (vla-get-modelspace
    (vla-get-activedocument
    (vlax-get-acad-object))))

    (setq p (vlax-3d-point '(0 0 0)))

    ; works
    (vla-addmtext ms p 0.0 "abc{\\L\t}def")

    ; doesn't work
    (vla-addmtext ms p 0.0 "abc{\\O\t}def")

    ; works
    (vla-addmtext ms p 0.0 "abc{\\Osome-other-characters}def")

    Anyone know of a work around?
     
    Jason Piercey, Jun 9, 2004
    #1
  2. Jason Piercey

    Steve Doman Guest

    Jason,

    I ran your code snip and noticed that regarding the overscore Mtext
    example, the overscore *is* present but is displayed as just a small
    speck (you have to look closely). If you use a font like Arial, the
    speck becomes larger but still is not acceptable.

    Don't have a solution for you. But just for your information, I also
    tried the formatted string below, which doesn't use the curly braces for
    grouping. Thought maybe that might help but no. Go the same results as
    you did.

    ; Still doesn't work
    (vla-addmtext ms p 0.0 "abc\\O\t\\odef")

    So perhaps it is futile to try to generate the overscore if the Font
    doesn't like to overscore a Tab character (don't know for sure).

    Steve Doman
     
    Steve Doman, Jun 9, 2004
    #2
  3. Hi Steve,

    I checked a couple of different fonts but didn't
    see the spec you are referring to, nonetheless it
    doesn't do what I need it to do.

    For this particular application I might be able to
    introduce a line of tab characters above what I
    wan't overscored, and use an underline on those
    tabs instead. Don't really like the idea, but if it
    will work....

    Thanks for taking a look at this.
     
    Jason Piercey, Jun 9, 2004
    #3
  4. Jason Piercey

    Steve Doman Guest

    Hello Jason,

    You're welcome. I should have added to my previous post that the fonts I
    was using was Txt.shx and Arial.ttf

    Don't know why you didn't see the teeny tiny overscore; I had to zoom
    extents to the single Mtext entity.

    Maybe if Dave from TC Fonts is watching, he could give us a better
    explanation to this tab formatting issue.

    Steve Doman
     
    Steve Doman, Jun 9, 2004
    #4
  5. I went back and tried the txt.shx and Arial.ttf
    and didn't see the spec.... Possibly different
    versions of these fonts? Good thought on Dave,
    Dave? you out there?
     
    Jason Piercey, Jun 9, 2004
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.