JSFiddle - React, Tailwind, and code Playground
HTML
<canvas id="canvas" width="300" height="300"></canvas>
CSS
@font-face {
font-family: 'glyphicon';
src: url('http://getbootstrap.com/dist/fonts/glyphicons-halflings-regular.eot'); /* IE9 Compat Modes */
src: url('http://getbootstrap.com/dist/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('http://getbootstrap.com/dist/fonts/glyphicons-halflings-regular.woff2') format('woff2'), /* Super Modern Browsers */
url('http://getbootstrap.com/dist/fonts/glyphicons-halflings-regular.woff') format('woff'), /* Pretty Modern Browsers */
url('http://getbootstrap.com/dist/fonts/glyphicons-halflings-regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('http://getbootstrap.com/dist/fonts/glyphicons-halflings-regular.svg#svgFontName') format('svg'); /* Legacy iOS */
}
JavaScript
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
ctx.font = '100px glyphicons';
ctx.fillText(String.fromCharCode(0xe011), 50, 50);