mirror of https://github.com/buggins/dlangui.git
Division by 0 error in Font::measureText() with MathJax_Vector and
MathJax_Vector-Bold fonts.
This commit is contained in:
parent
cd0415e79a
commit
925401b26a
|
@ -239,6 +239,8 @@ class Font : RefCountedObject {
|
|||
bool fixed = isFixed;
|
||||
bool useKerning = allowKerning && !fixed;
|
||||
int fixedCharWidth = charWidth('M');
|
||||
if (fixedCharWidth == 0)
|
||||
fixedCharWidth = spaceWidth;
|
||||
int x = 0;
|
||||
int charsMeasured = 0;
|
||||
int * pwidths = widths.ptr;
|
||||
|
|
Loading…
Reference in New Issue