anchor.diff:      if pX + Letters[I].Width + PAD > fTexSizeX then
       begin
         pX := PAD;
  -      Inc(pY, MaxHeight + PAD);
  +      Inc(pY, maxHeight + PAD);
       end;
   
       //Fill in colors
  
positive.code: end;
  
  
  //Generate color texture from prepared data
  procedure TKMFontSpec.GenerateTextures(aTexMode: TTexFormat);
  var
    I: Integer;
    TextureRAM: Cardinal;
  begin
    TextureRAM := 0;
    for I := 0 to fAtlasCount - 1 do
      if fAtlases[I].TexID = 0 then //Don't load atlases twice if switching from minimal to full
        if Length(fAtlases[I].TexData) <> 0 then
        begin
          fAtlases[I].TexID := TRender.GenTexture(fTexSizeX, fTexSizeY, @fAtlases[I].TexData[0], aTexMode, ftNearest, ftNearest);
          Inc(TextureRAM, fTexSizeX * fTexSizeY * TEX_FORMAT_SIZE[aTexMode]);
        end
        else
          fAtlases[I].TexID := 0;
  
    if LOG_EXTRA_FONTS then
      gLog.AddNoTime( 'Font RAM usage: '+IntToStr(TextureRAM));
  end;
  
  
  
negative.code: end;
  
  
  { TKMResFonts }
  constructor TKMResFonts.Create;
  var
    F: TKMFont;
  