Recent

Author Topic: Light LCL (LLCL) - Small Windows executable files v1.02  (Read 34289 times)

RAW

  • Hero Member
  • *****
  • Posts: 867
Re: Light LCL (LLCL) - Small Windows executable files v1.02
« Reply #75 on: August 18, 2016, 09:41:37 am »
Quote
Do you mean, by using the Quality method of the corresponding TFont class ? Have I correctly understood your question ?
Yes, that's what I meant... I know there is no Quality-Option.

I tried to do it on Windows the "Delphi7-Way":
Code: Pascal  [Select][+][-]
  1. Procedure AAFont(ObjFont: TFont);
  2.   Var
  3.    LogFont: TLogFont;
  4.  Begin
  5.   GetObject(ObjFont.Handle, SizeOf(TLogFont), @LogFont);
  6.   LogFont.lfQuality:= ANTIALIASED_QUALITY;
  7.   ObjFont.Handle:= CreateFontIndirect(LogFont);
  8.  End;
  9.  
But then I got an Error at Position ObjFont.Handle... "No Member is provided to access property"...
I thought there is perhaps a trick or hack to get it done...  :D
Windows 7 Pro (x64 Sp1) And Windows XP Pro (x86 Sp3) - LAZARUS 2.0.8 FPC 3.0.4 - TRUNK 2.1.0 FPC 3.3.1
// This is polarity (hell) and hell is reigned by lies, nothing but lies. Be careful what you believe ...
// There are 10 types of people in this world, those who understand mind control and ...

ChrisF

  • Hero Member
  • *****
  • Posts: 542
Re: Light LCL (LLCL) - Small Windows executable files v1.02
« Reply #76 on: August 18, 2016, 10:41:24 pm »
Ah yes, Handle is read-only for TFont in the Light LCL.

I could make it writeable but anyway, due to some other LLCL "particularities", it won't be sufficient: some additional code would be needed in your case.

I guess it would be simpler to implement the Quality property of TFont; at least as a design-time property (as for all the other TFont properties).


You can make a test with the attached file if you wish: just replace the "Graphics.pas" unit of the Light LCL (version 1.02) with this one. Then, if you modify the Font Quality property for your concerned control(s) in the Lazarus IDE, it should now be taken into account when you run your LLCL project.

If it's OK, I may add it in the next version of the Light LCL. But in this case, please note that it will be most probably implemented as an option (i.e. as a "define" in the usual "LLCLOptions.inc" option file), not as an standard.


I'm just a bit curious: in which case(s) did you really see a noticeable difference when modifying this Quality property ?

RAW

  • Hero Member
  • *****
  • Posts: 867
Re: Light LCL (LLCL) - Small Windows executable files v1.02
« Reply #77 on: August 18, 2016, 11:54:24 pm »
Very kind of you... thank you very much ...

I did a short test and it's working very good so far...  :)
Quote
...(i.e. as a "define" in the usual "LLCLOptions.inc" option file)
No problem at all...

Quote
...did you really see a noticeable difference...
See for yourselve... (attachment..)
I know it probably depends on what font size and what kind of font you are using...
And of course it's a matter of individual taste I guess...

I like it with AA...  :D
Windows 7 Pro (x64 Sp1) And Windows XP Pro (x86 Sp3) - LAZARUS 2.0.8 FPC 3.0.4 - TRUNK 2.1.0 FPC 3.3.1
// This is polarity (hell) and hell is reigned by lies, nothing but lies. Be careful what you believe ...
// There are 10 types of people in this world, those who understand mind control and ...

ChrisF

  • Hero Member
  • *****
  • Posts: 542
Re: Light LCL (LLCL) - Small Windows executable files v1.02
« Reply #78 on: August 19, 2016, 02:29:12 pm »
Quote
See for yourselve... (attachment..)

Effectively, there is a difference.


OK, this option will be included into the next release of the Light LCL.

 

TinyPortal © 2005-2018