2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
23 #include <sys/types.h>
32 #include <libxml/xmlmemory.h>
33 #include <libxml/parser.h>
40 #include <Ecore_Wayland.h>
43 #include <Elementary.h>
45 #include <system_settings.h>
46 #include <system_settings_private.h>
48 /* For multi-user support */
49 #include <tzplatform_config.h>
51 #define SMALL_FONT_DPI (-80)
52 #define MIDDLE_FONT_DPI (-100)
53 #define LARGE_FONT_DPI (-150)
54 #define HUGE_FONT_DPI (-190)
55 #define GIANT_FONT_DPI (-250)
57 #define SETTING_FONT_CONF_FILE tzplatform_mkpath(TZ_SYS_ETC, "fonts/conf.avail/99-slp.conf")
58 #define SETTING_STR_SLP_LEN 256
60 static char* _get_cur_font();
61 static void __font_size_set();
62 static int __font_size_get();
64 static void font_config_set(char *font_name);
65 static void font_config_set_notification();
68 * VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR has a path of the ringtone file which user choose
69 * @return the ringtone file path specified by user in normal case
70 * if it's not accessable, return the default ringtone path
72 int system_setting_get_incoming_call_ringtone(system_settings_key_e key, system_setting_data_type_e data_type, void** value)
75 if (system_setting_vconf_get_value_string(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, &vconf_value)) {
76 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
79 // check to see if it's accessable -> OK
80 // no --> default ringtone path VCONFKEY_SETAPPL_CALL_RINGTONE_DEFAULT_PATH_STR
81 int is_load = _is_file_accessible(vconf_value);
84 } else { // not zero on errro
85 //*value = vconf_get_str(VCONFKEY_SETAPPL_CALL_RINGTONE_DEFAULT_PATH_STR);
86 //*value = strdup("ERROR");
87 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
90 //*value = vconf_value;
91 return SYSTEM_SETTINGS_ERROR_NONE;
95 int system_setting_get_email_alert_ringtone(system_settings_key_e key, system_setting_data_type_e data_type, void** value)
98 if (system_setting_vconf_get_value_string(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, &vconf_value)) {
99 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
101 *value = vconf_value;
102 return SYSTEM_SETTINGS_ERROR_NONE;
106 int system_setting_get_wallpaper_home_screen(system_settings_key_e key, system_setting_data_type_e data_type, void** value)
109 if (system_setting_vconf_get_value_string(VCONFKEY_BGSET, &vconf_value)) {
110 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
112 *value = vconf_value;
113 return SYSTEM_SETTINGS_ERROR_NONE;
117 int system_setting_get_wallpaper_lock_screen(system_settings_key_e key, system_setting_data_type_e data_type, void** value)
121 if (system_setting_vconf_get_value_string(VCONFKEY_IDLE_LOCK_BGSET, &vconf_value)) {
122 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
124 *value = vconf_value;
126 return SYSTEM_SETTINGS_ERROR_NONE;
131 int system_setting_get_font_size(system_settings_key_e key, system_setting_data_type_e data_type, void** value)
135 if (system_setting_vconf_get_value_int(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, &vconf_value)) {
136 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
138 *value = (void*)vconf_value;
140 return SYSTEM_SETTINGS_ERROR_NONE;
145 int system_setting_get_font_type(system_settings_key_e key, system_setting_data_type_e data_type, void** value)
147 char* font_name = _get_cur_font();
148 *value = (void*)font_name;
150 return SYSTEM_SETTINGS_ERROR_NONE;
154 int system_setting_get_motion_activation(system_settings_key_e key, system_setting_data_type_e data_type, void** value)
158 if (system_setting_vconf_get_value_bool(VCONFKEY_SETAPPL_MOTION_ACTIVATION, &vconf_value)) {
159 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
161 *value = (void*)vconf_value;
163 return SYSTEM_SETTINGS_ERROR_NONE;
166 int system_setting_get_usb_debugging_option(system_settings_key_e key, system_setting_data_type_e data_type, void** value)
170 if (system_setting_vconf_get_value_bool(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, &vconf_value)) {
171 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
173 *value = (void*)vconf_value;
175 return SYSTEM_SETTINGS_ERROR_NONE;
178 int system_setting_get_3g_data_network(system_settings_key_e key, system_setting_data_type_e data_type, void** value)
182 if (system_setting_vconf_get_value_bool(VCONFKEY_3G_ENABLE, &vconf_value)) {
183 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
185 *value = (void*)vconf_value;
187 return SYSTEM_SETTINGS_ERROR_NONE;
189 ////////////////////////////////////////////////////////////////////////////////////////////////////
191 int system_setting_set_incoming_call_ringtone(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
194 vconf_value = (char*)value;
196 int is_load = _is_file_accessible(vconf_value);
199 if (system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, vconf_value)) {
200 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
203 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
206 return SYSTEM_SETTINGS_ERROR_NONE;
210 int system_setting_set_email_alert_ringtone(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
213 vconf_value = (char*)value;
214 if (system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, vconf_value)) {
215 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
218 return SYSTEM_SETTINGS_ERROR_NONE;
222 int _is_file_accessible(const char * path)
224 int ret = access(path ,R_OK);
227 SETTING_TRACE("found the file %s", path);
236 int system_setting_set_wallpaper_home_screen(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
239 vconf_value = (char*)value;
241 // error handling here
242 if (_is_file_accessible(vconf_value) != 0)
243 return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
245 if (system_setting_vconf_set_value_string(VCONFKEY_BGSET, vconf_value)) {
246 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
249 return SYSTEM_SETTINGS_ERROR_NONE;
252 int system_setting_set_wallpaper_lock_screen(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
255 vconf_value = (char*)value;
257 // error handling here
258 if (_is_file_accessible(vconf_value) != 0)
259 return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
261 if (system_setting_vconf_set_value_string(VCONFKEY_IDLE_LOCK_BGSET, vconf_value)) {
262 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
265 return SYSTEM_SETTINGS_ERROR_NONE;
268 int system_setting_set_font_size(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
272 vconf_value = (int*)value;
274 if (*vconf_value < 0 || *vconf_value > SYSTEM_SETTINGS_FONT_SIZE_GIANT) {
275 return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
278 if (system_setting_vconf_set_value_int(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, *vconf_value)) {
279 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
283 return SYSTEM_SETTINGS_ERROR_NONE;
288 void *font_conf_doc_parse(char *doc_name, char *font_name)
290 xmlDocPtr doc = NULL;
291 xmlNodePtr cur = NULL;
292 xmlNodePtr cur2 = NULL;
293 xmlNodePtr cur3 = NULL;
296 doc = xmlParseFile(doc_name);
298 cur = xmlDocGetRootElement(doc);
306 if(xmlStrcmp(cur->name, (const xmlChar *)"fontconfig")) {
312 cur = cur->xmlChildrenNode;
314 Eina_Bool is_changed = EINA_FALSE;
317 if((!xmlStrcmp(cur->name, (const xmlChar *)"match")))
319 cur2 = cur->xmlChildrenNode;
322 if((!xmlStrcmp(cur2->name, (const xmlChar *)"edit")))
324 xmlChar *name = xmlGetProp(cur2, (const xmlChar *)"name");
325 /* if name is not 'family', break */
326 if (xmlStrcmp(name, (const xmlChar *)"family"))
335 cur3 = cur2->xmlChildrenNode;
338 if((!xmlStrcmp(cur3->name, (const xmlChar *)"string")))
340 xmlNodeSetContent(cur3->xmlChildrenNode, (const xmlChar *)font_name);
341 key = xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1);
344 is_changed = EINA_TRUE;
351 } else if ((!xmlStrcmp(cur->name, (const xmlChar *)"alias")))
353 cur2 = cur->xmlChildrenNode;
356 if ((!xmlStrcmp(cur2->name, (const xmlChar *)"family")))
358 xmlNodeSetContent(cur2->xmlChildrenNode, (const xmlChar *)font_name);
359 key = xmlNodeListGetString(doc, cur2->xmlChildrenNode, 1);
362 is_changed = EINA_TRUE;
363 } else if ((!xmlStrcmp(cur2->name, (const xmlChar *)"prefer")))
365 cur3 = cur2->xmlChildrenNode;
368 if((!xmlStrcmp(cur3->name, (const xmlChar *)"family")))
370 xmlNodeSetContent(cur3->xmlChildrenNode, (const xmlChar *)font_name);
371 key = xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1);
374 is_changed = EINA_TRUE;
376 break; /* just set first element, so break */
396 int system_setting_set_font_type(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
398 char* font_name = NULL;
399 font_name = (char*)value;
401 font_config_set(font_name);
402 font_config_set_notification();
405 vconf_value = (char*)value;
406 if (system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, vconf_value)) {
407 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
410 xmlDocPtr doc = (xmlDocPtr)font_conf_doc_parse(SETTING_FONT_CONF_FILE, font_name);
412 xmlSaveFormatFile(SETTING_FONT_CONF_FILE, doc, 0);
417 return SYSTEM_SETTINGS_ERROR_NONE;
420 int system_setting_set_motion_activation(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
423 vconf_value = (bool*)value;
424 if (system_setting_vconf_set_value_bool(VCONFKEY_SETAPPL_MOTION_ACTIVATION, *vconf_value)) {
425 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
427 return SYSTEM_SETTINGS_ERROR_NONE;
430 int system_setting_set_usb_debugging_option(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
433 vconf_value = (bool*)value;
434 if (system_setting_vconf_set_value_bool(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, *vconf_value)) {
435 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
437 return SYSTEM_SETTINGS_ERROR_NONE;
441 int system_setting_set_3g_data_network(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
444 vconf_value = (bool*)value;
445 if (system_setting_vconf_set_value_bool(VCONFKEY_3G_ENABLE, *vconf_value)) {
446 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
448 return SYSTEM_SETTINGS_ERROR_NONE;
451 /////////////////////////////////////////////////////////////////////////////////////////////////
454 int system_setting_set_changed_callback_incoming_call_ringtone(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
456 return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE, 0, user_data);
459 int system_setting_unset_changed_callback_incoming_call_ringtone(system_settings_key_e key)
461 return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, 0);
464 int system_setting_set_changed_callback_email_alert_ringtone(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
466 return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE, 0, user_data);
469 int system_setting_unset_changed_callback_email_alert_ringtone(system_settings_key_e key)
471 return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, 0);
474 int system_setting_set_changed_callback_wallpaper_home_screen(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
476 return system_setting_vconf_set_changed_cb(VCONFKEY_BGSET, SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, 0, user_data);
479 int system_setting_unset_changed_callback_wallpaper_home_screen(system_settings_key_e key)
481 return system_setting_vconf_unset_changed_cb(VCONFKEY_BGSET, 0);
484 int system_setting_set_changed_callback_wallpaper_lock_screen(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
486 return system_setting_vconf_set_changed_cb(VCONFKEY_IDLE_LOCK_BGSET,SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, 0, user_data);
489 int system_setting_unset_changed_callback_wallpaper_lock_screen(system_settings_key_e key)
491 return system_setting_vconf_unset_changed_cb(VCONFKEY_IDLE_LOCK_BGSET, 0);
494 int system_setting_set_changed_callback_font_size(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
496 return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE,SYSTEM_SETTINGS_KEY_FONT_SIZE, 1, user_data);
499 int system_setting_unset_changed_callback_font_size(system_settings_key_e key)
501 return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, 1);
504 int system_setting_set_changed_callback_usb_debugging_option(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
506 return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL,SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED, 1, user_data);
509 int system_setting_unset_changed_callback_usb_debugging_option(system_settings_key_e key)
511 return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, 1);
514 int system_setting_set_changed_callback_3g_data_network(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
516 return system_setting_vconf_set_changed_cb(VCONFKEY_3G_ENABLE,SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, 1,user_data);
519 int system_setting_unset_changed_callback_3g_data_network(system_settings_key_e key)
521 return system_setting_vconf_unset_changed_cb(VCONFKEY_3G_ENABLE, 1);
526 * @todo need to add custom event notification method
528 int system_setting_set_changed_callback_font_type(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
530 return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME,SYSTEM_SETTINGS_KEY_FONT_TYPE, 2, user_data);
533 int system_setting_unset_changed_callback_font_type(system_settings_key_e key)
535 return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME,2);
538 // TODO : 2th argument, callback, is not in use.
539 int system_setting_set_changed_callback_motion_activation(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
541 return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_MOTION_ACTIVATION, SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, 3, user_data );
544 int system_setting_unset_changed_callback_motion_activation(system_settings_key_e key)
546 return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_MOTION_ACTIVATION, 3);
549 static char* _get_cur_font()
551 xmlDocPtr doc = NULL;
552 xmlNodePtr cur = NULL;
553 xmlNodePtr cur2 = NULL;
554 xmlNodePtr cur3 = NULL;
557 char *font_name = NULL;
559 doc = xmlParseFile(SETTING_FONT_CONF_FILE);
561 cur = xmlDocGetRootElement(doc);
569 if(xmlStrcmp(cur->name, (const xmlChar *)"fontconfig")) {
575 cur = cur->xmlChildrenNode;
579 if((!xmlStrcmp(cur->name, (const xmlChar *)"match")))
581 cur2 = cur->xmlChildrenNode;
584 if((!xmlStrcmp(cur2->name, (const xmlChar *)"edit")))
586 cur3 = cur2->xmlChildrenNode;
589 if((!xmlStrcmp(cur3->name, (const xmlChar *)"string")))
591 key = xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1);
593 font_name = g_strdup((char *)key);
614 static void font_config_set_notification()
618 Ecore_X_Window ecore_xwin = ecore_x_window_root_first_get();
619 if (ecore_xwin != 0) {
620 Ecore_X_Atom atom = ecore_x_atom_get("FONT_TYPE_change");
621 ecore_x_window_prop_string_set(ecore_xwin, atom, "tizen");
626 //No font change notification on Wayland.(yet?)
633 static void font_config_set(char *font_name)
635 Eina_List *text_classes = NULL;
636 Elm_Text_Class *etc = NULL;
637 const Eina_List *l = NULL;
638 Eina_List *fo_list = NULL;
639 Elm_Font_Overlay *efo = NULL;
640 int font_size = __font_size_get();
643 text_classes = elm_config_text_classes_list_get();
645 fo_list = (Eina_List *)elm_config_font_overlay_list_get();
647 Eina_List *ll = NULL;
648 Eina_List *l_next = NULL;
650 Eina_Bool slp_medium_exist = EINA_FALSE;
651 Eina_Bool slp_roman_exist = EINA_FALSE;
652 Eina_Bool slp_bold_exist = EINA_FALSE;
653 Eina_Bool slp_regular_exist = EINA_FALSE;
656 Eina_Bool tizen_exist = EINA_FALSE;
658 EINA_LIST_FOREACH_SAFE(fo_list, ll, l_next, efo)
660 if (!strcmp(efo->text_class, "tizen_medium")) {
661 elm_config_font_overlay_set(efo->text_class, (const char*)font_name, efo->size);
662 slp_medium_exist = EINA_TRUE;
663 } else if (!strcmp(efo->text_class, "tizen_roman")) {
664 elm_config_font_overlay_set(efo->text_class, (const char*)font_name, efo->size);
665 slp_roman_exist = EINA_TRUE;
666 } else if (!strcmp(efo->text_class, "tizen_bold")) {
667 elm_config_font_overlay_set(efo->text_class, (const char*)font_name, efo->size);
668 slp_bold_exist = EINA_TRUE;
669 } else if (!strcmp(efo->text_class, "tizen_regular")) {
670 elm_config_font_overlay_set(efo->text_class, (const char*)font_name, efo->size);
671 slp_regular_exist = EINA_TRUE;
675 if (!strcmp(efo->text_class, "tizen")) {
676 elm_config_font_overlay_set(efo->text_class, (const char*)font_name, efo->size);
677 tizen_exist = EINA_TRUE;
682 /* if slp_XX do not exist, need to set them, font size is -100(100%) */
683 if (slp_medium_exist == EINA_FALSE) {
684 elm_config_font_overlay_set("tizen_medium", (const char*)font_name, MIDDLE_FONT_DPI);
686 if (slp_roman_exist == EINA_FALSE) {
687 elm_config_font_overlay_set("tizen_roman", (const char*)font_name, MIDDLE_FONT_DPI);
689 if (slp_bold_exist == EINA_FALSE) {
690 elm_config_font_overlay_set("tizen_bold", (const char*)font_name, MIDDLE_FONT_DPI);
692 if (slp_regular_exist == EINA_FALSE) {
693 elm_config_font_overlay_set("tizen_regular", (const char*)font_name, MIDDLE_FONT_DPI);
697 if (tizen_exist == EINA_FALSE) {
698 elm_config_font_overlay_set("tizen", (const char*)font_name, MIDDLE_FONT_DPI);
701 elm_config_font_overlay_set("tizen", (const char*)font_name, MIDDLE_FONT_DPI);
704 elm_config_font_overlay_set("tizen", (const char*)font_name, MIDDLE_FONT_DPI);
706 EINA_LIST_FOREACH(text_classes, l, etc)
711 EINA_LIST_FOREACH(fo_list, ll, efo)
713 if (!strcmp(etc->name, efo->text_class)) {
717 elm_config_font_overlay_set(etc->name, (const char*)font_name, size);
720 elm_config_font_overlay_apply();
721 elm_config_all_flush();
722 // elm_config_engine_set("software_x11");
724 elm_config_text_classes_list_free(text_classes);
728 vconf_set_str(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, font_name);
731 static void __font_size_set()
733 Eina_List *text_classes = NULL;
734 Elm_Text_Class *etc = NULL;
735 const Eina_List *l = NULL;
736 int font_size = __font_size_get();
737 char *font_name = _get_cur_font();
739 if (font_size == -1) {
743 text_classes = elm_config_text_classes_list_get();
745 EINA_LIST_FOREACH(text_classes, l, etc)
747 elm_config_font_overlay_set(etc->name, font_name, font_size);
750 elm_config_font_overlay_apply();
751 elm_config_all_flush();
753 elm_config_text_classes_list_free(text_classes);
758 static int __font_size_get()
763 int vconf_value = -1;
764 if (system_setting_vconf_get_value_int(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, &vconf_value)) {
768 switch(vconf_value) {
769 case SYSTEM_SETTINGS_FONT_SIZE_SMALL:
770 font_size = SMALL_FONT_DPI;
772 case SYSTEM_SETTINGS_FONT_SIZE_NORMAL:
773 font_size = MIDDLE_FONT_DPI;
775 case SYSTEM_SETTINGS_FONT_SIZE_LARGE:
776 font_size = LARGE_FONT_DPI;
778 case SYSTEM_SETTINGS_FONT_SIZE_HUGE:
779 font_size = HUGE_FONT_DPI;
781 case SYSTEM_SETTINGS_FONT_SIZE_GIANT:
782 font_size = GIANT_FONT_DPI;
785 font_size = MIDDLE_FONT_DPI;