.some-text {
font-size: 100vh;
line-height: 100vh;
}
function onTextChange() {
var textLength = $('.textHolder').text().length;
var fontSize = Math.min(12, (1000 / textLength) * 12);
//where 12 - typical font-size, 1000 - typical length
$('.textHolder').css('font-size', fontSize+'px');
{