cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
maguire
Community Champion

What version of Unicode is supported in Canvas?

With Unicode 13.0.0 https://unicode.org/versions/Unicode13.0.0/ having come out in March 2020, I was surprised that when trying to include the creative commons license symbols (such as U+1F16D, i.e. 🅭) that they did not render.

I know that Canvas is using "Lato Extended" as the default font family and the Canvas source code has this at fonts/lato/extended/Lato-Regular.woff2 - but this seems to be a 2015 version of the font. Any thoughts as to a later version that would include more symbols, such as the Creative Commons license symbols, rather than having to put them in a page via SVG/PNG/...? Or is the expectation that one would use the png files from public/images/cc/*. Or should there be a 4th entry in the list of images: Upload Images, Course Images, User Images, and Canvas images? Where Canvas images could be a collection of the icons used by Canvas and things such as the CC license icons.

Labels (1)
0 Kudos
2 Replies
DannyWahl
Community Member

Hi, @maguire 

The default behavior of browsers is to fall-back when unsupported characters are presented (such is the case with most emoji).  This means that it's not "just" Canvas (Lato) that doesn't have a glyph for the Unicode 13 characters, it means none of the fonts in the tree (Lato Extended, Lato, Helvetica, Arial, or your system's default Sans Serif font) include the character.

This is not unusual as it can take years for glyphs to make it from the unicode 'spec' to an actual font family.  To that point it's a common practice in web development to use a custom font and "shim" the characters that you want to use in (see: Font Awesome).

maguire
Community Champion

Thanks @DannyWahl 

A quick approach for CC chacters is to add a font with these characters as described in https://twitter.com/mattt/status/1237846418808664064?lang=en 

as this posing points out the characters are available in woff and woff2 encodings at https://github.com/NSHipster/nshipster.com/tree/master/assets/fonts 

However, this does not really answer the question of "What version of Unicode is supported in Canvas?" So adding the characters is a way around the problem of these specific characters being supported, but it is not a statement of what characters are supported.