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.
Underline Text
Moderator: andrew
Re: Underline Text
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.
- 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.
- petevick
- Premier Member
- Posts: 392
- Joined: Tue May 19, 2020 9:34 am
- Location: North Norfolk coast UK
Re: Underline Text
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.
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
Linux Mint 21.2 Cinnamon, Qcad Pro 3.29.6
Re: Underline Text
Hi petevick,
\L & \l are rich text codes.
One can simply choose that in the QCAD text dialog.
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
\L & \l are rich text codes.
One can simply choose that in the QCAD text dialog.
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
- petevick
- Premier Member
- Posts: 392
- Joined: Tue May 19, 2020 9:34 am
- Location: North Norfolk coast UK
Re: Underline Text
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
Thanks for the effort of posting the codes though
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Qcad Pro 3.29.6
Linux Mint 21.2 Cinnamon, Qcad Pro 3.29.6
- petevick
- Premier Member
- Posts: 392
- Joined: Tue May 19, 2020 9:34 am
- Location: North Norfolk coast UK
Re: Underline Text
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
Linux Mint 21.2 Cinnamon, Qcad Pro 3.29.6