anchor.diff:    minsz: Integer;
     i: Integer;
     n: Integer;
  -begin
  -  minsz := MAXINT;
  -  for i := 0 to FKeys.Count - 1 do
  -    if FKeys[i].KeyType <> kktNormal then
  -    begin
  -      n := FKeys[i].CalcFontSize(Canvas);
  -      if (n > 0) and (n < minsz) then
  -        minsz := n;
  -    end;
  -
  -  if minsz = MAXINT then minsz := 0;
  -  for i := 0 to FKeys.Count - 1 do
  -    if FKeys[i].KeyType <> kktNormal then
  -      FKeys[i].FontSize := minsz;
  +  Canvas: TCanvas;
  +  b: TBitmap;
  +begin
  +  b := TBitmap.Create;
  +  try
  +    minsz := MAXINT;
  +    for i := 0 to FKeys.Count - 1 do
  +      if FKeys[i].KeyType <> kktNormal then
  +      begin
  +        n := FKeys[i].CalcFontSize(b.Canvas);
  +        if (n > 0) and (n < minsz) then
  +          minsz := n;
  +      end;
  +
  +    if minsz = MAXINT then minsz := 0;
  +    for i := 0 to FKeys.Count - 1 do
  +      if FKeys[i].KeyType <> kktNormal then
  +        FKeys[i].FontSize := minsz;
  +  finally
  +    b.Free;
  +  end;
   end;
   
   procedure TOnScreenKeyboard.CreateParams(var params: TCreateParams);
  
positive.code: 
    ResizeKeys;
  
    if FDisplay102Key or FEuroLayout then
    begin
      r := Rect(k.FX, k.FY, F102Key.FX+F102Key.FW, F102Key.FY+F102Key.FH);
      FillBkRect(Canvas.Handle, r);
    end;
    DoDrawKey(Canvas, k);
    DoDrawKey(Canvas, F102Key);
  end;
  
  procedure TOnScreenKeyboard.SetDisplayUnderlyingChar(const Value: Boolean);
  
negative.code: 
    CalcKeyFontSizes;
  
    if HandleAllocated then
      InvalidateRect(Handle, nil, True);
  end;
  
  { TOnScreenKeyboardKeys }
  