Hi all, 2014-04-23 17:19 GMT+02:00 Elvis Angelaccio <elvis.angelac...@kdemail.net>:
> > 2014-04-23 14:28 GMT+02:00 Thomas Lübking <thomas.luebk...@gmail.com>: > > On Mittwoch, 23. April 2014 13:17:02 CEST, Elvis Angelaccio wrote: >> >> I don't understand. Since there are only numbers I think that your point >>> is >>> already accomplished. >>> >> Nope. >> To get monospace glyphs for sure, you must select a monospace font - >> otherwise you're going by luck. >> >> At least on my system >>> >> ;-) >> >> >> Have you found a particular font that doesn't look this way? >>> >> Hundreds - it's pretty common and the more "exotic" the fonts get >> (script), the more obvious this becomes, but you may try Fontin [1], >> Bitstream Handel Gothic [2], Adobe Jenson or Linotype Frutiger (latter are >> commercial fonts, no link - sorry. I can send you screenshots of the fonts >> though and some resellers will likely provide some as well) for some >> "reasonable" choices. >> In addition, the hinter and font size/weight can have impact. >> >> > Oh my god, using these fonts the stopwatch display is an eyesore. > Thanks for the explanation, this thing has to be fixed, sure as hell. I > will try with different labels for each digit. > The problem now should be fixed. I've replaced QLabel with a custom widget which uses a horizontal layout with a QLabel for each digit, adding proper padding. The padding space is computed on the current font width (using QFontMetrics). This should take into account most fonts, even if I've tried only the fonts suggested by Thomas. If you have many other "exotic" fonts in your systems, further tests are welcome. Probably the best solution was to use a custom QLabel which overrides its paintEvent() function, but I didn't know how to deal with it, since it's too low level. Screenshot for a quick feedback (HandelGothic font): http://abload.de/img/kronometer2a2k3a.png Cheers, Elvis