-static struct xr_render_fsm *
-xr_create_text_renderer (struct xr_driver *xr, const struct text_item *item)
-{
- struct tab_table *tab = tab_create (1, 1);
-
- struct cell_style *style = pool_alloc (tab->container, sizeof *style);
- *style = (struct cell_style) CELL_STYLE_INITIALIZER;
- if (item->font)
- style->font = pool_strdup (tab->container, item->font);
- style->font_size = item->font_size;
- style->bold = item->bold;
- style->italic = item->italic;
- style->underline = item->underline;
- tab->styles[0] = style;
-
- tab_text (tab, 0, 0, TAB_LEFT, text_item_get_text (item));
- struct table_item *table_item = table_item_create (&tab->table, NULL, NULL);
- struct xr_render_fsm *fsm = xr_render_table (xr, table_item);
- table_item_unref (table_item);
-
- return fsm;
-}
-