Evas_Font_Description *fdesc;
fdesc = calloc(1, sizeof(*fdesc));
fdesc->ref = 1;
- fdesc->new = EINA_TRUE;
+ fdesc->is_new = EINA_TRUE;
return fdesc;
}
new = evas_font_desc_new();
memcpy(new, fdesc, sizeof(*new));
new->ref = 1;
- new->new = EINA_TRUE;
+ new->is_new = EINA_TRUE;
new->name = eina_stringshare_ref(new->name);
return new;
Font_Rend_Flags wanted_rend = 0;
if (!fdesc) return NULL;
- fdesc->new = EINA_FALSE;
+ fdesc->is_new = EINA_FALSE;
if (fdesc->slant != EVAS_FONT_SLANT_NORMAL)
wanted_rend |= FONT_REND_SLANT;
Evas_Object_Textblock_Node_Format *format_node;
Evas_Object_Textblock_Paragraph *par;
Eina_Bool dirty : 1;
- Eina_Bool new : 1;
+ Eina_Bool is_new : 1;
};
struct _Evas_Object_Textblock_Node_Format
unsigned char anchor : 2;
Eina_Bool visible : 1;
Eina_Bool format_change : 1;
- Eina_Bool new : 1;
+ Eina_Bool is_new : 1;
};
#define ANCHOR_NONE 0
{
fmt->font.fdesc = evas_font_desc_new();
}
- else if (!fmt->font.fdesc->new)
+ else if (!fmt->font.fdesc->is_new)
{
Evas_Font_Description *old = fmt->font.fdesc;
fmt->font.fdesc = evas_font_desc_dup(fmt->font.fdesc);
{
/* Skip this paragraph if width is the same, there is no ellipsis
* and we aren't just calculating. */
- if (!c->par->text_node->new && !c->par->text_node->dirty &&
+ if (!c->par->text_node->is_new && !c->par->text_node->dirty &&
!c->width_changed && c->par->lines &&
!c->o->have_ellipsis)
{
return 0;
}
c->par->text_node->dirty = EINA_FALSE;
- c->par->text_node->new = EINA_FALSE;
+ c->par->text_node->is_new = EINA_FALSE;
c->par->rendered = EINA_FALSE;
/* Merge back and clear the paragraph */
int balance = 0;
while (fnode)
{
- if (fnode->new)
+ if (fnode->is_new)
{
const char *fstr = fnode->orig_format;
/* balance < 0 means we gave up and everything should be
/* If it's not a new paragraph, either update it or skip it.
* Remove all the paragraphs that were deleted */
- if (!n->new)
+ if (!n->is_new)
{
/* Remove all the deleted paragraphs at this point */
while (c->par->text_node != n)
{
off = 0;
}
- fnode->new = EINA_FALSE;
+ fnode->is_new = EINA_FALSE;
fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next);
}
_layout_text_append(c, c->fmt, n, start, -1, o->repch);
to->par->text_node = NULL;
to->par = NULL;
- to->new = EINA_TRUE;
+ to->is_new = EINA_TRUE;
_evas_textblock_cursors_set_node(o, from, to);
_evas_textblock_node_text_remove(o, from);
n->unicode = eina_ustrbuf_new();
/* We want to layout each paragraph at least once. */
n->dirty = EINA_TRUE;
- n->new = EINA_TRUE;
+ n->is_new = EINA_TRUE;
return n;
}
{
o->anchors_item = eina_list_append(o->anchors_item, n);
}
- n->new = EINA_TRUE;
+ n->is_new = EINA_TRUE;
return n;
}
{
/* Handle visible format nodes here */
cur->node->dirty = EINA_TRUE;
- n->new = EINA_FALSE;
+ n->is_new = EINA_FALSE;
}
}
else
Evas_Coord x1, w1, x2, w2;
Evas_Coord x, w, y, h;
Evas_Object_Textblock_Text_Item *ti;
- int ret;
+ int ret = 0;
ti = _ITEM_TEXT(it1);
- ret = cur->ENFN->font_pen_coords_get(cur->ENDT,
- ti->parent.format->font.font,
- &ti->text_props,
- start,
- &x1, &y, &w1, &h);
+ if (ti->parent.format->font.font)
+ {
+ ret = cur->ENFN->font_pen_coords_get(cur->ENDT,
+ ti->parent.format->font.font,
+ &ti->text_props,
+ start,
+ &x1, &y, &w1, &h);
+ }
if (!ret)
{
return NULL;