# Loading custom fonts/assets in Gradio

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Floading-custom-fonts-assets-in-gradio%2F62375%3E%5C
**Category:** 🔒 Gradio\
**Created:** [November 15, 2023, 3:02pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Floading-custom-fonts-assets-in-gradio%2F62375 "2023-11-15T15:02:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![husmani](https://avatars.discourse-cdn.com/v4/letter/h/e79b87/32.png) [@husmani](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fhusmani)%5C
**Post date:** [November 15, 2023, 3:02pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Floading-custom-fonts-assets-in-gradio%2F62375%2F1 "2023-11-15T15:02:29Z")

</div>

Hi, I’d like to add custom assets/fonts to gradio. These font files are placed on my server, how can I allow gradio to load these files/fonts?

example css line: @font-face { font-family: “MYFont”; src: url(“Fonts/MY\_TheSans\_Web/MyTheSans-Light.eot”);

---

<div class="post-metadata">

**Author:** ![freddyaboulton](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/freddyaboulton/32/32732_2.png) [@freddyaboulton](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ffreddyaboulton)%5C
**Post date:** [November 15, 2023, 3:26pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Floading-custom-fonts-assets-in-gradio%2F62375%2F2 "2023-11-15T15:26:16Z")

</div>

Hi @husmani !

I believe we allow loading Google Fonts via the Theme class but I’m not sure about local files. @abidlabs @pngwn @aliabid94 do you know?

---

<div class="post-metadata">

**Author:** ![abidlabs](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/abidlabs/32/21878_2.png) [@abidlabs](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fabidlabs)%5C
**Post date:** [November 15, 2023, 3:44pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Floading-custom-fonts-assets-in-gradio%2F62375%2F3 "2023-11-15T15:44:25Z")

</div>

If you are using custom CSS, you should be able to reference the font file via a URL like this:

```css
@font-face { font-family: “MYFont”; src: url(“/file=Fonts/MY_TheSans_Web/MyTheSans-Light.eot”);

```

Notice the “/file=” at the beginning of the URL. Starting with Gradio 4.0, you’ll also need to specify that Gradio should allow access to files in your working directory. You can do so with by setting the `allowed_paths` parameter in `launch()` to be `["Fonts/MY_TheSans_Web/MyTheSans-Light.eot"]`
