TTF_SetFontOutline + TTF_Render = random behavior?

hello, I have a problem with SDL ttf i’m trying to blit the same line of text with several colors and an outline on a single surface. I made this code and here is the result:
846746bug
An other exemple without animation(the B diseapered)
https://www.developpez.net/forums/attachments/p309824d1504718165/applications/developpement-2d-3d-jeux/api-graphiques/sdl/ttf_setfontoutline-p-ttf_render-comportement-aleatoire/157195sanstitre.png/
(new user can only put 1 img sorry)

In the first exemple the white color is the first in the lopp and then the bleu and then the others are empty, but the behavior is random, sometime it miss some letter some other time line are empty, sometime the text look like nothing etc. But when the text is not displayed i get the message : “text has zero width” even if the Uint16* line is constant.

it does that only with the fonction TTF_SetFontOutline so I think there is a behavier wich i’m not aware of . If someone could help me I would be gratefull. Thank in advance.

here is the code:
SDL_Surface* sfTarget = RGBA_Surface(width,height);

  for(int i=0;i<font->colors.size();i++) // on blite le texte pour chaque couleur sur sfTarget
    {
      int vPos = 0;
      SDL_Surface* sf = TTF_RenderUNICODE_Solid(font->font,line,
						font->colors[i]); 
      if(font->outlineSize>0)
	{
	  TTF_SetFontOutline(font->font,font->outlineSize);
	  SDL_Surface* outlineSf = TTF_RenderUNICODE_Solid(font->font,line,
							   font->outlineColors[i]);
	  if(outlineSf)
	    {
	      vPos = outlineSf->h * i;
	      SDL_Rect dstRct = {0,vPos,0,0};
	      SDL_BlitSurface(outlineSf,NULL,sfTarget,&dstRct);
	      SDL_FreeSurface(outlineSf);
	    }
	  else
	    {
	      //Print_UNICODE(line);
	      std::cout << TTF_GetError() << std::endl;
	    }
    	  TTF_SetFontOutline(font->font,0);
	}
      if(sf)
	{
	  if(!font->outlineSize)
	      vPos = sf->h * i;
	  SDL_Rect dstRct = {font->outlineSize,vPos+font->outlineSize,0,0};
	  SDL_BlitSurface(sf,NULL,sfTarget,&dstRct);
	  SDL_FreeSurface(sf);
	}
      else
	{
	  //Print_UNICODE(line);
	  std::cout << TTF_GetError() << std::endl;
	}
    }

Hello I have shorten my code, still same problem, and error message: "Text has zero size"
with an other ttf the line is displayed but without some char

  SDL_Surface* targetSf = RGBA_Surface(rct.w,rct.h);

  TTF_SetFontOutline(font,outlineSize);
  SDL_Surface* olSf=TTF_RenderUNICODE_Solid(font,line,outlineColor);
  if(!olSf)
	std::cout << TTF_GetError() << std::endl;
  SDL_Rect olRctDst = {0,0,0,0};
  SDL_BlitSurface(olSf,NULL,targetSf,&olRctDst);
  SDL_FreeSurface(olSf);
  TTF_SetFontOutline(font,0);
  
  SDL_Surface* sf = TTF_RenderUNICODE_Solid(font,line,color);
  SDL_Rect rctDst = {outlineSize,outlineSize,0,0};
  SDL_BlitSurface(sf,NULL,targetSf,&rctDst);
  SDL_FreeSurface(sf);