         }
     }
     
-    static func processTextInfo(info:[String:AnyObject], dimension:CGSize, scale:CGSize) -> ([String:AnyObject], String, Bool, Bool) {
+    static func processTextInfo(info:[String:AnyObject], dimension:CGSize, scale:CGSize) -> ([String:AnyObject], String, Bool, Bool, CTFontRef, CGFloat) {
         var fTextBottom = false
         var fTextTop = false
         let paragraphStyle = NSParagraphStyle.defaultParagraphStyle().mutableCopy() as! NSMutableParagraphStyle

    }

    static func addTextLayer(text:String, scale:CGSize, info:[String:AnyObject], dimension:CGSize, layer:CALayer) -> CATextLayer {
        let (attr, alignmentMode, fTextBottom, fTextTop) = SwipeElement.processTextInfo(info, dimension: dimension, scale: scale)
        let attrString = NSAttributedString(string: text, attributes: attr)

        // HACK: CATextLayer does not use the paragraph info in NSAttributedString. 
        // http://stackoverflow.com/questions/35823281/catextlayer-is-ignoring-nsmutableparagraphstyle/38213192
        // Therefore, we need to explicitly set those attributes to the CATextLayer.
        let textLayer = CATextLayer()
        textLayer.contentsScale = UIScreen.mainScreen().scale
        textLayer.wrapped = true
        textLayer.alignmentMode = alignmentMode
        textLayer.string = attrString
        
        SwipeElement.processShadow(info, scale:scale, layer: layer)


            return round(size * scale.height)
        }()
        let fontNames = SwipeParser.parseFontName(info, markdown: false)
        func foo() -> CTFontRef {
            for fontName in fontNames {
                return CTFontCreateWithName(fontName, fontSize, nil)
            }
            return CTFontCreateWithName("Helvetica", fontSize, nil)
        }
        let font:CTFontRef = foo()
        let attr:[String:AnyObject] = [
            NSFontAttributeName:font,
            //NSForegroundColorAttributeName:UIColor(CGColor: SwipeParser.parseColor(info["textColor"], defaultColor: UIColor.blackColor().CGColor)),
            NSParagraphStyleAttributeName:paragraphStyle]
        return (attr, alignmentMode, fTextTop, fTextBottom, font, fontSize)
    }
    
    static func processTextStorage(text:String, attr:[String:AnyObject], fTextBottom:Bool, fTextTop:Bool, rcBound:CGRect) -> CGRect {
