descender
is assumed to be negative, but zero should be allowed
#357
Labels
descender
is assumed to be negative, but zero should be allowed
#357
Expected Behavior
The Material Icons font to be usable with
new Font({ ... })
.Current Behavior
The font can not be used, because the constructor throws an error:
Possible Solution
The bug occurs because
Font
expectsdescender
to be non-zero, while it is a valid value. A simple fix would be to change the checks as follows:Although highly unlikely, I suppose it would also be correct to do the same with
ascender
:Steps to Reproduce (for bugs)
Context
The font is read correctly in the playground and the inspector displays its
descender
to be zero, as expected, but the library version doesn't produce the same results, unfortunately.Your Environment
The text was updated successfully, but these errors were encountered: