Page 2 of 2

Re: Help required

Posted: Mon Feb 05, 2018 7:38 pm
by andrew
Aircraft53 wrote:The text height of 2.5 appears on its own. When it was created text height was 0.
That explains a lot.
0 is not a valid text height (DXF/DWG standard). dxflib will save the file, but when opening it, the value will be corrected by Teigha to something valid which is considered better than rejecting the file.
Aircraft53 wrote:Can you please explain what you mean by below statement?
"All the texts in this drawing set the font and text height as inline formatting instead of text entity attributes for some reason"
Let's have a look at one of the texts in the property editor:
Screen Shot 2018-02-05 at 18.33.09.png
Screen Shot 2018-02-05 at 18.33.09.png (150.01 KiB) Viewed 1919 times
The text height property is set to 2.5.

The text itself is then formatted inline (\H0.1;1). "\H#;" is DXF text code for "change the height to the given value at this point". It would be more to the point to set the text height to 0.1 and get rid of the inline formatting (set the text to just "1"). You can easily do this by exploding the text with formatting. This explodes the text into one or multiple text blocks with the same formatting, getting rid of the need for inline formatting in the process. The result are so called "simple" texts. These are one line texts without any inline formatting.