summaryrefslogtreecommitdiff
path: root/src/lib/evas/cserve2/evas_cs2_client.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2013-09-02 16:17:05 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2013-10-28 15:47:15 +0900
commit808c20f9896d4a92f15a653dd23d7e9088ab84d6 (patch)
tree8eff7c3036b8cd770955d2a1dfc3209c14744a5f /src/lib/evas/cserve2/evas_cs2_client.c
parenta7b3f7efd3bf7291109131db7fb694c8eef72248 (diff)
evas/cserve2: Fix font hinting
cserve2 was not handling font hints properly in the server side Add some consistency checks and separate glyphs per hinting value
Diffstat (limited to '')
-rw-r--r--src/lib/evas/cserve2/evas_cs2_client.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/evas/cserve2/evas_cs2_client.c b/src/lib/evas/cserve2/evas_cs2_client.c
index 1538b4967b..e32dc1d684 100644
--- a/src/lib/evas/cserve2/evas_cs2_client.c
+++ b/src/lib/evas/cserve2/evas_cs2_client.c
@@ -1434,6 +1434,7 @@ _font_entry_glyph_map_rebuild_check(Font_Entry *fe, Font_Hint_Flags hints)
1434 gd = &(fe->map->index.entries.gldata[k]); 1434 gd = &(fe->map->index.entries.gldata[k]);
1435 if (!gd->id) break; 1435 if (!gd->id) break;
1436 if (!gd->refcount) continue; 1436 if (!gd->refcount) continue;
1437 if (gd->hint != hints) continue;
1437 1438
1438 tot++; 1439 tot++;
1439 gl = fash_gl_find(fe->fash[hints], gd->index); 1440 gl = fash_gl_find(fe->fash[hints], gd->index);
@@ -1523,7 +1524,7 @@ _glyph_request_cb(void *data, const void *msg, int size)
1523 for (i = 0; i < nglyphs; i++) 1524 for (i = 0; i < nglyphs; i++)
1524 { 1525 {
1525 string_t shm_id; 1526 string_t shm_id;
1526 unsigned int idx, offset, glsize; 1527 unsigned int idx, offset, glsize, hints;
1527 int rows, width, pitch, num_grays, pixel_mode; 1528 int rows, width, pitch, num_grays, pixel_mode;
1528 CS_Glyph_Out *gl; 1529 CS_Glyph_Out *gl;
1529 1530
@@ -1549,8 +1550,15 @@ _glyph_request_cb(void *data, const void *msg, int size)
1549 buf += sizeof(int); 1550 buf += sizeof(int);
1550 memcpy(&pixel_mode, buf, sizeof(int)); 1551 memcpy(&pixel_mode, buf, sizeof(int));
1551 buf += sizeof(int); 1552 buf += sizeof(int);
1553 memcpy(&hints, buf, sizeof(int));
1554 buf += sizeof(int);
1555 if (hints != grd->hints)
1556 {
1557 WRN("Invalid hints received: %d vs %d. Skip.", hints, grd->hints);
1558 continue;
1559 }
1552 1560
1553 gl = fash_gl_find(fe->fash[grd->hints], idx); 1561 gl = fash_gl_find(fe->fash[hints], idx);
1554 if (gl) 1562 if (gl)
1555 { 1563 {
1556 gl->map = fe->map; 1564 gl->map = fe->map;