Skip to main content

Is there a way to read and use AutoCAD's SHX Fonts with FME?

I need to be able to read in a DWG, determine the font used and recreate a map, currently trying to use the PDF Writer, using the original AutoCAD SHX font.

Using the PDFStyler I can choose / define a Windows Font but can't figure out if and how the AutoCAD Fonts can be defined.

 

Hi @deanhowell,

The PDFStyler uses TrueType font. So to be able to use AutoCAD SHX fonts, I think you'd need to convert it to TrueType and install it on the Windows machine. By doing that, you'd then be able to have access to those fonts You may want to look up ways you can convert a SHX to TrueType and install it to the machine.

We currently are not able to read AutoCAD SHX files with FME.

There may be a format attribute on the AutoCAD writer though that may tell you the name of the font. You may want to review the documentation about Text Entities and check within FME if there are ones that match. From a quick look it looks like autocad_shape_name may hold this information. This could potentially help you map it when using the PDFStyler with the TrueType font installed.

- Andrea


Hi @deanhowell,

The PDFStyler uses TrueType font. So to be able to use AutoCAD SHX fonts, I think you'd need to convert it to TrueType and install it on the Windows machine. By doing that, you'd then be able to have access to those fonts You may want to look up ways you can convert a SHX to TrueType and install it to the machine.

We currently are not able to read AutoCAD SHX files with FME.

There may be a format attribute on the AutoCAD writer though that may tell you the name of the font. You may want to review the documentation about Text Entities and check within FME if there are ones that match. From a quick look it looks like autocad_shape_name may hold this information. This could potentially help you map it when using the PDFStyler with the TrueType font installed.

- Andrea

Thanks @andreaatsafe, I will look into how to convert to TrueType and hopefully we can install them on the server.

This does however get back to my unsupported font family issue, as if FME is not reading the TrueType Fonts correctly, it may not read any converted ones also.

https://knowledge.safe.com/questions/107281/unsupported-font-family.html

 

 


Thanks @andreaatsafe, I will look into how to convert to TrueType and hopefully we can install them on the server.

This does however get back to my unsupported font family issue, as if FME is not reading the TrueType Fonts correctly, it may not read any converted ones also.

https://knowledge.safe.com/questions/107281/unsupported-font-family.html

 

 

Hi @deanhowell,

Looks like you've run into another issue with the PDF writer - which as mentioned in this post is not supporting the fonts specified.

One creative way to work around this issues is to try using the TextStroker (after installing the TrueType font to your machine). By using the TextStroker you can convert the text into polygon features based on the font chosen (which can also be set to an attribute, provided the name aligns with the TrueType font).

If you are looking to further style the features after the TextStroker, you could use the PDFStyler to change the colour of the polygon features - just a note that you will want to set the Line Width to 0 to have a better output. Another thing to mention is your file size may be a lot larger after using the TextStroker.

Apologies that you've run into this issue.

- Andrea


You can find attached fmx Transformer which convert the most famous Arabic XARAB.SHX and Y-ARAB-1B.SHX fonts to UTF-8 unicode.


Reply