anchor.diff:      ahLeft: Point.X := 0;
   	ahCenter: Point.X := (Surface.SDL_Surface.w - GetWidth(Text)) div 2;
   	ahRight: Point.X := Surface.SDL_Surface.w - GetWidth(Text);
  -  end;
  -
  -  SFont_Write2(Surface.SDL_Surface, @FFontInfo, Point.X, Point.Y, PChar(Text));
  +  end;*)
   end;
   
   end.
  
positive.code:   inherited Destroy;
  end;
  
  procedure TelBitmapFont.LoadFromFile(Filename: String);
  var Directory: String;
  begin
    if Filename <> '' then
    begin
      Directory := ExtractFilePath(ParamStr(0));
  
      if FileExists(Filename) then
      begin
        {$IFDEF USE_SDL_IMAGE}
  	    FFontInfo.Surface := IMG_Load(PChar(Directory + Filename));
  	  {$ENDIF}
  	  {$IFDEF USE_VAMPYRE}
  	    FFontInfo.Surface := LoadSDLSurfaceFromFile(Directory+Application.ContentPath+FileName);
  	  {$ENDIF}
        SFont_InitFont2(@FFontInfo);
      {$IFNDEF USE_LOGGER}
  	  end;
      {$ELSE}
      end else TelLogger.GetInstance.WriteLog('File not found: '+Directory+Application.ContentPath+FileName, ltError);
      {$ENDIF}
    {$IFNDEF USE_LOGGER}
    end;
    {$ELSE}
    end else TelLogger.GetInstance.WriteLog('No filename specifies.', ltError);
    {$ENDIF}
  
  end;
  
  procedure TelBitmapFont.SetTransparency(Color: TelColor);
  begin
    if FFontInfo.Surface <> nil then
      SDL_SetColorKey(FFontInfo.Surface, SDL_SRCCOLORKEY or SDL_RLEACCEL or SDL_HWACCEL,
        SDL_MapRGB(FFontInfo.Surface.Format, Color.R, Color.G, Color.B));
  end;
  
  procedure TelBitmapFont.SetTransparency(Coord: TelVector2i);
  begin
    if FFontInfo.Surface <> nil then
      SDL_SetColorKey(FFontInfo.Surface, SDL_SRCCOLORKEY or SDL_RLEACCEL or SDL_HWACCEL,
        SDL_GetPixel(FFontInfo.Surface, Coord.X, Coord.Y));
  end;
  
  procedure TelBitmapFont.SetAlpha(Alpha: Byte);
  begin
    FAlpha := Alpha;
  end;
  
  function TelBitmapFont.GetAlpha: Byte;
  begin
    Result := FAlpha;
  end;
  
  function TelBitmapFont.GetWidth(Text: String): Integer;
  begin
    Result := SFont_TextWidth2(@FFontInfo, PChar(Text));
  end;
  
  function TelBitmapFont.GetHeight: Integer;
  begin
    Result := FFontInfo.Surface.h;
  end;
  
  procedure TelBitmapFont.TextOut(Point: TelVector2i; Text: String;  AlignV: TAlignVertical = avNone; AlignH: TAlignHorizontal = ahNone);
  begin
    if FAlpha <> 255 then SDL_SetAlpha(FFontInfo.Surface, SDL_SRCALPHA, FAlpha);
  
    case AlignV of
      avTop: Point.Y := 0;
  	avCenter: Point.Y := (Surface.SDL_Surface.h - GetHeight) div 2;
  	avButtom: Point.Y := Surface.SDL_Surface.h - GetHeight;
  
negative.code: begin
    inherited Create;
  
    fLines := 0;
    fTrim := true;
    fMargin := 2;
  end;
  
  destructor TelBitmapFont.Destroy;
  