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 accents show only on roll template

1692702851
nesuprachy
Sheet Author
API Scripter
I'm developing a character sheet for a game in Czech, however there is an issue with font diacritics. I'm using "IM Fell English" and "IM Fell English SC" from Google Fonts, which should both apparently support accents. I can't figure out why the accents only show properly on the roll template and not on the player sheet. I made sure to use UTF-8 encoding. Here are my HTML and CSS files in case you want to try. Roll template shows properly: Player sheet does not: Any idea what could be causing this? Many thanks in advance
1692713763
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
There are a few issues: You are using multiple import statements. While multIple import statements work in character sheets that are not using legacy sanitization, only the first import statement is used in roll templates (the others are just deleted). So what's happening here is your character sheet is using im fell English sc, but that font doesn't exist in the roll template css, and so defaults to your system font (probably arial?). Im fell sc does not have characters in it for the accented letters , while your system default does. And then, not related to your issue, but using @font-face to import custom fonts is a risk. Roll20 views that as a security risk, and will eventually close the loop hole.
1692717035

Edited 1692718604
nesuprachy
Sheet Author
API Scripter
Scott C. said: There are a few issues: You are using multiple import statements. While multIple import statements work in character sheets that are not using legacy sanitization, only the first import statement is used in roll templates (the others are just deleted). So what's happening here is your character sheet is using im fell English sc, but that font doesn't exist in the roll template css, and so defaults to your system font (probably arial?). Im fell sc does not have characters in it for the accented letters , while your system default does. And then, not related to your issue, but using @font-face to import custom fonts is a risk. Roll20 views that as a security risk, and will eventually close the loop hole. Thanks, I must have missed the part on the wiki. I will also see about removing the @font-face. Anyways, I replaced the three statements with a single one importing all three fonts. @import url('<a href="https://fonts.googleapis.com/css2?family=IM+Fell+English+SC&amp;family=IM+Fell+English:ital@0;1&amp;display=swap" rel="nofollow">https://fonts.googleapis.com/css2?family=IM+Fell+English+SC&amp;family=IM+Fell+English:ital@0;1&amp;display=swap</a>'); What's interesting to me is that now the roll template CSS only renders the "IM Fell English SC" and not the other two. Does importing multiple fonts in one statement not work? ...what's also interesting to me is that albeit with slightly different results, uh, somehow the "IM Fell English SC" in the roll template does support accents? " Povolání" and "12" fallback to a default serif font. Compare it to the player sheet :
1692725241
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Importing multiple fonts does work, but you have to edit the Google provided import line a little. See the wiki for more details . Note that font imports should pretty much always use the legacy version so that they work in roll templates and the sheet itself. As for why&nbsp; Povolání and 12 fallback, I would guess that those are trying to use the IM Fell English Italic font, which probably failed to import on the character sheet, and therefore they are falling back to the system default.
1692733739
nesuprachy
Sheet Author
API Scripter
Scott C. said: Importing multiple fonts does work, but you have to edit the Google provided import line a little. See the wiki for more details . Note that font imports should pretty much always use the legacy version so that they work in roll templates and the sheet itself. As for why&nbsp; Povolání and 12 fallback, I would guess that those are trying to use the IM Fell English Italic font, which probably failed to import on the character sheet, and therefore they are falling back to the system default. I edited the @import statement according to the wiki and it works. Many thanks! Buuut... It's really sad that @font-face is going to be disabled in the future. After some testing I learned it would essentially solve my problem, because a downloaded font file (for reasons unkown to me) supports diacritics but a web-based doesn't, and importing it via @font-face makes it work on other devices also.
1692735520

Edited 1692735538
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You should be fine to use font face, it's the importing from other sources than Google fonts or another source that is guaranteed to be malware free that's the risk.
Thanks for this!