Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For the existing Servoy Clients, all font-size values specified in CSS are converted to a different value before being used. 

Code Block
languagejs
var fontSize = '10px'
 
function convertSize(fontSize) {
	var units = fontSize.match(/(^\d.)(\w.$)/)
	if (units.length === 2 && units[1] === 'px') {
		if (units[0] === 9) {
			return '11px'
		}
		return (units[0] * (4 / 3)) + 'px'
	} else if (units.length === 1 || (units.length === 2 && units[1] === 'pt')) {
				if (units[0] === 9) {
					return '7pt'
				}
				return (units[0] * (3 / 4)) + 'pt'
	}
	return fontSize
}

...