     _fragment: (text, x, y, options = {}) ->
         state = @_textState
         wrap = @_wrapState
+        
+        # handle options
+        text = '' + text
         align = options.align or 'left'
-        text = '' + text
         indent = (wrap.firstLine and options.indent) or 0
-        wordSpacing = 0
+        wordSpacing = options.wordSpacing or 0
+        characterSpacing = options.characterSpacing or 0
         
         # text alignments
         if options.width
-            lineWidth = options.width - indent
+            lineWidth = options.width - indent - wrap.extraSpace
             
             switch align
                 when 'right'

        # split the line into words
        words = text.match(WORD_RE)
        
        # space left on the line to fill with words
        spaceLeft = lineWidth - (options.indent or 0)
        
        # word width cache
        wordWidths = {}

                return if @y > maxY
                
                # reset the space left and buffer
                spaceLeft = lineWidth - w - wrap.extraSpace
                buffer = if word is '\n' then '' else word

            else
