             let style = NSParagraphStyle.default.mutableCopy()
             let attributes = [
                 NSAttributedString.Key.paragraphStyle: style,
-                NSAttributedString.Key.font: calculatePreferredFont(withFont: lettersFont, for: rect.size),
+                NSAttributedString.Key.font: makeFitFont(withFont: lettersFont, forSize: rect.size),
                 NSAttributedString.Key.foregroundColor: lettersColor
             ]
             let lettersSize = letters.size(withAttributes: attributes)

                // Process the firs name letter
                if let letter = firstComponent.first {
                    letters.append(letter)
                    lettersAssciValue += letter.ASCIIValue
                }
                if !singleLetter {
                    // Process the last name letter
                    if let letter = lastComponent.first {
                        letters.append(letter)
                        lettersAssciValue += letter.ASCIIValue
                    }
                }
            }

                        let substring = component[startIndex..<endIndex].capitalized
                        if let letter = substring.first {
                            letters.append(letter)
                            lettersASCIIValue += letter.ASCIIValue
                        }
                    }
                }
            }
        }
        return (letters: letters, value: lettersASCIIValue)
    }
    
    private func makeFitFont(withFont font: UIFont, forSize size: CGSize) -> UIFont {
        let fitFont = font.withSize(min(size.height, size.width) / 2.0)
        return fitFont.pointSize < font.pointSize ? fitFont : font
    }
}
