> The LCL provides a Delphi compatible TFont. > The widgetsets searches the nearest font. > The gtk interface also understands XLD font names, where the > font name is a 15 attribute filter. > So, basically you can select every available font under > windows and under gtk/X. But they are not cross platform. > > The OI combobox is custom drawn, so it would be possible to > draw every font. But afaik this would be quite slow and needs > a lot of resources. > > I'm not an font expert, so I don't know, what properties are > needed by TFont to make it cross platform (if this is possible).
The thing is that you have to "measure" the string to calculate its dimensions given the font family, text size, font style etc. which I don't remember if TFont class provides itself in Delphi or if one had to use Windows calls for it (maybe it does provide). I was also thinking that I could reuse in the background an autosizing TLabel (there was such I think in Delphi) and set the text to it (=the font name itself) and the font name and keep some same font size, then tell it to size itself (without adding it to a parent - hope it doesn't play it clever in that case and do nothing), then ask it it's dimensions (so that I avoid messing with the font measuring calls if they're complex) I wonder why it should be a resource hog if fonts are implemented ok in Laz and in the OS or window manager. I've done it in JFC/Swing many years ago and it played very nice (JFC/Swing wasn't the most optimized lib back then [it still itsn't]). Also, old Macs were doing that (back in 1997) and didn't have problems. Anyway it will be a property to turn on/off. Think it's interesting exercise for me to get more comfortable with Laz object inspector code, so I'll try to give it a try Another thing I'd like to add is wiring option on the form designer, maybe similar to IBM's VisualAge or even simpler Cheers, George ---------------- George Birbilis ([EMAIL PROTECTED]) Computer & Informatics Engineer Microsoft MVP J# for 2004-2006 Borland "Spirit of Delphi" ++ QuickTime, Delphi, ActiveX, .NET components ++ http://www.kagi.com/birbilis ++ Robotics ++ http://www.mech.upatras.gr/~Robotics http://www.mech.upatras.gr/~robgroup _____ avast! Antivirus <http://www.avast.com> : Outbound message clean. Virus Database (VPS): 0657-0, 12/12/2006 Tested on: 13/12/2006 12:05:43 ?? avast! - copyright (c) 1988-2006 ALWIL Software. _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives