83de8e9a6a38ae96dcc3985da5e875d5233c34f0
[openblackhole/openblackhole-enigma2.git] / lib / python / Tools / TextBoundary.py
1 from enigma import eLabel
2
3 def getTextBoundarySize(instance, font, targetSize, text):
4         dummy = eLabel(instance)
5         dummy.setFont(font)
6         dummy.resize(targetSize)
7         dummy.setText(text)
8         return dummy.calculateSize()