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

Available fonts / symbols

I'm wondering if there is a list out there somewhere of which fonts and or symbol sets can be read by the API. I'm trying to use sets of non-english characters to use and couldn't seem to find anything saying what is and is not allowed in an API script.  If anyone is curious I'm playing with Stephen S.' What did he say script and looking to support the various languages for D&D 5e.
To be honest, the difficulty lies not with what the API allows for scripts like that, rather what the client side seems to have. That isn't to say there won't be complications for things, but if the script you're asking about is the one I am thinking about, I see all the characters for each substitution fine, on a Mac. Anyone who is using a Windows computer as their client, can't seem to see anything but blank boxes.
1437601472
The Aaron
Pro
API Scripter
I've got a script I wrote that does something similar. I experimented with it on Mac and windows and found the support to be a mixed bag when it came to using anything special. On a webpage, we could specify web fonts to include, or put the font glyph data directly into the CSS. From the API, we're much more limited. I was able to get things working fairly well by having users install a particular font manually on their windows box, but that's not the kind of thing you can expect your average user to do. 
No I'm using a windows machine and everything that is already in the script is fine, I'm looking for some additional character sets to add to what is already there.  If I'm following it correctly its not the local machine processing the characters so it wouldn't matter what the local machine is, what we're seeing on the screen is being rendered by the roll20 server so its up to it what can and cannot display. . .thanks though!
1437602951

Edited 1437602988
I don't think it's up to the roll20 server -- unless that changed this past update. When using the script you're referring to, the fonts render properly for me because I have all the fonts it is looking for locally on my own iMac. However, any computer that doesn't have some of the fonts, all of which are Windows based computers, do not render anything -- they receive blank boxes. They may render properly to you, which means you likely have the fonts already on your system. What Aaron is referring to, is a script of his own, not the one you are referring to. In either case, as he pointed out in his last sentence, the look of a given font is dependent upon whether someone has that font on their own computer (client side). If it isn't, then they will see a box outline for what should be there, but nothing special beyond that.
1437603755

Edited 1437603880
The Aaron
Pro
API Scripter
Oh, I see what you mean. &nbsp;You're talking about the Text Drawing Tool that is used for creating text on the canvas, the layers of the VTT. &nbsp;A&nbsp; Text object&nbsp; in the API. There are 5 named fonts you can use: Arial Appears to be built into Fabric.js Patrick Hand (vietnamese)&nbsp; <a href="https://fonts.gstatic.com/s/patrickhand/v10/9BG3JJ" rel="nofollow">https://fonts.gstatic.com/s/patrickhand/v10/9BG3JJ</a>... (latin-ext)&nbsp; <a href="https://fonts.gstatic.com/s/patrickhand/v10/9BG3JJ" rel="nofollow">https://fonts.gstatic.com/s/patrickhand/v10/9BG3JJ</a>... (latin)&nbsp; <a href="https://fonts.gstatic.com/s/patrickhand/v10/9BG3JJ" rel="nofollow">https://fonts.gstatic.com/s/patrickhand/v10/9BG3JJ</a>... Contrail One (latin)&nbsp; <a href="https://fonts.gstatic.com/s/contrailone/v6/b41Kxjg" rel="nofollow">https://fonts.gstatic.com/s/contrailone/v6/b41Kxjg</a>... Shadows Into Light (latin)&nbsp; <a href="https://fonts.gstatic.com/s/shadowsintolight/v6/cl" rel="nofollow">https://fonts.gstatic.com/s/shadowsintolight/v6/cl</a>... Candal (latin)&nbsp; <a href="https://fonts.gstatic.com/s/candal/v6/JXxkv7uBckwL" rel="nofollow">https://fonts.gstatic.com/s/candal/v6/JXxkv7uBckwL</a>... There is also a 6th unnamed font you can get by setting an invalid font. &nbsp;It appears to be something in the courier line. These are in WOFF2 format. &nbsp;You can convert them to TTFs, or try to find previews of them online. &nbsp;Hope that helps
SeanOG, LOL, yeah had a conversation with a web design buddy of mine and I was way off (probably why I don't make a living doing programming) so I guess its just a fluke that all the computers I use have the font's. The Aaron, no I'm not really explaining it correctly I guess. In the script I've added lines for a draconic, character set. If your not familiar with it the script seems to do a 1 to 1 swap of characters based on lists of character in the script. If I type "A" in the chat the script replaces it with the symbol that is in the "A" slot (so to speak) for the specified language. Now I want to use a specific set of characters, in this case the standard Symbol font found in MS Word. But when I copy those symbols into the API editor they turn into boxes. I assumed this was because the API can only work with certain character sets.&nbsp; So what I got from my friend was that even though the API editor displayed boxes, the font information is not necessarily lost and may still display correctly in the chat window. I'm about to try that and I'll let y'all know.
Nope! just boxes show up in chat. I'll keep playing with it and let y'all know if I figure out what I'm looking for.
1437627639

Edited 1437627649
The Aaron
Pro
API Scripter
Ok. &nbsp;Yeah, that is what I was originally talking about. &nbsp; You have to have the fonts in one of 2 places when you view those glyphs on a webpage: 1) Installed in the system, (c:\windows\fonts, /Users/USER/Library/Fonts/, etc) 2) Provided by the website (via CSS or Webfonts). In the case of chat messages produced by the API, you are restricted to only affecting 1). &nbsp;There are webfonts being sent for use in displaying Roll20, but the API has no control over them (and they are mostly special dice fonts). &nbsp;If you have viewed those glyphs on another website, likely they are providing your browser with a webfont that allows it to display them.
Okay, so my take-always here are that having the font on my local machine does not guarantee the characters can be displayed on roll20 (in chat or API) and that there is no way to change that which is fine. I wasn't looking to reinvent the wheel with new fonts, I was just wondering if there was a list or a way to see what fonts could be used within the system. Obviously the original script has several non-english character sets so there must be a way to find those. I think at this point I'm going to just message the OP and see if he can shed some light on it. Thanks for the education though!!!
Okay, so for those of you who may find yourself with a similar issue. Basically any font that prints English characters (i.e. Arial, Calibri, Angsana New, etc...) has some associated Symbols (insert &gt; symbols in MS Word) I found no symbols that came from English fonts that the API wouldn't translate.&nbsp;
1437772518
The Aaron
Pro
API Scripter
BTW, you might find this discussion useful: &nbsp; <a href="https://app.roll20.net/forum/post/1905190/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/1905190/slug%7D</a>