So rendern Sie Glyphen aus FontAwesome auf einem Canvas-Element
FontAwesome spezifiziert Glyphen in seiner CSS-Datei wie folgt:
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure
screen readers do not read off random characters that represent icons */
.icon-glass:before { content: "\f000"; }
.icon-music:before { content: "\f001"; }
Ich versuche, Symbole aus dieser Schriftart in ein Canvas-Element zu rendern, kann jedoch nicht erkennen, wie auf diese Glyphen zugegriffen werden kann.
ctx.font = "40px FontAwesome";
ctx.fillText("\f000",20,20); // no cigar
Wie gebe ich diese Glyphen in JavaScript-Zeichenfolgen an?