   
   // Work out the size of texture we require for a particular count of characters
   private func _required_texture_size(count: Int, size : Size2D<Int>) -> CGSize {
+    guard size.w != 0 else {
+      return CGSizeMake(0, 0)
+    }
     // Work out the power of two length required for the maximum dimension
     let pwrMaxRequired = Int(ceil(log2(Float(max(size))*sqrt(Float(count)))))
     // Check the power below this, as it MIGHT work with uneven character counts

      let scaledY = (transform * GLKVector3.eY).length * tool.scaleToPoints.y//*  Float(tool.screenSizePhysical.h)
      let scaledAspect = scaledX/scaledY
      
      
      let fontSize = Int(ceil(size*scaledY / tool.pointsToScreenScale))
      guard fontSize < 100 else {
//        fatalError()

        return atlas
      }
    }
    guard size > 0 && size < 100 else {
      print("Invalid atlas size")
      return nil
    }
    // Clear any errors before running this process
    processGLErrors()
    
    let scale : Float = 2.0
    
    let atlasText = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~Δ☊¡¢£¤¥¦§¨©ª«¬☋®¯°±²³´µ¶·¸¹º»¼½¾¿˚π"
    let font = UIFont(name: fontName, size: CGFloat(size))
