JSFiddle - React, Tailwind, and code Playground

by adamschwartz

HTML

<canvas id="canvas"></canvas>

CoffeeScript

text = String.fromCharCode(37101) + String.fromCharCode(27427) + String.fromCharCode(27427)
context = canvas.getContext '2d'

image = new Image()
image.onload = ->
    w = this.width
    h = this.height
    canvas.width = w
    canvas.height = h
    context.fillStyle = '#ffffff'
    context.font = '400px/400px serif'
    context.fillText text, ((w - context.measureText(text).width) / 2), h - 100
    context.globalCompositeOperation = 'source-atop'
    context.drawImage this, 0, 0, w, h
    
image.src = 'https://scontent-b-iad.xx.fbcdn.net/hphotos-xap1/t31.0-8/10338498_10202070714424584_182778580557967346_o.jpg'