I am having issues on arcgis fonts . The arcgis api 4.x has a JavaScript file init.js where the fonts path is provided as https://static.arcgis.com/fonts where I am on the isolated environment with no internet access .
When I try to add labels on the feature layer it gives error that fonts not found .
I tried accessing the https://static.arcgis.com/fonts to download all the fonts to my local machine so that I can change the path in init.js file but I get error as page not found.
Please guide me where i can download all the fonts .
Solved! Go to Solution.
Currently, we do not offer the ability to download the fonts from static.arcigs.com. We are investigating the ability to package fonts for offline usage.
If you have ArcGIS Enterprise, at 10.7, there are a few fonts packaged with Enterprise in .pbf:
C:\Program Files\ArcGIS\Portal\apps\fonts
Alternatively, with ArcGIS Pro, you can create a map with label classes having the fonts you want, then create a vtpk (even if there is no data). Then unzip the vtpk and extract the fonts.
Currently, we do not offer the ability to download the fonts from static.arcigs.com. We are investigating the ability to package fonts for offline usage.
If you have ArcGIS Enterprise, at 10.7, there are a few fonts packaged with Enterprise in .pbf:
C:\Program Files\ArcGIS\Portal\apps\fonts
Alternatively, with ArcGIS Pro, you can create a map with label classes having the fonts you want, then create a vtpk (even if there is no data). Then unzip the vtpk and extract the fonts.
Thanks for help Noah.
I took the few fonts packaged with Enterprise 10.7 and hosted in my server and pointed the https://static.arcgis.com/fonts to https://myserver.com/fonts .
It worked for me. Hope this helps for people who working in offline environment.
hello friends I have a similar problem. but I can't find above location . how can I download this fonts?
thank
how did you point from https://static.arcgis.com/fonts to https://myserver.com/fonts .
import esriConfig from "@arcgis/core/config.js";
esriConfig.fontsUrl = "/fonts";
You probably figured it out already, but this is an example of how you override the fonts URL for anyone else looking for the answer. In our case, hosting it as a static file under the fonts folder. We're having challenges with that file once deployed to IIS, but that's another story.
Hi all, I am working with an offline installation of Experience Builder (v1.15), and I am trying to solve this fonts issue as well. I downloaded the .pbf fonts from my 10.8.1 Portal installation directory, hosted them in IIS on my server, and set the esriConfig.fontsUrl to point at my server.
This process works when I download my Experience and host it on the same server as my fonts. @Brice - you mentioned you were having issues once the app is deployed to IIS. Unfortunately, my dilemma is the opposite; I can access the fonts from IIS, but I am getting the following CORS error when I am developing my application from localhost:
"Access to fetch at 'https://my.host.server/fonts/arial-bold/0-255.pbf' from origin 'https://localhost.com:3001' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled."
I adding a HTTP Response Header for localhost.com:3001 to my fonts folder in IIS, but I'm still not having much luck. I also tried hosting the same font files in <ArcGIS Experience Builder Installation Directory>/server/public/apps/fonts, and setting the esriConfig.fontsUrl dynamically with:
if (process.env.NODE_ENV === 'development') {
esriConfig.fontsUrl = 'https://localhost.com:3001/apps/fonts'
} else {
esriConfig.fontsUrl = 'https://my.host.server/fonts';
}
I am able to access the font files by entering 'https://localhost.com:3001/apps/fonts/arial-bold/0-255.pbf' into the browser, but when I try to load a Web Map with labels with Arial-Bold fonts, I get the following error: "[esri.views.2d.engine.webgl.TextureManager] e {name: 'mapview-invalid-resource', details: undefined, message: 'Couldn't find font arial-bold. Falling back to Arial Unicode MS Regular'"
@Brice & @KafilBaig - How are you able to access the hosted static fonts from localhost? Did you use a CORS header, a local copy, or something else? Any pointers would be greatly appreciated.