     @addContent "BT"
 
     # text position
-    @addContent "1 0 0 1 #{x} #{y} Tm"
+    @addContent "1 0 0 1 #{@number(x)} #{@number(y)} Tm"
 
     # font and font size
     @addContent "/#{@_font.id} #{@_fontSize} Tf"

      if last < cur
        hex = encoded.slice(last, cur).join ''
        advance = positions[cur - 1].xAdvance - positions[cur - 1].advanceWidth
        commands.push "<#{hex}> #{-advance}"
      
      last = cur
    

        flush i
        
        # Move the text position and flush just the current character
        @addContent "1 0 0 1 #{@number(x + pos.xOffset * scale)} #{@number(y + pos.yOffset * scale)} Tm"
        flush i + 1
        
        hadOffset = yes
      else
        # If the last character had an offset, reset the text position
        if hadOffset
          @addContent "1 0 0 1 #{@number(x)} #{@number(y)} Tm"
          hadOffset = no
        
        # Group segments that don't have any advance adjustments
