Bug 122618

Summary: Font size cannot be defined as float (8.6pt) in font dialog.
Product: [Unmaintained] kdelibs Reporter: René Fritz <rf-kde>
Component: generalAssignee: Christoph Feck <cfeck>
Status: RESOLVED FIXED    
Severity: wishlist CC: lu.dolezal, mboquien, simon
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Example how it was solved in another DE

Description René Fritz 2006-02-24 11:54:42 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    Ubuntu Packages

I wonder why the font select dialog boxes restrict to choose full point sizes only. It's Ok that you get a list like 8, 9, 10, ... - But it is not possible to enter a value like 8.7 manually. Only integers are allowed as input.

The funny thing is if you change the values by hand in configuration files like
~/.kde/share/config/kdeglobals
it works without problems. 

This is not a KDE problem only, I have seen this behaviour in most *nix apps. For word processors it might be Ok but for the screen display and the GUI the rendered pixel sizes make too big jumps between 8, 9 and 10pt.

Pleeease allow float pt font sizes. :-)
Thanks
René
Comment 1 Simon Ochsenreither 2009-01-03 19:59:12 UTC
Created attachment 29870 [details]
Example how it was solved in another DE
Comment 2 Lukas Dolezal 2009-04-09 21:02:30 UTC
Hi,
I realy agree with reporter. It's very unconfortable for me that I cannot set KDE font size to float values. Especialy with "Deja Vu Sans" is between size 8 and 9 very big difference (for me)..

I'll try to find code, which causes it, but I can't promise anythink :)
Comment 3 Christoph Feck 2009-06-29 00:36:18 UTC
A patch has been added to reviewboard, see http://reviewboard.kde.org/r/904/
Comment 4 Christoph Feck 2009-07-26 14:14:08 UTC
SVN commit 1002561 by cfeck:

Support decimal font sizes (such as 8.6 pt) in KFontDialog

QFont already had support for fractional font sizes since Qt 2.
Applications that do not use QFont::pointSizeF() but pointSize()
will get the rounded size. Most applications, however, simply
request a font, use it, or store it using KConfig, so they will
support fractional font sizes transparently.

http://reviewboard.kde.org/r/904/

BUG: 122618


 M  +64 -43    kfontchooser.cpp  
 M  +1 -1      kfontchooser.h  
 M  +6 -6      kfontcombobox.cpp  
 M  +10 -4     kfontrequester.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1002561