cufon icon indicating copy to clipboard operation
cufon copied to clipboard

If descent is zero, cufon returns empty string instead of zero for descent.

Open tmccombs opened this issue 9 years ago • 1 comments

If the descent of a font is 0, then cufon sets the descent to "" in the response JSON.

This is caused by a combination of initially setting the descent to "" in the $currentFace (line 119 of SVGFont.php) and comparing $actualValue to null with == instead of === on line 178 of SVGFont.php. In php 0 == null returns true.

tmccombs avatar Jun 08 '15 19:06 tmccombs

I could make a pull request changing it to use === instead of == or 0 instead of "", but I don't know if either of those changes would break something else.

tmccombs avatar Jun 08 '15 19:06 tmccombs