[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Kronometer now in KDE Review
From:       Elvis Angelaccio <elvis.angelaccio () kdemail ! net>
Date:       2014-04-26 13:02:52
Message-ID: CALN1cnv+Wz98NuOfe+2QsKOGu8ucbF2DsqdPM-OKCmPEc9=yEw () mail ! gmail ! com
[Download RAW message or body]

Hi all,

2014-04-23 17:19 GMT+02:00 Elvis Angelaccio <elvis.angelaccio@kdemail.net>:

>
> 2014-04-23 14:28 GMT+02:00 Thomas L=C3=BCbking <thomas.luebking@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 poin=
t
>>> 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 a=
re
>> commercial fonts, no link - sorry. I can send you screenshots of the fon=
ts
>> 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

[Attachment #3 (text/html)]

<div dir="ltr">Hi all,<div class="gmail_extra"><br><div \
class="gmail_quote">2014-04-23 17:19 GMT+02:00 Elvis Angelaccio <span \
dir="ltr">&lt;<a href="mailto:elvis.angelaccio@kdemail.net" \
target="_blank">elvis.angelaccio@kdemail.net</a>&gt;</span>:<br> <blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div \
dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote"> 2014-04-23 14:28 \
GMT+02:00 Thomas Lübking <span dir="ltr">&lt;<a \
href="mailto:thomas.luebking@gmail.com" \
target="_blank">thomas.luebking@gmail.com</a>&gt;</span>:<div class=""><br> \
<blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>On \
Mittwoch, 23. April 2014 13:17:02 CEST, Elvis Angelaccio wrote:<br>

<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
 I don&#39;t understand. Since there are only numbers I think that your point is<br>
already accomplished.<br>
</blockquote></div>
Nope.<br>
To get monospace glyphs for sure, you must select a monospace font - otherwise \
you&#39;re going by luck.<br> <br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
 At least on my system<br>
</blockquote>
;-)<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
 Have you found a particular font that doesn&#39;t look this way?<br>
</blockquote></div>
Hundreds - it&#39;s pretty common and the more &quot;exotic&quot; 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 &quot;reasonable&quot; choices.<br>


In addition, the hinter and font size/weight can have impact.<br>
<br></blockquote><div><br></div></div><div>Oh my god, using these fonts the stopwatch \
display is an eyesore.  </div><div>Thanks for the explanation, this thing has to be \
fixed, sure as hell. I will try with different labels for each digit.</div> <span \
class=""><font color="#888888"> <div><span \
style="color:rgb(34,34,34)"></span></div></font></span></div></div></div></blockquote><div> \
</div><div><div>The problem now should be fixed. I&#39;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&#39;ve tried only \
the fonts suggested by Thomas. If you have many other &quot;exotic&quot; fonts in \
your systems, further tests are welcome.  </div> <div>Probably the best solution was \
to use a custom QLabel which overrides its paintEvent() function, but I didn&#39;t \
know how to deal with it, since it&#39;s too low \
level.</div></div><div><br></div><div>Screenshot for a quick feedback (HandelGothic \
font):  <a href="http://abload.de/img/kronometer2a2k3a.png">http://abload.de/img/kronometer2a2k3a.png</a></div>
 <div><br></div><div>Cheers,</div><div>Elvis</div></div><br></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic