Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Font not working

Hi ! I'm working on a Character Sheet and I wanted to import a new font, but it won't work. Is it because what I want to change is the text inside a textbox ? Here's the HTML in concern : &lt;div class='stats_sections'&gt; &lt;input type="text" class="thingstofill"/&gt; &lt;/div&gt; And here's the CSS : @font-face { font-family: 'Coda Caption'; src: url(<a href="https://fonts.googleapis.com/css2?family=Coda+Caption:wght@800&amp;display=swap" rel="nofollow">https://fonts.googleapis.com/css2?family=Coda+Caption:wght@800&amp;display=swap</a>); } .sheet-thingstofill { background-color:transparent; margin-top: 120px; margin-left: 90px; width: 30%; font-size: 20rem; font-family: 'Coda Caption'; color: yellow; border-color: transparent; }
1611491145
Richard T.
Pro
Marketplace Creator
Sheet Author
Compendium Curator
Roll20 is a bit strange with font-imports. You can find more info here:&nbsp; <a href="https://wiki.roll20.net/Building_Character_Sheets#Google_Fonts" rel="nofollow">https://wiki.roll20.net/Building_Character_Sheets#Google_Fonts</a> But you'll need to use @import instead of @font-face and you can't use the raw Google Font import rule.&nbsp;
1611524154

Edited 1611524182
Just did the exact same way the wiki says it and it doesn't work : HTML : &lt;input type="text" name="attr_fight" class="fight" placeholder="00" /&gt; CSS : @import url('<a href="https://fonts.googleapis.com/css?family=Source+Sans+Pro|Nunito|Source+Code+Pro|Coda+Caption&amp;display=swap" rel="nofollow">https://fonts.googleapis.com/css?family=Source+Sans+Pro|Nunito|Source+Code+Pro|Coda+Caption&amp;display=swap</a>'); .sheet-fight { background-color:transparent; margin-top: 140px; margin-left: 55px; width: 30%; font-size: 20rem; font-family: 'Coda Caption'; color: yellow; border-color: transparent; text-align: center; }
1611526556
Kavini
Pro
Marketplace Creator
Sheet Author
Compendium Curator
Generally you should define font weights, I would also try to use %20 rather than + in your URI, too. @import url('<a href="https://fonts.googleapis.com/css?family=Source%20Sans%20Pro:800|Nunito:800|Source%20Code%20Pro:800|Coda%20Caption:800&amp;display=swap" rel="nofollow">https://fonts.googleapis.com/css?family=Source%20Sans%20Pro:800|Nunito:800|Source%20Code%20Pro:800|Coda%20Caption:800&amp;display=swap</a>'); I hope this helps!