Skip to content

Commit

Permalink
Merge pull request #2 from Robinfr/font-size-fix
Browse files Browse the repository at this point in the history
Floor final font size
  • Loading branch information
fazouane-marouane authored Feb 13, 2017
2 parents 93e258b + ae2dc25 commit a2dac30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function optimalFontSize(wordRatios: number[], maxWidth: number, maxHeight: numb
high = fontSize;
}
}
return low;
return Math.floor(low);
}

function checkConstraints(fontSize: number, wordRatios: number[], maxWidth: number, maxHeight: number, lineHeightRatio: number) {
Expand Down

0 comments on commit a2dac30

Please sign in to comment.