Source language: Translate to:

Cleartype disable option

General questions about using NeoPaint

Moderator: Neosoft Support

Cleartype disable option

Postby HPW » Sun Aug 30, 2009 10:45 am

In neopaint cleartype seems to be used when it is enabled.

It would be a good addition when we could get another options checkbox to enable/disable the use of cleartype.

In a german delphi forum I saw this code which might help:

Code: Select all
procedure ChangeCleartype(canvas:Tcanvas;ClearType:boolean);
var
  lf: TLogFont;
  tf: TFont;
begin
  tf := Tfont.create;
  try
    tf.Assign(canvas.font);
    GetObject(tf.Handle, sizeof(lf), @lf);
    if ClearType then
      lf.lfQuality := DEFAULT_QUALITY
    else
      lf.lfQuality := NONANTIALIASED_QUALITY;
    tf.Handle := CreateFontIndirect(lf);
    canvas.font.assign(tf);
  finally
    tf.Free;
  end;
end;
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby Neosoft Support » Mon Aug 31, 2009 10:14 am

Thank you for the suggestions and the code sample. I'll add this to the list of things to look into for the next update.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5602
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to General NeoPaint Discussion

Who is online

Users browsing this forum: No registered users and 2 guests