kivy/kivy — pull request #1082 by ihaque (2013-04-03 20:34:09+00:00)
Title: Int-ify texture size in MarkupLabel

Fixes a crash in PIL when using MarkupLabels. (But introduces a new problem that I'm not sure how to debug.)

# Explanation

`kivy.core.text.LabelBase` has a default `line_height` parameter of 1.0. Consequently, `kivy.core.text.MarkupLabel._pre_render_label` gets a float value for `default_line_height`, which down the line gets passed to `Image.new` in `kivy.core.text.text_pil._render_begin`. PIL doesn't like the float, and asserts out.

# Summary

This patch makes the default returned height from `_pre_render` an int so that the assertion in PIL no longer fails. However, it doesn't fix the entire problem - I now get a nonexistent texture down the line. Documenting this in a new issue.