summaryrefslogtreecommitdiff
path: root/src/lib/evas/common/evas_font_main.c
diff options
context:
space:
mode:
authorsubhransu mohanty <sub.mohanty@samsung.com>2017-11-07 11:22:09 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-11-07 11:34:53 +0900
commitb038d7df25f9cecaa4f0d8c1c7355e4852e5348a (patch)
tree595da7d0114056e147d4a40fedc72d5b71b3927a /src/lib/evas/common/evas_font_main.c
parenta75b3dcdfbe0760972c8b4d55a90dc6250bd1e45 (diff)
Remove evas internal dependency from the evas_font module
Summary: dev branch : devs/subhransu/font The Final goal is to move the evas_font module to ector so that both ector and evas can reuse the code. make the api simple so that sam eapi can be used by evas_textblock and ector text. This is the 1st stage to achive that gola, first remove the evas internal dependancy as much as possible before moving to ector library. Reviewers: jpeg, raster, herdsman, cedric, id213sin Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D5419
Diffstat (limited to '')
-rw-r--r--src/lib/evas/common/evas_font_main.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/evas/common/evas_font_main.c b/src/lib/evas/common/evas_font_main.c
index c156bd7477..ef2c588668 100644
--- a/src/lib/evas/common/evas_font_main.c
+++ b/src/lib/evas/common/evas_font_main.c
@@ -1,12 +1,3 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif
4
5#include <assert.h>
6
7#include "evas_common_private.h"
8#include "evas_private.h"
9
10#include "evas_font_private.h" 1#include "evas_font_private.h"
11 2
12#ifdef EVAS_CSERVE2 3#ifdef EVAS_CSERVE2
@@ -25,6 +16,8 @@ LK(lock_font_draw); // for freetype2 API calls
25LK(lock_bidi); // for evas bidi internal usage. 16LK(lock_bidi); // for evas bidi internal usage.
26LK(lock_ot); // for evas bidi internal usage. 17LK(lock_ot); // for evas bidi internal usage.
27 18
19int _evas_font_log_dom_global = -1;
20
28EAPI void 21EAPI void
29evas_common_font_init(void) 22evas_common_font_init(void)
30{ 23{
@@ -36,6 +29,12 @@ evas_common_font_init(void)
36#else 29#else
37 35; 30 35;
38#endif 31#endif
32 _evas_font_log_dom_global = eina_log_domain_register
33 ("evas_font_main", EVAS_FONT_DEFAULT_LOG_COLOR);
34 if (_evas_font_log_dom_global < 0)
35 {
36 EINA_LOG_ERR("Can not create a module log domain.");
37 }
39 38
40 initialised++; 39 initialised++;
41 if (initialised != 1) return; 40 if (initialised != 1) return;
@@ -77,6 +76,7 @@ evas_common_font_shutdown(void)
77 LKD(lock_font_draw); 76 LKD(lock_font_draw);
78 LKD(lock_bidi); 77 LKD(lock_bidi);
79 LKD(lock_ot); 78 LKD(lock_ot);
79 eina_log_domain_unregister(_evas_font_log_dom_global);
80} 80}
81 81
82EAPI void 82EAPI void
@@ -681,7 +681,7 @@ evas_common_font_int_cache_glyph_render(RGBA_Font_Glyph *fg)
681 fg->glyph_out->bitmap.pitch = fbg->bitmap.pitch; 681 fg->glyph_out->bitmap.pitch = fbg->bitmap.pitch;
682 fg->glyph_out->bitmap.buffer = fbg->bitmap.buffer; 682 fg->glyph_out->bitmap.buffer = fbg->bitmap.buffer;
683 fg->glyph_out->bitmap.rle_alloc = EINA_TRUE; 683 fg->glyph_out->bitmap.rle_alloc = EINA_TRUE;
684 684
685 /* This '+ 100' is just an estimation of how much memory freetype will use 685 /* This '+ 100' is just an estimation of how much memory freetype will use
686 * on it's size. This value is not really used anywhere in code - it's 686 * on it's size. This value is not really used anywhere in code - it's
687 * only for statistics. */ 687 * only for statistics. */
@@ -709,7 +709,7 @@ evas_common_font_int_cache_glyph_render(RGBA_Font_Glyph *fg)
709 fg->glyph_out->rle = NULL; 709 fg->glyph_out->rle = NULL;
710 fg->glyph_out->bitmap.rle_alloc = EINA_FALSE; 710 fg->glyph_out->bitmap.rle_alloc = EINA_FALSE;
711 } 711 }
712 712
713 return EINA_TRUE; 713 return EINA_TRUE;
714} 714}
715 715
@@ -805,11 +805,11 @@ evas_common_get_char_index(RGBA_Font_Int* fi, Eina_Unicode gl)
805 // codepoints with a guess that bitmap font is playing the old 805 // codepoints with a guess that bitmap font is playing the old
806 // game of putting line drawing chars in specific ranges 806 // game of putting line drawing chars in specific ranges
807 max = sizeof(mapfix) / (sizeof(mapfix[0]) * 2); 807 max = sizeof(mapfix) / (sizeof(mapfix[0]) * 2);
808 i = (min + max) / 2; 808 i = (min + max) / 2;
809 for (;;) 809 for (;;)
810 { 810 {
811 unsigned short v; 811 unsigned short v;
812 812
813 v = mapfix[i << 1]; 813 v = mapfix[i << 1];
814 if (gl == v) 814 if (gl == v)
815 { 815 {
@@ -867,7 +867,7 @@ evas_common_font_glyph_search(RGBA_Font *fn, RGBA_Font_Int **fi_ret, Eina_Unicod
867 fi = l->data; 867 fi = l->data;
868 868
869#if 0 /* FIXME: charmap user is disabled and use a deprecated data type. */ 869#if 0 /* FIXME: charmap user is disabled and use a deprecated data type. */
870/* 870/*
871 if (fi->src->charmap) // Charmap loaded, FI/FS blank 871 if (fi->src->charmap) // Charmap loaded, FI/FS blank
872 { 872 {
873 idx = evas_array_hash_search(fi->src->charmap, gl); 873 idx = evas_array_hash_search(fi->src->charmap, gl);