25.2 Population

Once created, characters can be added to the fz_text object either singly:

/* 
   fz_show_glyph: Add a glyph/unicode value to a text object. 
 
   text: Text object to add to. 
 
   font: The font the glyph should be added in. 
 
   trm: The transform to use for the glyph. 
 
   glyph: The glyph id to add. 
 
   unicode: The unicode character for the glyph. 
 
   wmode: 1 for vertical mode, 0 for horizontal. 
 
   bidi_level: The bidirectional level for this glyph. 
 
   markup_dir: The direction of the text as specified in the 
   markup. 
 
   language: The language in use (if known, 0 otherwise) 
   (e.g. FZ_LANG_zh_Hans). 
 
   Throws exception on failure to allocate. 
*/ 
void fz_show_glyph(fz_context *ctx, fz_text *text, fz_font *font, const fz_matrix *trm, int glyph, int unicode, int wmode, int bidi_level, fz_bidi_direction markup_dir, fz_text_language language);

or a (unicode) string at a time:

/* 
   fz_show_string: Add a UTF8 string to a text object. 
 
   text: Text object to add to. 
 
   font: The font the string should be added in. 
 
   trm: The transform to use. Will be updated according 
   to the advance of the string on exit. 
 
   s: The utf-8 string to add. 
 
   wmode: 1 for vertical mode, 0 for horizontal. 
 
   bidi_level: The bidirectional level for this glyph. 
 
   markup_dir: The direction of the text as specified in the 
   markup. 
 
   language: The language in use (if known, 0 otherwise) 
   (e.g. FZ_LANG_zh_Hans). 
 
   Throws exception on failure to allocate. 
*/ 
void fz_show_string(fz_context *ctx, fz_text *text, fz_font *font, fz_matrix *trm, const char *s, int wmode, int bidi_level, fz_bidi_direction markup_dir, fz_text_language language);