Question

DGN to SVG - Overwrite shx reference with existing windows ttf

  • 14 February 2022
  • 4 replies
  • 5 views

Badge +6

I am currently converting DGN to SV G so that they can be used in ESRI ArcGISPro based Runtime Content. The DGN s that I am converting can be successfully viewed in a web browser, however once they are imported to ArcGISPro the text is not recognized. I was able to determine that ArcPro must have a ttf reference. I am not concerned with retaining the the current shx "font". I just want to overwrite that attribute with a font that is stock to the the Windows Library. I am an FME beginner and cant even expose the shx reference in the writer. Any assistance would be great.


4 replies

Userlevel 2
Badge +17

Hi @jrlalessi​,

To set a specific font on the SVG text, please use an AttributeCreator to create the attribute svg_style on your text features, with the contents:

font-family:Courier;

Replace 'Courier' with the font you would prefer to use.

 

The svg_style attribute gives you full control over how your SVG features are displayed within the browsers. For more information on the style options, please see https://www.w3.org/TR/SVG11/styling.html#StyleAttribute

Badge +6

I was able to parse the text out using the GeometryFilter followed by the AttributeCreator and set the new font type, but ArcGISPro is still not "seeing" the text as existing in the svg elements on import.

How can I set that text attribute to be referenced to a stock windows ttf as specified by ArcGISPro? From what Im reading if the text is a true ttf it will be read on import as an svg element. I have always been able to view the text in the browser, but not in ArcGISPro.

 

What the browser sees:

image.pngWhat ArcGISPro sees:

image 

Please note the text is not being seen as an existing element in the svg at all in ArcGISPro.

Userlevel 2
Badge +17

Hi @jrlalessi​,

Please set the style to: font-family:Arial;

This font is included with Windows, so it should be available on every computer.

Badge +6

Hi, the screen shots I included are in Arial. I thought to change the type face. There is still a reference issue with the way the svg is passed to ArcGISPro. That is what I need to resolve.

image 

I also looked at adding the TextStroker but that is not giving me the desired output I wanted. I think another route, although not ideal is to just filter the text and change it over to a graphic, but Im having trouble figuring out what transformer that might be.

Reply