[SOLVED] Default font name lazarus / 31-LCL ---------------------------------------------------------------------- Dibo · 2012-04-20 21:45 Hi, Most of controls (or canvas) have font name "default". How to get exact name of this font? Regards. ---------------------------------------------------------------------- Blaazen · 2012-04-20 23:35 This code works: Code: [Select]var aFontName: string; begin   aFontName:=GetFontData(Button1.Font.Handle).Name; but it gives me warning that symbol Handle is deprecated. ---------------------------------------------------------------------- Zoran · 2012-04-21 13:42 Quote from: Blaazen on April 21, 2012, 01:35:24 amThis code works: Code: [Select]var aFontName: string; begin   aFontName:=GetFontData(Button1.Font.Handle).Name; but it gives me warning that symbol Handle is deprecated. No, it doesn't work, at least not as Dibo needs -- it returns "default" as font name (tested on Lazarus from trunk, FPC 2.6.0, Gtk2, Kubuntu). ---------------------------------------------------------------------- Blaazen · 2012-04-21 14:05 Then it is not same on all platforms. On Qt, this: Code: [Select]GetFontData(Button1.Font.Handle).Name; returns "Sans Serif". And this: Code: [Select]Button1.Font.FontData.Name; returns "default". ---------------------------------------------------------------------- Dibo · 2012-04-21 14:47 I have QT widgetset and it works, but I need multi platform solution. I will try to ask on mailing list ---------------------------------------------------------------------- Avishai · 2012-04-21 17:39 It works fine on Win7. ---------------------------------------------------------------------- Dibo · 2012-04-21 18:13 So it seems that problem is only on GTK. I reported this. Thanks ---------------------------------------------------------------------- Dibo · 2012-04-22 12:57 Someone fixed this bug. Patch included in latest Lazarus from SVN http://bugs.freepascal.org/view.php?id=21828 ---------------------------------------------------------------------- BigChimp · 2012-04-22 13:04 Thanks for reporting it and getting it fixed, Dibo!