                                 return
                             }
 
-                            let newFont = font.modifyTraits(fontTrait, enable: enable)
+                            let newFont = font.modifyTraits(fontTraits, enable: enable)
 
                             self.beginEditing()
                             self.removeAttribute(NSFontAttributeName, range: range)

    /// Checks if the specified font trait spans the specified NSRange.
    ///
    /// - Parameters:
    ///     - trait: A font trait.
    ///     - range: The NSRange to inspect
    ///
    /// - Returns: True if the trait spans the entire range.
    ///
    public func fontTrait(_ trait: UIFontDescriptorSymbolicTraits, spansRange range: NSRange) -> Bool {
        var spansRange = true

        // Assume we're removing the trait. If the trait is missing anywhere in the range assign it.

                            guard let font = object as? UIFont else {
                                return
                            }
                            if !font.fontDescriptor.symbolicTraits.contains(traits) {
                                spansRange = false
                                stop.pointee = true
                            }
