mapbox/mapbox-studio — pull request #1001 by samanpwbb (2014-11-08 01:17:46+00:00)
Title: [not ready] UI for user fonts

Display fonts that are in the directory user specified:
![screen shot 2014-11-07 at 6 29 11 pm](https://cloud.githubusercontent.com/assets/108094/4962589/2e643800-66e3-11e4-8327-7ced3d3e5cd3.png)

Empty state:
![screen shot 2014-11-07 at 8 09 36 pm](https://cloud.githubusercontent.com/assets/108094/4962608/f51de676-66e3-11e4-8d9b-3720b803e853.png)

#### Todo:
- [ ] Add user fonts to a fixture and test

#### Question:
How should we handle updating this list? Right now, here's what happens:
- In code, list is updated whenever map is saved: https://github.com/mapbox/mapbox-studio/compare/userfontui?expand=1#diff-9d7bf77fe41e8ddb12a4c326f2f94bd0R780
- Style provides updates to list only when:
1. `font-directory` changes
2. user loads a new style
3. Mapbox studio is killed and started again

So, that template insertion code rarely ever does anything useful, but it runs frequently. I see three legitimate options:
1. Check for changes in font list and only do the replace if font list changes.
2. Remove this refresh and update the font list only on restart.
3. Also update the font list when user makes a change to the fonts in the font directory.

The perfectionist designer in me wants to do 3 but the simplest solution is probably 2.