Page 1 of 1

Cleartype disable option

PostPosted: Sun Aug 30, 2009 10:45 am
by HPW
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;

PostPosted: Mon Aug 31, 2009 10:14 am
by Neosoft Support
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.