[Lazarus] GTK2 font size smaller

zeljko zeljko at holobit.net
Wed Dec 8 08:23:20 CET 2010


On Tuesday 07 December 2010 18:54, cobines wrote:
> After recent changes to LCLGTK2 font size calculations the font with
> the same size seems smaller.  As zeljko has explained in another
>
> topic:
> >>Yes, I've changed gtk2 font calculation to be same as on other widgetsets
> >> (it was wrong).
> >>
> >>zeljko
>
> But the font size is inconsistent between widgetsets. Look at attached
> screenshot. The left form is from GTK2 widgetset, right from QT4.
> Fonts on GTK2 with same size are smaller than on QT4. The "Sample GTK2
> text" is Liberation Serif pt.12 from "medit" non-lazarus GTK2 app. The
> "Sample QT4 text" is from "qtconfig" non-lazarus QT4 app. You can
> compare them on the right hand side of the screenshot. There is no
> difference in font size between non-Lazarus GTK2 and QT4 apps but
> there is a difference between LCLGTK2 and LCLQT4 apps. And there is a
> difference between non-Lazarus GTK2 app and Lazarus GTK2 app.

Look at attachment.
There are 3 windows with memos. From left to right gtk, gtk2, qt.
Without my change it looks different (gtk2 font is bigger, looks like +2pt).
Besides that now we use pango_font_description_set_absolute_size() to set font 
in device units.
Maybe we need to make different calculation if font.height < 0 and font.size > 
0.

zeljko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fontheights.png
Type: image/png
Size: 138310 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20101208/2f4ce3b6/attachment-0003.png>


More information about the Lazarus mailing list