← Back to team overview

screenlets-dev team mailing list archive

[Bug 584811] Re: get_text_width doesn't work right and appears twice in drawing.py

 

Still doesn't seem to work.

It would seem that draw_text tries to get something right wrt to the new
way of specifying fonts, but the fact remains that get_text_height/width
is errant, and possibly on multiple counts:

Specifically, I have recently begun using the OutputScreenlet, which
uses these calculations extensively for calculating how many lines of
output can be fitted in a screenlet of a given size. Those calculations
seem to fail...

I have found that the following patch, for whatever reason, gives a
better result, even though I don't specify neither an extended font
description, nor extend things to include a size parameter, but I'm not
sufficiently versed in Python to know why. Something seems amiss,
however, and I have seen no ill effects of my uneducated patch...

** Patch added: "Mysteriously working patch for a single screenlet use case that is wrong in current code"
   https://bugs.launchpad.net/screenlets/+bug/584811/+attachment/2820177/+files/get_text_widt_height.patch

-- 
You received this bug notification because you are a member of
Screenlets Dev Team, which is subscribed to Screenlets.
https://bugs.launchpad.net/bugs/584811

Title:
  get_text_width doesn't work right and appears twice in drawing.py

To manage notifications about this bug go to:
https://bugs.launchpad.net/screenlets/+bug/584811/+subscriptions


References