break on dpi too high as well

This commit is contained in:
John Cupitt 2018-12-07 13:09:22 +00:00
parent da31d0f31a
commit 0d5eced964
1 changed files with 3 additions and 3 deletions

View File

@ -266,10 +266,10 @@ vips_text_autofit( VipsText *text )
text->dpi = difference < 0 ? text->dpi * 2 : text->dpi / 2;
/* This can happen with some fonts that don't resize
* gracefully.
/* This can happen with fixed-size fonts.
*/
if( text->dpi < 2 )
if( text->dpi < 2 ||
text->dpi > 10000 )
break;
}