cart: empty [ Login ]

convert DxfText/DxfMText to vertices

1 
dalit
1/30/2019 7:59 AM
Hi, I need to convert text to vertices. I'm using CoordinateCollector:BaseWirefreameGraficFactory, as I saw in some example here. I get the text but not exactly as it was. To get the coordinates I override CreateShape method Please see the file I attached. The first line is the original input text and the last line is the output Thsnks, Dalit
text.png
Wout
1/30/2019 8:22 AM
The first line looks like an SHX font and the last line looks like a true type font. - Wout
dalit
1/30/2019 12:31 PM
I don't understand. I have DxfMText , see it's parameters in mtext.png, I add it to the entities and write it using CadLib.Write, this is the first line. I send the same DxfMText entity to GetCoordinates and got it as you see in the second line. It seems that the font is shx,so why the GetCoordinates bring it as true type?
mtext.png
Wout
1/30/2019 1:05 PM
If CadLib cannot find the shx font it will render the text using the Arial font. You can specify where CadLib should search for shx fonts using method DxfModel.AddShxLookupDirectories(). - Wout
dalit
1/30/2019 3:30 PM
Thanks, It seems that you are right and there is a problem getting the font file. But, whatever font I give, the result is the same. I tried using the AddShxLookupDirectories() with no success. Is there a way to determine if CadLib can find a given font? I want to check it before calling the GetCoordinate Thanks again, Dalit
Wout
1/30/2019 4:33 PM
If it doesn't look the same it can't find it. There's no method to call. There've been some bug fixes in the font lookup for some rare cases in the last half year, but I think you're still on a very old CadLib version. You could download the CadLib trial and see if it's better. - Wout
1