anchor.diff:    lOffset := 0;
   
     { syntax highlighting for: keywords }
  -  newfont := fpgGetFont(edt.FontDesc + ':bold');
  -  ACanvas.Font := newfont;
  +  if not Assigned(FKeywordFont) then
  +    FKeywordFont := fpgGetFont(edt.FontDesc + ':bold');
  +  ACanvas.Font := FKeywordFont;
     FRegex.Expression := cKeywords;
     FRegex.ModifierI := True;
     if FRegex.Exec(ALineText) then
  
positive.code:   ALineIndex: Integer; ACanvas: TfpgCanvas; ATextRect: TfpgRect;
    var AllowSelfDraw: Boolean);
  var
    oldfont, newfont: TfpgFont;
    s: TfpgString;  // copy of ALineText we work with
    i, j, c: integer;  // i = position of reserved word; c = last character pos
    iLength: integer; // length of reserved word
  
negative.code: destructor TMainForm.Destroy;
  begin
    FRegex.Free;
    FKeywordFont.Free;
    inherited Destroy;
  end;
  
  