Multi Line Text Formatting

Here is a great set of tips and format styles for Multiline Text creation that may be useful for putting complex text on drawings. The formatting described below is compatible with AutoCAD but not necessarily with Trimble Field Systems that use DXF and DWG format files.

First, when you create a Text item, you define the text with its default Text Style - the Text Style defines the default text properties that are assigned to all of the characters and words in the text block you are creating - this includes the following

  • Text Style Name
  • Font (True Type or Stroke Fonts)
  • Text Height
  • Text Units (Ground or Sheet)
  • Text Justification (Top, Middle, Bottom, Left, Center, Right)
  • Bold / No Bold
  • Italic / No Italic
  • Underline / No Underline
  • Width Factor (Character spacing)
  • Oblique Angle (Like italic for stroke fonts)
  • Whiteout / No Whiteout
  • Autoflip / No Autoflip

Once the text is created then you can define override formats within the text that will apply formatting to specific characters in the test body to change any of the above parameters for just those characters referenced by the format overrides. The following shows the overrides and gives examples on how they are used.

To access the override capability you have to use the “Raw Mode” editor - this is not so simple but hopefully with this guide, if you need it you can make it work.

To access Raw Mode, select the text and look at its properties in the properties pane.

Find the property called Text: and then open the Text Editor using the […] button at the end of the text string display.

When in the text editor, press F2 to enter Raw Mode. This will show you the additional formatting that has been applied to the text and will allow you to enter the formatting that you require.

For the purposes of this document we will use a Text string “This is a test Text String” and we will apply formats into the text string to show how to use them.

To Underline a selection of words or characters

Format statement \L starts the underline sequence
Format statement \l ends the underline sequence

If we want to underline the words Text String then the statement would be as follows

This is a test \LText String\l

This is the result

This only works for True Type Font Text Styles

To start a new paragraph

Format statement \P starts the new paragraph. Note that \P\P creates a new paragraph with a line gap between paragraphs

If we want to create two paragraphs from the text strings This is a test Text String. and Here is a second paragraph. The format would be as follows.

This is a test Text String.\PAnd here is a second paragraph.

This is the result

And for a line spaced paragraph the format would be as follows.

This is a test Text String.\P\PAnd here is a second paragraph.

This is the result

To start the obliquing of a string of text characters or words

Format statement \Qxx *where xx is the obliquing angle e.g. 30 degrees would be \Q30;

So to oblique the words Text String in the text line the format statement would look as follows

This is a test \Q30;Text String

This is the result

This works for both True Type and Stroke Font Text Styles

To change the height of a string of characters or words

Format statement \H e.g. \H3x; or \H0.8x;

So to make the words Text String 2x taller in the text line the format would look as follows

This is a test \H2x;Text String

This is the result

To make the words Text String 0.5x shorter in the text line the format would look as follows

This is a test \H0.5x;Text String

This is the result

This works for both True Type and Stroke Font Text Styles

To Change the text width of a string of characters or words in a text string

Format statement \Wxx where xx is the width scale factor e.g. \W1.2x; or \W0.6x;

So to make the words Text String 2x wider in the text line the format would look as follows

This is a test \W2x;Text String

This is the result

To make the words Text String 0.5x narrower in the text line the format would look as follows

This is a test \W0.5x;Text String

Note use 0.5x rather than .5x in the format statements.

This works for both True Type and Stroke Font Text Styles

To change the font of a string of characters or words in a text string

Format Statement \FFontName; where Font Name is the name of the text font that you wish to use e.g. \Fcomic;

So to make the words Text String draw with the comic text font the format would look as follows

This is a test \Fcomic;Text String

This is the result

This works in both True Type and Stroke Font Text Style text strings

To change the color of a string of characters or words in a text string

Format Statement \Cx; where x is the number for the required color for the text

\C1; = Red
\C2; = Yellow
\C3; = Green
\C4; = Cyan
\C5; = Blue
\C6; = Magenta
\C7; = White

So to make the words Text String draw with the color Blue the format would look as follows

This is a test \C5;Text String

This is the result

This works for both True Type and Stroke Font Text Styles

Stacking fraction format statements

If you wish to incorporate fractions in your text strings use the following \S format statements

\SA^B

This is the result

image

\SX/Y

This is the result

image

\S1#4

This is the result

image

Note that these formats only work for isolated text that only incorporates a single fraction, if you try to embed this format in a text string like Fraction = S1#4 or \SA#B + \SC#D the formatting will not work as you want it to.

Combining format statements

If you wish to combine format statements e.g. to oblique some words, underline them and change the width and color then the format statement would looks as follows

This is a test \Q30;\W0.8x;\C5;\LText String\l

This is the result

This works for both True Type and Stroke Font Text Styles

Changing the format of a word sequence in body text

If you wish to keep the body text of a paragraph or paragraphs the same, but wish to change the format of certain words then you can use the following {XXX} formatting

This is a {\C3;\H0.5x;\W2.0;Test} on how to {\C5;\H1.5x;\W0.6;change} text mid sentence

The result is as follows

Note: The Text Style that is defined as the basis for a multi line text object will be used by default where formatting statements are not applied. If you want to affect only a part of a text string use the { … } formatting brackets to isolate an area and apply a specific format such as a height or color change within those bracket limits. Note that if you apply multiple formats within a single multi line text object or within a single set of brackets, that the formats like height or width change will accumulate from the prior format i.e. a \H1.2x; followed by a \H1.0x; statement does not change the height of text back to the original text style height - it is a multiple of whatever is current at the time of applying the second height factor. A sequence like \H1.2x; followed by a \H1.3x; format will actually now be 1.56x the height of the original text style.

For example

\H1.2x;\C3;COMMENCING \C7;\H1.0x;AT THE SOUTHEAST \H1.2x; CORNER \H1.0x; OF THE STREET

will generate this result

You can see that the format \H1.0x; before AT THE has no effect on the text height and that the \H1.2x; format before CORNER increases the text height a second time. To generate the format intention of this string you would need to do the following

{\H1.2x;\C3;COMMENCING} \C7;AT THE SOUTHEAST {\H1.2x; CORNER} OF THE STREET

This will generate the following

Note: At the end of a format statement you may require two spaces in the text string if you want a space before the next word in the text - the following shows an example where between } and \C7; are two spaces in the text string.

{\H1.2x;\C3;COMMENCING} \C7;AT THE SOUTHEAST

This works for both True Type and Stroke Font Text Styles

Using characters like \ or { or } in a text string

Because the characters , {, }, /, #, ^ can all be used as formatting characters, if you need to use them in a text string you have to use an escape character to do so. The Escape character is a .

So if you use a format like \SA#B you will get text A/B but if you Escape the \ character by using a second \ i.e. \SA#B you will get text \SA#B.

AutoCAD Text formatting that is not supported in TBC today

The following text formatting from AutoCAD is either not supported or not fully supported in TBC today

Font Formatting like the following is not fully supported in TBC
\Fcomic|b1|i0|c238|p10;
Where
b=Bold = 0 (no bold) or 1 (bold)
i=Italic = 0 (no italic) or 1 (italic)
c=Codepage
p=Pitch

Alignment formatting like the following is not supported in TBC
\A0; bottom
\A1; center
\A2; top

Bullets, Numbered paragraphs, tab stops and columns formatting using \pi, \pxi and \pxt formatting is not supported in TBC today

Overstrike formatting using \O \o formatting is not supported in TBC today

Strike through formatting using \K \k formatting is not supported in TBC today

New column formatting using \N formatting is not supported in TBC today

Paragraph wrap on the dimension line (only in dimensions) using \X formatting is not supported in TBC today

Tracking, character spacing using \T formatting is not supported in TBC today

Non wrapping space or hard space formatting using ~ formatting is not supported in TBC today

Notes:
The Weight property of a Font only applies to Stroke Fonts - True Type Fonts are unaffected buy the Weight property because the True Type defines the weight of the font itself.

The Bold, Italic and Underline Property of a Text Style can only be used with True Type Text Styles. Stroke Fonts do not support these properties. To Bold a Stroke Font change the Weight property of the text. To change the Italic of a Stroke Font use the Oblique angle property.

5 Likes