Custom fonts missing when exporting code

Hi all,

since my clients don’t want to host with Webflow due to GDRP / Privacy Shield, I need to export the code for one of my sites. I also can’t use google fonts due to the same reason. So I downloaded the fonts I need from Google Fonts and uploaded them as custom fonts.

However, when I export the code now, the fonts are missing and will not be exported. Is there any way I can upload my custom fonts so that the code export will work?

Hey,

instead of uploading the Google fonts, try adding them through Project settings → Fonts → Select the Google font. Then export your code and see if it works :slight_smile:

@robingranqvist thanks for the answer but I purposely didn’t do that as using Google Fonts via CDN isn’t GDPR compliant for EU clients.

Additionally, I have one Font that is not available from Google fonts.

Oh, okay that’s true.

Hmm, the only solution I can come up with is to manually add all the fonts to your downloaded CSS-code. Try adding the following to the CSS-file with your site’s custom styles for every font and font weight used:

@font-face {
  font-family: yourFontRegular;
  src: url(yourfont.tff);
  font-weight: regular;
}

Make sure to add the correct name of the font so it matches the name used for “font-family” in the rest of your classes.

@robingranqvist I just checked the css files, the fonts are already correctly included in the css file but Webflow is not exporting the the actual font files, so I guess I need to manually add the font files to my exported folder

Running into the same issue. No idea why.

I just thought I ran into the same issue, I updated and exported a project and uploaded it to a server. When trying to load the site it did show the changes made in the HTML but did not load the custom fonts. At first I thought this was because the fonts were not included but I checked and there was a folder fonts. Turns out the problem was the way the browser (in my case Chrome) did caching: It did reload the HTML but not the CSS. Deleting the cache fixed it for me.

Hi guys!

I had the same issue and it was caused by the name of a webfont file in my case.
The .woff files – Regular and Bold has the same name (font.woff) and Webflow was exporting only one file because of the name duplicity.

I renamed the files of the webfont (fontbold.woff, fontregular.woff) and now it’s working fine.

Hope it will help!

I ran into something similar, but with a slight twist.
There was an issue with the file path during export. Checked the main CSS and noticed the font was linked to the wrong folder. Once I fixed the path, everything was back on track.

webflow-export-bug