naturalcrit / homebrewery

Create authentic looking D&D homebrews using only markdown
https://homebrewery.naturalcrit.com
MIT License
1.04k stars 317 forks source link

Loading the racial fonts? #193

Closed alexctanner closed 7 years ago

alexctanner commented 7 years ago

Hi, I was just wondering if it would be possible to load the racial fonts into the Homebrewery? They're listed in this thread:

https://www.reddit.com/r/DnD/comments/2jwsx2/dnd_and_other_script_font_collection/

I was wanting to put something in draconic in one of my brews, and thought it would be really cool to be able to put it in there. I installed it myself and copied it into the homebrewery, but it switched it back to the normal font.

Thanks!

stolksdorf commented 7 years ago

Yup, you can do this. First the font has to be hosted somewhere (Dropbox might work as well), then you load them in using CSS and use style tags.

<style>
@font-face {
  font-family: 'Draconic';
  src: url('path-to-font.woff') format('woff');
}
.draconic{
  font-family : 'Draconic';
}
</style>

<div class='draconic'>I am in Draconic now</div>
alexctanner commented 7 years ago

This is awesome, I really appreciate it!

If you don't mind, I've been working on this for a long time and I can't seem to get it to show up. Here's what I've got:

I am in Draconic now

I can't get a direct file link from Google Drive or Dropbox This is still showing the text normally, so I'm not sure what to do from here. I tried changing the font to a .woff type and leaving the format as 'woff,' but it was still the same. Would you have any ideas of how to fix it? If you don't have time that's fine, I'll keep working on it.

On Tue, Sep 13, 2016 at 10:29 AM, Scott Tolksdorf notifications@github.com wrote:

Closed #193 https://github.com/stolksdorf/homebrewery/issues/193.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stolksdorf/homebrewery/issues/193#event-787633992, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ3wq9GWUOKTpIfKdmgk0IhurGBj6Kkwks5qprNJgaJpZM4J7uxo .

stolksdorf commented 7 years ago

Easy fixes.

Firstly, capitalization matters. <div class='Draconic'>I am in Draconic now</div> should be <div class='draconic'>I am in Draconic now</div>

Secondly, the megaupload link doesn't actually link to the font, it goes to a webpage where you can download it. I suggest using dropbox. In your Dropbox there should be a public folder, put the font in there, wait for it to sync and then right click and hit 'Copy public link'. Use that link in your brew.

Check it.

image

alexctanner commented 7 years ago

Wow awesome! Unfortunately, dropbox accounts created after 2012 don't have a Public folder unless you pay for it. I'll have to find somewhere to host it, but I momentarily copied your link there and it worked. I really appreciate your help!

On Tue, Sep 13, 2016 at 12:48 PM, Scott Tolksdorf notifications@github.com wrote:

Easy fixes.

Firstly, capitalization matters.

I am in Draconic now
should be
I am in Draconic now

Secondly, the megaupload link doesn't actually link to the font, it goes to a webpage where you can download it. I suggest using dropbox. In your Dropbox there should be a public folder, put the font in there, wait for it to sync and then right click and hit 'Copy public link'. Use that link in your brew.

Check it.

[image: image] https://cloud.githubusercontent.com/assets/387742/18482980/4fe13da2-79b0-11e6-8453-7368230306dc.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stolksdorf/homebrewery/issues/193#issuecomment-246746471, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ3wq4UkkeruhZTQ0aBR3ahmecLDb4j_ks5qptPLgaJpZM4J7uxo .