@@ -135,6 +135,9 @@ import Foundation
let size = string.size(withAttributes: attributes)
self.img = nil
+ if string.length < 1 || size.width < 0.01{
+ return nil
+ }
self.img = NSImage(size: size)
self.img?.lockFocus()
NSGraphicsContext.current?.imageInterpolation = .high