forked from enlightenment/efl
elementary/font - actually it doesnt append the font to the hash when font_hash is created inside.
now it is fixed. SVN revision: 70620
This commit is contained in:
parent
80871f4ace
commit
74011c6181
|
@ -39,23 +39,24 @@ _elm_font_properties_get(Eina_Hash **font_hash,
|
||||||
strncpy(name, font, len);
|
strncpy(name, font, len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strncmp(s1, ELM_FONT_TOKEN_STYLE, strlen(ELM_FONT_TOKEN_STYLE)))
|
if (!strncmp(s1, ELM_FONT_TOKEN_STYLE, strlen(ELM_FONT_TOKEN_STYLE)))
|
||||||
{
|
{
|
||||||
style = s1 + strlen(ELM_FONT_TOKEN_STYLE);
|
style = s1 + strlen(ELM_FONT_TOKEN_STYLE);
|
||||||
|
|
||||||
if (font_hash) efp = eina_hash_find(*font_hash, name);
|
if (font_hash)
|
||||||
if (!efp)
|
|
||||||
{
|
{
|
||||||
efp = calloc(1, sizeof(Elm_Font_Properties));
|
efp = eina_hash_find(*font_hash, name);
|
||||||
if (efp)
|
if (!efp)
|
||||||
{
|
{
|
||||||
efp->name = eina_stringshare_add(name);
|
efp = calloc(1, sizeof(Elm_Font_Properties));
|
||||||
if ((font_hash && !*font_hash))
|
if (efp)
|
||||||
{
|
{
|
||||||
*font_hash = eina_hash_string_superfast_new(NULL);
|
efp->name = eina_stringshare_add(name);
|
||||||
|
if (!*font_hash)
|
||||||
|
*font_hash = eina_hash_string_superfast_new(NULL);
|
||||||
eina_hash_add(*font_hash, name, efp);
|
eina_hash_add(*font_hash, name, efp);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
s2 = strchr(style, ',');
|
s2 = strchr(style, ',');
|
||||||
|
@ -82,19 +83,14 @@ _elm_font_properties_get(Eina_Hash **font_hash,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (font_hash) efp = eina_hash_find(*font_hash, font);
|
if ((font_hash) && (!eina_hash_find(*font_hash, font)))
|
||||||
if (!efp)
|
|
||||||
{
|
{
|
||||||
efp = calloc(1, sizeof(Elm_Font_Properties));
|
efp = calloc(1, sizeof(Elm_Font_Properties));
|
||||||
if (efp)
|
if (!efp) return NULL;
|
||||||
{
|
|
||||||
efp->name = eina_stringshare_add(font);
|
efp->name = eina_stringshare_add(font);
|
||||||
if (font_hash && !*font_hash)
|
if (!*font_hash) *font_hash = eina_hash_string_superfast_new(NULL);
|
||||||
{
|
eina_hash_add(*font_hash, font, efp);
|
||||||
*font_hash = eina_hash_string_superfast_new(NULL);
|
|
||||||
eina_hash_add(*font_hash, font, efp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return efp;
|
return efp;
|
||||||
|
|
Loading…
Reference in New Issue