Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-12

GTK2 font size smaller

5 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

cobines

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.

cobines -------------- next part -------------- A non-text attachment was scrubbed... Name: fontsize.png Type: image/png Size: 26519 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20101207/424b0d1a/attachment-0001.png>

Reply by email

zeljko
to cobines
cobines wrote 18 lines
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.

Have you tried gtk2 Font.Height vs qt Font.Height or Font.Size ?

zeljko

Reply by email

zeljko
to cobines: After recent changes to LCLGTK2 font size calculations the font with the same size seems…
cobines wrote 18 lines
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.

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.freepascal.org/pipermail/lazarus/attachments/20101208/2f4ce3b6/attachment-0001.png>

Reply by email

zeljko
to cobines: After recent changes to LCLGTK2 font size calculations the font with the same size seems…
cobines wrote 18 lines
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.

Please try r28646, there was problem with font calculation when lfHeight < 0 and Size > 0.
Now font sizes/heights (any) looks same across gtk,gtk2 and qt.

zeljko

Reply by email

cobines
to zeljko

2010/12/8 zeljko :

Have you tried gtk2 Font.Height vs qt Font.Height or Font.Size ?

I have used Font.Size. With Font.Height the font has the same size on LCLQT and LCLGTK2 but it is smaller than in other applications.

Please try r28646, there was problem with font calculation when lfHeight < 0 and Size > 0. Now font sizes/heights (any) looks same across gtk,gtk2 and qt.

Yes, after this commit when I set Font.Size now the size is the same in LCLGTK2 and LCLQT, and also the same as in non-Lazarus applications.
Thanks!

cobines

Reply by email