     {
         let metalLayer = CAMetalLayer()
         metalLayer.device = device
-        metalLayer.pixelFormat = .bgra8Unorm;
+        metalLayer.pixelFormat = .bgra8Unorm
         metalLayer.framebufferOnly = true
+        metalLayer.contentsScale = 2
         return metalLayer
     }
     

#endif
        let path = glyph.copy() as! NSBezierPath
        var transform = AffineTransform.identity
        transform.scale(x: glyphSize, y: glyphSize)
        transform.translate(x: 0.5 + overscan/2, y: 0.5 + overscan/2)
        path.transform(using: transform)
        color.set()

    {
        let glyphSize = floor(min(bounds.width, bounds.height) * CGFloat(settings.size))
        let overscan = CGFloat(0.05) // the glyph is a little bigger than 1x1
        let imageSize = Int(floor(glyphSize * (1 + overscan))) * IMAGE_SSAA
        
        let imageRep = NSBitmapImageRep(bitmapDataPlanes: nil, pixelsWide: imageSize, pixelsHigh: imageSize, bitsPerSample: 8, samplesPerPixel: 4, hasAlpha: true, isPlanar: false, colorSpaceName: NSCalibratedRGBColorSpace, bytesPerRow: imageSize*4, bitsPerPixel:32)!
        
