magicbookproject / magicbook

The magic book project returns!
MIT License
1.07k stars 59 forks source link

Fonts #2

Closed shiffman closed 8 years ago

shiffman commented 8 years ago

What's the best way to approach custom fonts? For example, I have a CSS file like so:

 @font-face {font-family: 'ProximaNovaS-Thin';src: url('../fonts/23AC3F_3_0.eot');src: url('../fonts/23AC3F_3_0.eot?#iefix') format('embedded-opentype'),url('../fonts/23AC3F_3_0.woff') format('woff'),url('../fonts/23AC3F_3_0.ttf') format('truetype');}

Then I have the font files themselves in:

noc_pdf/fonts/

Should we add something similar to how images work to move those files into assets?

"fonts" : {
  "source" : "/noc_pdf/fonts/"
}
runemadsen commented 8 years ago

Yes, let's do this! I'll jump on this today or tomorrow. Should be easy.

runemadsen commented 8 years ago

This has been fixed with the 0.0.22 release! https://github.com/magicbookproject/magicbook#fonts

shiffman commented 8 years ago

Can confirm this is working great!

https://github.com/shiffman/The-Nature-of-Code/commit/34f1343cb947864bd16d38acf7d0054c332c1f4d https://github.com/shiffman/The-Nature-of-Code/commit/5042596e63793ba3a8ab45ae1cb82334b55bfc3f

runemadsen commented 8 years ago

Great!