Underline Text

Please use this forum to post feedback and suggestions related to QCAD.

Moderator: andrew

Post Reply
ssobol
Newbie Member
Posts: 5
Joined: Mon Mar 25, 2019 10:33 pm

Underline Text

Post by ssobol » Mon Mar 25, 2019 10:40 pm

I am requesting a feature that allows underlining text. This is important when doing electrical diagrams. Underlined letters indicate lower case pin designations in electrical connectors.

For instance, a multipin connector may have both a pin marked "S" and one marked "s". To make the difference clear the one would be "S" in the prints and the other "s".

Thank you for addressing this.

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: Underline Text

Post by andrew » Mon Mar 25, 2019 11:46 pm

You can create an underlined text as follows:

- Create a normal (not underlined) text using Draw > Text and make sure that on the left side of the dialog the checkbox for "Simple Text" is checked.
- Select the text and use the property editor (View > Property Editor) to add %%u to the start of the text property, for example "%%us" to create an underlined s.

%%u is the DXF code to toggle underlining for simple texts.

Note that support of underlined texts is incomplete at this point. The text dialog does not support this feature.

User avatar
petevick
Premier Member
Posts: 392
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

Re: Underline Text

Post by petevick » Mon Nov 16, 2020 11:02 am

I've just been looking at underlining some text and came across this thread.

To add a bit more information, it is possible to add underline to text that has not got the the 'simple text' property set, ie multi line text. Simply add \L where you need underline to start and \l (that's a lower case L) where underline should end.

Other DXF codes do not appear to work.

I'm guessing that there are other formatting codes for bold and italic etc, but Google can't find them, as yet.
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Qcad Pro 3.29.6

CVH
Premier Member
Posts: 3416
Joined: Wed Sep 27, 2017 4:17 pm

Re: Underline Text

Post by CVH » Mon Nov 16, 2020 3:22 pm

Hi petevick,
\L & \l are rich text codes.
One can simply choose that in the QCAD text dialog. :wink:

There are also:
\P = line feed
\Hx; = font height from hereon
\fArial|b1|i0|c0|p0; = bold ON (where Arial is the font name)
\fArial|b0|i0|c0|p0; = bold OFF
\fArial|b0|i1|c0|p0; = italic ON
\fArial|b0|i0|c0|p0; = italic OFF
... (Any |c1 or |p1 is reset)
\SHello World^; = superscript (where 'Hello World' is the text)
\S^Hello World; = subscript
\Cx; = color from hereon (where x is the color number, 256=ByLayer, 0=ByBlock, 1=red ...)

Regards,
CVH

User avatar
petevick
Premier Member
Posts: 392
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

Re: Underline Text

Post by petevick » Mon Nov 16, 2020 3:38 pm

I'm sure I can make do with just underline, the bold and italic are waaay too long. I think during my 30 some years of using cad commercially, Acad and 3D Tekla Structures, I have only ever used underline, so I guess I can make do with it in my retirement.
Thanks for the effort of posting the codes though :wink:
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Qcad Pro 3.29.6

CVH
Premier Member
Posts: 3416
Joined: Wed Sep 27, 2017 4:17 pm

Re: Underline Text

Post by CVH » Mon Nov 16, 2020 4:15 pm

petevick wrote:
Mon Nov 16, 2020 3:38 pm
the bold and italic are waaay too long.
One doesn't have to include these codes manually. :shock:
Select your text in the QCAD text dialog and choose the formatting you desire. :wink:

Regards,
CVH

User avatar
petevick
Premier Member
Posts: 392
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

Re: Underline Text

Post by petevick » Mon Nov 16, 2020 4:22 pm

CVH wrote:
Mon Nov 16, 2020 4:15 pm
One doesn't have to include these codes manually. :shock:
Select your text in the QCAD text dialog and choose the formatting you desire. :wink:

Regards,
CVH
Yes I'm aware of that, but this came about when I wanted to underline some existing multi line text.
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Qcad Pro 3.29.6

CVH
Premier Member
Posts: 3416
Joined: Wed Sep 27, 2017 4:17 pm

Re: Underline Text

Post by CVH » Mon Nov 16, 2020 4:38 pm

petevick wrote:
Mon Nov 16, 2020 4:22 pm
this came about when I wanted to underline some existing multi line text.
Double-click the text itself ... that should do the trick. :wink:
CVH

Post Reply

Return to “QCAD Suggestions and Feedback”