# External fonts in folder

**URL:** https://discourse.roots.io/t/external-fonts-in-folder/9533
**Category:** sage
**Tags:** sage9
**Created:** 2017-05-05T09:33:48Z
**Posts:** 7

## Post 1 by @joneslloyd — 2017-05-05T09:33:48Z

Hi there,

(I actually had this issue last year, and never figured it out, so have been copy/pasting from `/assets/` to `/dist/` since then!).

I’m using some [Typography.com](http://Typography.com) fonts, and the way they work (frustratingly) is to provide you with a JS snippet for you site’s head region (pretty standard), but also a folder, named with a random number (in my case `569789`), containing production CSS for the fonts, like so:

 ![](https://discourse.roots.io/uploads/default/original/2X/1/1facc4a4820756f5396f41751b4b5675fe67ba01.png)  
[Typography.com](http://Typography.com) then asks you to let them know the location of this folder on your server (so `http://mysite.com/wp-content/themes/mytheme/dist/fonts/569789/`), and everything works.

Easy, _right_? :expressionless:

What I’m trying to figure out how to do is:  
Can I place my `569789` folder in `/mytheme/assets/fonts/` (so, `/mytheme/assets/fonts/569789/`), and have this folder, and its contents, somehow pulled into `/mytheme/dist/fonts/` upon running `npm run build:production` ?

Thanks!  
Lloyd

---

## Post 2 by @strarsis — 2017-05-05T13:52:04Z

In dist/assets.json versions are appended to the paths after running `gulp`,  
maybe you could use this place for controlling what version numbers are used.

---

## Post 3 by @joneslloyd — 2017-05-05T14:03:40Z

Thanks for the response!

Apologies if I’ve missed something, but I’m using webpack, not gulp.

My issue isn’t versioning; I just want a folder and its contents to copy from its location in `assets` to its relative location in `dist`.

---

## Post 4 by @strarsis — 2017-05-05T14:25:24Z

When copying the font files, why not also subset the characters or simply minify the fonts?  
What sage release are you using?

---

## Post 5 by @joneslloyd — 2017-05-05T15:46:33Z

I’m not able to, as [Typography.com](http://Typography.com)’s servers need to read them (I think for some licensing nonsense), so my use case is quite specific in needing to copy from `assets` to `dist`.

I’m using the Sage 9 beta, before Yarn was added (so, webpack).

---

## Post 6 by @strarsis — 2017-05-05T15:55:31Z

Why not use a [webpack plugin for copying](https://github.com/kevlened/copy-webpack-plugin)?

---

## Post 7 by @joneslloyd — 2017-05-07T15:24:36Z

Ah-ha! That solves it perfectly.

I added this to the `release` part of my webpack file:

```
webpackConfig.plugins.push( new CopyWebpackPlugin( [ {
		from: 'fonts/569789',
		to: 'fonts/569789'
	} ] ) );
```

Cheers!
