         
         do {
             let text = NSAttributedString(string: self.ellipsis,
-                attributes: [NSFontAttributeName : font, NSForegroundColorAttributeName: self.textColor])
+                                          attributes: [NSAttributedStringKey.font : font, NSAttributedStringKey.foregroundColor: self.textColor])
             let size = text.size()
             
             self.ellipsisWord = Word(

                if words.count > 0 {
                    return words
                } else {
                    let text = NSAttributedString(string: " ", attributes: [NSFontAttributeName : font])
                    let size = text.size()
                    return [Word(
                        text: text,

                    .map { s -> NSAttributedString? in
                        return s == "" ? nil :
                            NSAttributedString(string: s,
                                               attributes: [NSAttributedStringKey.font : font, NSAttributedStringKey.foregroundColor: self.textColor])
                    }
                    .flatMap { t -> Word? in
                        if let text = t {
                            let size = text.size()
                            let spaceWidth = NSAttributedString(string: String(repeating: " ", count: w), attributes: [NSAttributedStringKey.font : font]).size().width
                            w = 1
                            return Word(
                                text: text,
