# Font rendering locally & on mobile but not on Desktop

**URL:** https://discourse.gohugo.io/t/font-rendering-locally-on-mobile-but-not-on-desktop/44089
**Category:** support
**Created:** [April 26, 2023, 11:36am UTC](https://discourse.gohugo.io/t/font-rendering-locally-on-mobile-but-not-on-desktop/44089 "2023-04-26T11:36:48Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![treasurepressure](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@treasurepressure](https://discourse.gohugo.io/u/treasurepressure)
#### Post date: [April 26, 2023, 11:36am UTC](https://discourse.gohugo.io/t/font-rendering-locally-on-mobile-but-not-on-desktop/44089/1 "2023-04-26T11:36:48Z")

</div>

Hi. The font used for my themeis working well locally and on mobile too but not on desktop. Can I DM my site to someone who can help me on this?

---

<div class="post-metadata">

### Author: ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)
#### Post date: [April 26, 2023, 5:01pm UTC](https://discourse.gohugo.io/t/font-rendering-locally-on-mobile-but-not-on-desktop/44089/2 "2023-04-26T17:01:27Z")

</div>

> [@treasurepressure](#):
>
> working well locally and on mobile too but not on desktop

I don’t know what this means. To me, “locally” means “desktop”, yet you list “desktop” separately.

---

<div class="post-metadata">

### Author: ![treasurepressure](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@treasurepressure](https://discourse.gohugo.io/u/treasurepressure)
#### Post date: [May 16, 2023, 1:48pm UTC](https://discourse.gohugo.io/t/font-rendering-locally-on-mobile-but-not-on-desktop/44089/3 "2023-05-16T13:48:43Z")

</div>

Sorry for the confusion. By locally I mean on my local system/localhost

By desktop, I mean after I pushed my site online and when I open the website on my PC

---

<div class="post-metadata">

### Author: ![Sid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/sid/32/15234_2.png) [@Sid](https://discourse.gohugo.io/u/Sid)
#### Post date: [May 16, 2023, 2:30pm UTC](https://discourse.gohugo.io/t/font-rendering-locally-on-mobile-but-not-on-desktop/44089/4 "2023-05-16T14:30:02Z")

</div>

> [@treasurepressure](#):
>
> Can I DM my site to someone who can help me on this?

From [How to Request Help](https://discourse.gohugo.io/t/requesting-help/9132):

> If you can’t share your repository for whatever reason, consider creating a dummy repo that you _can_ share, which reproduces the problem you’re experiencing.

But DM also may work, if you have identified someone.

---

<div class="post-metadata">

### Author: ![chrillek](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/chrillek/32/19797_2.png) [@chrillek](https://discourse.gohugo.io/u/chrillek)
#### Post date: [May 16, 2023, 3:16pm UTC](https://discourse.gohugo.io/t/font-rendering-locally-on-mobile-but-not-on-desktop/44089/5 "2023-05-16T15:16:58Z")

</div>

Check the messages of your favorite browser’s developer tools to see which fonts it tries to load.

---

<div class="post-metadata">

### Author: ![treasurepressure](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@treasurepressure](https://discourse.gohugo.io/u/treasurepressure)
#### Post date: [May 16, 2023, 3:28pm UTC](https://discourse.gohugo.io/t/font-rendering-locally-on-mobile-but-not-on-desktop/44089/6 "2023-05-16T15:28:15Z")

</div>

Says ‘SF Mono’ but it is falling back & loading the common Serif font. Like I said it loads the SF Mono font on localhost but when I uploaded the site to Github and subsequently Netlify, the font won’t load.

---

<div class="post-metadata">

### Author: ![chrillek](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/chrillek/32/19797_2.png) [@chrillek](https://discourse.gohugo.io/u/chrillek)
#### Post date: [May 16, 2023, 3:45pm UTC](https://discourse.gohugo.io/t/font-rendering-locally-on-mobile-but-not-on-desktop/44089/7 "2023-05-16T15:45:44Z")

</div>

Please be _specific_. No console that I know simply “says ‘SF Mono’”. Your browser uses an _URL_ to load the font, and if it can’t access that URL, it falls back to something else. In Firefox, you’ll see something like this

 ![Bildschirmfoto 2023-05-16 um 17.44.24](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/3X/1/5/1562cccfc10f3a53dfb1a77a5f501ba8a58a5b23.png)  
And there you can clearly see the _source_ it tries to access (unsuccessfully).

---

<div class="post-metadata">

### Author: ![treasurepressure](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@treasurepressure](https://discourse.gohugo.io/u/treasurepressure)
#### Post date: [May 16, 2023, 3:52pm UTC](https://discourse.gohugo.io/t/font-rendering-locally-on-mobile-but-not-on-desktop/44089/8 "2023-05-16T15:52:55Z")

</div>

Sorry, I was looking at the wrong place.

This is the error I’m getting

> Access to font at ‘[https://www.mysitename.com//fonts/SF-Pro-Display-Bold.otf](https://www.mysitename.com//fonts/SF-Pro-Display-Bold.otf)’ from origin ‘[https://mysitename.com](https://mysitename.com)’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Failed to load resource: net::ERR\_FAILED

---

<div class="post-metadata">

### Author: ![chrillek](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/chrillek/32/19797_2.png) [@chrillek](https://discourse.gohugo.io/u/chrillek)
#### Post date: [May 16, 2023, 4:26pm UTC](https://discourse.gohugo.io/t/font-rendering-locally-on-mobile-but-not-on-desktop/44089/9 "2023-05-16T16:26:16Z")

</div>

There you go. You should fix the CORS policy.

---

<div class="post-metadata">

### Author: ![treasurepressure](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@treasurepressure](https://discourse.gohugo.io/u/treasurepressure)
#### Post date: [May 16, 2023, 5:47pm UTC](https://discourse.gohugo.io/t/font-rendering-locally-on-mobile-but-not-on-desktop/44089/10 "2023-05-16T17:47:33Z")

</div>

I tried adding a \_headers file next to index.html with

```auto
/*
  Access-Control-Allow-Origin: *

```

But its not working

---

<div class="post-metadata">

### Author: ![chrillek](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/chrillek/32/19797_2.png) [@chrillek](https://discourse.gohugo.io/u/chrillek)
#### Post date: [May 16, 2023, 8:45pm UTC](https://discourse.gohugo.io/t/font-rendering-locally-on-mobile-but-not-on-desktop/44089/11 "2023-05-16T20:45:47Z")

</div>

You should read about CORS and all that and then decide what to do. Nothing off that is related to Hugo, it’s a matter of setting up your webserver etc.
