RFC: Improved Text Thumbnailer

Christoph Feck christoph at maxiom.de
Thu May 21 14:35:44 BST 2009


Hi,

Looking at bug 169381 "Text files preview does not support international 
symbols" I wondered, if it wouldn't be better to just let Qt render the text, 
instead of hardcoding a primitive bitmap font.

What I present here is an initial patch to fix that bug, but I have a few 
questions/issues, so please give feedback.

* Not sure if KEncodingDetector should be used here, and if I used it 
correctly. The idea was that the text thumbnailer should handle any text, but 
I do not know what types of files (UTF-16?) trigger that thumbnailer.

* I added code to use standard Base/Text colors, but as all mime icons are 
white, I commented out that, and used the old hardcoded colors.

* The font size is set to 7 pixels, but grows up to 10 pixels for larger 
icons. People that prefer pixel sharp fonts will probably have antialiasing 
disabled, so please try it with your font setup, if it is actually readable.

* Not sure if that is a bugfix, or a new feature (4.3 or 4.4 ... )

Thanks,
Christoph Feck (kdepepo)

bug link: https://bugs.kde.org/show_bug.cgi?id=169381

-------------- next part --------------
A non-text attachment was scrubbed...
Name: textthumbnail.diff
Type: text/x-diff
Size: 7856 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090521/feacad46/attachment.diff>


More information about the kde-core-devel mailing list