Can I use FreeType to draw text on a pixmap with arbitrary depth?
Not directly, as FreeType is a font library, not a general-purpose graphics library or text rendering service. However, note that the anti-aliased renderer allows you to convert a vectorial glyph outline into a list of ‘spans’ (i.e., horizontal pixel segments with the same coverage) that can be rendered through user-provided callbacks. By providing the appropriate span callback, you can render anti-aliased text to any kind of surface. You can also use any colour, fill pattern or fill image if you want to. This process is called direct rendering. FT_Raster_Params params; FT_Outline outline; … load vectorial glyph in ‘outline’ … params.flags = FT_RASTER_FLAG_AA | FT_RASTER_FLAG_DIRECT; params.gray_spans = (FT_Raster_Span_Func)your_own_span_function; params.user = your_own_data_pointer; error = FT_Outline_Render( library, &outline, ¶ms ); Note that direct rendering is not available with monochrome output, as the current renderer uses a two-pass algorithm to generate glyphs with co