Closed davidtheclark closed 6 years ago
@tristen this is ready for another look. As discussed, I removed all the fonts from the repo. We'll deploy fonts as necessary with internal tooling.
We talked about allowing configuration of the font URL through a custom property. However, I learned that var(--xxx)
is not evaluated within url()
functions (because it might actually be a URL). So I think we can put that off for now. Since custom properties are becoming a thing that liberated people actually use sometimes, we might consider switching our system to https://github.com/postcss/postcss-simple-vars in order to avoid these kinds of headaches, doing the things we want to do without clashing with partially supported standards — since we'll need to be dealing with browsers that don't support custom properties for quite a while, probably.
Font files do not need to be distributed with every version of Assembly. They should almost never change. So this PR tries to set up a new way of deploying and referencing fonts:
api.mapbox.com/mapbox-assembly/fonts
..v1.
inserted into their filename so that they can be cached forever, and if they ever do need to change (which we have needed to do) we don't have to worry about that cache.After this change, the scripts
copy-fonts
andcopy-site-assets
are no longer needed.@tristen this shouldn't work yet, because I need to deploy the fonts; but I was hoping for a quick glance from you first to make sure you agree with the approach. What do you think?