Skip to main content
Solved

Changing CAD Font style


bearman
Participant
Forum|alt.badge.img+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.

Best answer by fgiron

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.

View original
Did this help you find an answer to your question?

3 replies

bearman
Participant
Forum|alt.badge.img+4
  • Author
  • Participant
  • January 10, 2017
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

 

 


fgiron
Supporter
Forum|alt.badge.img+20
  • Supporter
  • Best Answer
  • January 10, 2017

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.


bearman
Participant
Forum|alt.badge.img+4
  • Author
  • Participant
  • January 11, 2017

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings