Select to view content in your preferred language

fontsUrl configuration

657
3
Jump to solution
06-11-2024 05:48 AM
MatejKutik
Occasional Contributor

Hello,

I encountered an issue when rendering FeatureLayer symbology. I found out that the reason is an invalid font URL. I could fix that by developing custom widget that would change esriConfig.fontsUrl.

Is there a way how to change fontsUrl without developing custom widget?

 

Thanks, Matěj

0 Kudos
1 Solution

Accepted Solutions
JeffreyThompson2
MVP Frequent Contributor
0 Kudos
3 Replies
JeffreyThompson2
MVP Frequent Contributor

Chances are the error you are seeing is because the font you are using is not one of the fonts hosted by ESRI. The best solution would probably be switching your symbology to one of the supported fonts. https://developers.arcgis.com/javascript/latest/labeling/#non-mapimagelayer-fonts

GIS Developer
City of Arlington, Texas
0 Kudos
MatejKutik
Occasional Contributor

Thanks for answer Jeffrey.

 

That is not the true reason, though. The true reason is that my environment is disconnected from internet. Therefore I`m not able to reach https://static.arcgis.com/.

I`m pretty sure that all I need to do is set the fontsUrl.

0 Kudos
JeffreyThompson2
MVP Frequent Contributor

https://developers.arcgis.com/javascript/latest/labeling/#custom-fonts-and-disconnected-environments

In that case, you will need a custom widget.

GIS Developer
City of Arlington, Texas
0 Kudos