/* Round text sizes so that the svg viewer only needs a discrete number of renderings of the font  */
static double round_text_size(double size)
/* Round text sizes so that the svg viewer only needs a discrete number of renderings of the font  */
static double round_text_size(double size)
{
	int loop = 100;
	double target = 10.0;
	if (size >= 10.0)
		return size;
	while (loop--) {
		if (size >= target)
			return target;
		target = target / 2.0;
	}
	return size;
}