The bug was caused by lineHeight being set to fontSize * 1.4 when fontResize is true in TextBox.js. To preserve the lineHeight to fontSize ratio when the font is resized, I calculate ratio = lineHeight / fontSize and then set lineHeight to fontSize * ratio when fontResize is true.
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
[ ] I have documented all new methods.
[ ] I have written tests for all new methods/functionality.
[ ] I have written examples for all new methods/functionality.
(closes #83 )
Description
The bug was caused by
lineHeight
being set tofontSize * 1.4
whenfontResize
istrue
in TextBox.js. To preserve thelineHeight
tofontSize
ratio when the font is resized, I calculateratio = lineHeight / fontSize
and then setlineHeight
tofontSize * ratio
whenfontResize
istrue
.Types of changes
Checklist