code: function canFitText(gx, gy, gw, gh, occupied) {
        // Go through the occupied points,
        // return false if the space is not available.
        var i = occupied.length;
        while (i--) {
          var px = gx + occupied[i][0];
          var py = gy + occupied[i][1];
  
          if (px >= ngx || py >= ngy || px < 0 || py < 0) {
            if (!settings.drawOutOfBound) {
              return false;
            }
            continue;
          }
  
          if (!grid[px][py]) {
            return false;
          }
        }
        return true;
      }
docs: /* Determine if there is room available in the given dimension