Solved

Changing CAD Font style

  • 10 January 2017
  • 3 replies
  • 9 views

Badge +4

Hi, I'm looking to convert CAD text to a line feature where the geometry represents the centre-line of the text. The basic algorithm is:

  1. generate the oriented bounding box of the CAD text
  2. generate the center line of that bounding box.

This is working fine however it looks like FME uses a 'default' font style so when I change the font style in CAD the bounding box does not change. I've tried exposing various autocad properties and changing the style but when I use inspector the text (and resultant bounding box) are always the same. (Changing the size works, just not the style).

Is there any way of converting the font style so it is honoured when you open it in Inspector?

Or does inspector have a 'default' font it always uses?

Thanks.

Ash.

icon

Best answer by fgiron 10 January 2017, 14:20

View original

3 replies

Badge +4
The image in the link below shows an example of where the font style was changed in CAD (top half of image) but when I use inspector to look at the source drawing (bottom half of image), all text appears the same.

 

fme-cad-screenshot.png

 

 

Badge +15

Hi Ash,

How are you doing the bounding box generation? Have you had a look at the TextStroker transformer? It has a "Font Name" Parameter. It looks like it you could use for creating polygons from the texts and then extracting the bounding box form them.

Badge +4

So simple. The TextStroker transformer does exactly what I was after! Thanks so much!

Reply