title: FreeType: how to rasterize non-filled outline
body: <p>I'm currently trying to create glyph bitmap which contains only outside border of the glyph, without any filling inside. Using FreeType library for this. Here is my code which is similar to example 2 code from FreeType reference:</p>
  
  <pre><code>Spans outlineSpans;
  FT_Stroker stroker;
  FT_Stroker_New(ft, &amp;stroker);
  FT_Stroker_Set(stroker, outlineWidth, round ? FT_STROKER_LINECAP_ROUND : FT_STROKER_LINECAP_SQUARE, round ? FT_STROKER_LINEJOIN_ROUND : FT_STROKER_LINEJOIN_BEVEL, 0);
  
  FT_Glyph g;
  FT_Get_Glyph(currentFace-&gt;glyph, &amp;g);
  FT_Glyph_StrokeBorder(&amp;g, stroker, 0, 1);
  
  FT_Raster_Params params;
  memset(&amp;params, 0, sizeof(params));
  params.flags = FT_RASTER_FLAG_AA | FT_RASTER_FLAG_DIRECT;
  params.gray_spans = RasterCallback;
  params.user = &amp;outlineSpans;
  outlineSpans.clear();
  FT_Outline *o = &amp;reinterpret_cast&lt;FT_OutlineGlyph&gt;(g)-&gt;outline;
  int err = FT_Outline_Render(ft, o, &amp;params);
  
  FT_Stroker_Done(stroker);
  FT_Done_Glyph(g);
  </code></pre>
  
  <p>As result I get <code>outlineSpans</code> vector filled with spans for the whole glyph image, but I need only the "border" to be rasterized.
  <code>CurrentFace-&gt;glyph</code> contains the glyph which I loaded using <code>FT_Load_Char(currentFace, *ch, FT_LOAD_NO_BITMAP))</code>
  What am I doing wrong? Thanks for any help, there is not so much documentation/examples about FreeType in the net.</p>