 
     @setAnchorPoint()
 
-    # Debug
     if @debug
       context.lineWidth = 1
       context.strokeStyle = '#f00'


    if @_color
      context.fillStyle = @_color
      context.fillText @text, 0, 0, Arcadia.WIDTH

    # Don't allow border to cast a shadow
    if @_shadow.x != 0 or @_shadow.y != 0 or @_shadow.blur != 0

    # which can then be reused here
    Arcadia = require './arcadia.coffee'
    
    context = @canvas.getContext('2d')

    lineCount = 1
    newlines = @text.match(/\n/g)
    lineCount = newlines.length + 1 if newlines

    # Determine width/height of text using offscreen <div>
    element = document.getElementById 'text-dimensions'
    
    if !element
      element = document.createElement('div')
      element['id'] = 'text-dimensions'
      element.style['position'] = 'absolute'
      element.style['top'] = '-9999px'
      document.body.appendChild(element)

    element.style['font'] = @font
    element.style['line-height'] = 1
    element.innerHTML = @text.replace(/\n/g, '<br>').replace(/\s/g, '&nbsp;')
    @size.width = element.offsetWidth
    @size.height = element.offsetHeight
    lineHeight = @size.height / lineCount
    @anchor = { x: @size.width / 2, y: @size.height / 2 }

    @canvas.width = @size.width + @_border.width + Math.abs(@_shadow.x) + @_shadow.blur
