         cgContext.scaleBy(x: 1.0, y: -1.0)
         cgContext.translateBy(x: 0.0, y: -2.0 * p.y - font.pointSize)
         
-        text.draw(at: p, withAttributes: convertToOptionalNSAttributedStringKeyDictionary(attr))
+        text.draw(at: p, withAttributes: [.font: font, .foregroundColor: color])
         
         context.restoreGraphicsState()
     }

    func text(_ text:String, _ p:NSPoint, rotationRadians:CGFloat?, font : NSFont = NSFont(name: "Monaco", size: 10)!, color color_ : ConvertibleToNSColor = NSColor.black) {
        
        let color = color_.color
        
        let attr = [
            convertFromNSAttributedStringKey(NSAttributedString.Key.font):font,
            convertFromNSAttributedStringKey(NSAttributedString.Key.foregroundColor):color
        ]
        
        context.saveGraphicsState()
        

    }
    
    func save(_ path:String, open:Bool=false) {
        guard let data = bitmapImageRep.representation(using: .png, properties: [:]) else {
            print("\(#file) \(#function) cannot get PNG data from bitmap")
            return
        }
