summaryrefslogtreecommitdiff
path: root/src/bin/evas
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-01-13 15:06:48 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-01-14 14:23:04 +0900
commit038f4b4fcf468bec2324c72b31668a9cc39c9d74 (patch)
treeb046bb6855664af8bc41d90e9765110f23ad8e72 /src/bin/evas
parent6a4c84a6a48a7d02c52a1556b0ab6ded6c2de081 (diff)
Evas/cserve2: Reduce error logs on invalid glyph load
Change message level from ERR to WRN, when a glyph is not loadable because FT fails to load it or it contains 0 pixel. cserve2 used to complain about invalid glyph 3, on a few fonts
Diffstat (limited to 'src/bin/evas')
-rw-r--r--src/bin/evas/evas_cserve2_fonts.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/evas/evas_cserve2_fonts.c b/src/bin/evas/evas_cserve2_fonts.c
index a13630b2d9..006bf27538 100644
--- a/src/bin/evas/evas_cserve2_fonts.c
+++ b/src/bin/evas/evas_cserve2_fonts.c
@@ -329,6 +329,7 @@ _font_slave_glyph_render(Font_Info *fi, Slave_Msg_Font_Glyphs_Loaded *response,
329 FT_BitmapGlyph bglyph; 329 FT_BitmapGlyph bglyph;
330 char *data; 330 char *data;
331 int buffer_id = 0; 331 int buffer_id = 0;
332 Eina_Bool valid = EINA_FALSE;
332 void *buf; 333 void *buf;
333 334
334 FT_Get_Glyph(fsi->face->glyph, &glyph); 335 FT_Get_Glyph(fsi->face->glyph, &glyph);
@@ -342,6 +343,7 @@ _font_slave_glyph_render(Font_Info *fi, Slave_Msg_Font_Glyphs_Loaded *response,
342 } 343 }
343 glyphsize = bglyph->bitmap.pitch * bglyph->bitmap.rows; 344 glyphsize = bglyph->bitmap.pitch * bglyph->bitmap.rows;
344 345
346 valid = EINA_TRUE;
345 buf = evas_common_font_glyph_compress(bglyph->bitmap.buffer, 347 buf = evas_common_font_glyph_compress(bglyph->bitmap.buffer,
346 bglyph->bitmap.num_grays, 348 bglyph->bitmap.num_grays,
347 bglyph->bitmap.pixel_mode, 349 bglyph->bitmap.pixel_mode,
@@ -384,7 +386,10 @@ _font_slave_glyph_render(Font_Info *fi, Slave_Msg_Font_Glyphs_Loaded *response,
384on_error: 386on_error:
385 // Create invalid entry for this index. There will be an empty slot in 387 // Create invalid entry for this index. There will be an empty slot in
386 // the mempool (usually 8 bytes) because we need the Glyph_Data index entry. 388 // the mempool (usually 8 bytes) because we need the Glyph_Data index entry.
387 ERR("Could not load glyph %d. Creating empty invalid entry.", idx); 389 if (valid)
390 ERR("Failed to load glyph %d. Running out of memory?", idx);
391 else
392 WRN("Could not load glyph %d. Creating empty invalid entry.", idx);
388 memset(&response->glyphs[response->nglyphs], 0, sizeof(Slave_Msg_Glyph)); 393 memset(&response->glyphs[response->nglyphs], 0, sizeof(Slave_Msg_Glyph));
389 if (buffer_id > 0) 394 if (buffer_id > 0)
390 cserve2_shared_mempool_buffer_del(response->mempool, buffer_id); 395 cserve2_shared_mempool_buffer_del(response->mempool, buffer_id);